[Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
Yann E. MORIN
yann.morin.1998 at free.fr
Sun Sep 19 08:11:20 UTC 2021
Giulio, All,
On 2021-09-19 02:51 +0200, Giulio Benetti spake thusly:
> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
> since 'switch' blocks are pretty wide and lead to build failure. This way
> 'switch' blocks will have a 32-bit addressing by default instead of the
> standard 16-bit. This can be done only with m68k gcc version >= 7.x
> because gcc flag used to fix this(-mlong-jump-table-offsets) is
> available only from that version on.
>
> Fixes:
> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
>
> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
I've reworded the commit log (expain problem first, explain how it is
fixed them; add upstream BZ references, and non-propagation notes).
I also added a comment in Config.in about this new dependency.
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> V1->V2:
> * add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
> * improve commit log according to Config.in change
> ---
> package/mesa3d/Config.in | 1 +
> package/mesa3d/mesa3d.mk | 9 +++++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> index eb7c1eef46..e364f435c7 100644
> --- a/package/mesa3d/Config.in
> +++ b/package/mesa3d/Config.in
> @@ -4,6 +4,7 @@ menuconfig BR2_PACKAGE_MESA3D
> depends on !BR2_STATIC_LIBS
> depends on BR2_TOOLCHAIN_HAS_SYNC_1
> depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> + depends on !BR2_m68k || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # m68k needs gcc >= 7.x
> select BR2_PACKAGE_EXPAT
> select BR2_PACKAGE_LIBDRM
> select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> index 1a9e355641..f1862aed69 100644
> --- a/package/mesa3d/mesa3d.mk
> +++ b/package/mesa3d/mesa3d.mk
> @@ -259,4 +259,13 @@ else
> MESA3D_CONF_OPTS += -Dzstd=disabled
> endif
>
> +MESA3D_CFLAGS = $(TARGET_CFLAGS)
> +
> +# m68k needs 32-bit offsets in switch tables to build
> +ifeq ($(BR2_m68k),y)
> +MESA3D_CFLAGS += -mlong-jump-table-offsets
> +endif
> +
> +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
> +
> $(eval $(meson-package))
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list