[Buildroot] [git commit] package/protobuf: fix build failure due to missing -mcmodel=large

Giulio Benetti giulio.benetti at benettiengineering.com
Tue Aug 17 21:25:32 UTC 2021



On 8/17/21 11:11 PM, Arnout Vandecappelle (Essensium/Mind) wrote:
> commit: https://git.buildroot.net/buildroot/commit/?id=bdbb113cd28e9ab17fe067da50484648b84408b8
> branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> 
> When building protobuf for or1k -mcmodel=large is needed to link, so let's
> add that gcc option in case we're building for or1k.
> 
> Upstream gcc doesn't have the -mcmodel=large option for or1k, but all
> released Buildroot gcc versions have the patch to add it, so that's
> fine.

That is not true anymore from 2 days:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=da8a9d695b3c4b9397b5d9a27660bfa48af8d707
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=eff8110674ef193481d3657456a262beeb9951ff

But it's ok. In the actual released versions it's not present.

> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
> Reviewed-by: Maxim Kochetkov <fido_max at inbox.ru>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
> ---
>   package/protobuf/protobuf.mk | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk
> index 492917c5e8..75791fade2 100644
> --- a/package/protobuf/protobuf.mk
> +++ b/package/protobuf/protobuf.mk
> @@ -24,6 +24,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
>   PROTOBUF_CXXFLAGS += -O0
>   endif
>   
> +ifeq ($(BR2_or1k),y)
> +PROTOBUF_CXXFLAGS += -mcmodel=large
> +endif
> +
>   PROTOBUF_CONF_ENV = CXXFLAGS="$(PROTOBUF_CXXFLAGS)"
>   
>   ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

-- 
Giulio Benetti
Benetti Engineering sas


More information about the buildroot mailing list