All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/apitrace: fix build failure on m68k architecture
@ 2022-01-29 18:34 Giulio Benetti
  2022-01-30 21:55 ` Thomas Petazzoni via buildroot
  2022-02-06 15:21 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Giulio Benetti @ 2022-01-29 18:34 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Jérôme Pouiller

apitrace uses very big switch statements, which causes the build to fail
on m68k, because the offsets there are only 16-bit.

We fix that by using -mlong-jump-table-offsets on m68k, to use 32-bit
offsets for switch statements. That flag is available on gcc version >= 7
but apitrace package already depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7, so
we can use it with no problem.

Fixes:
http://autobuild.buildroot.net/results/7306bf05962fec30fbe98b1eb8ee09b3162b8080/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/apitrace/apitrace.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/apitrace/apitrace.mk b/package/apitrace/apitrace.mk
index 3656a5722b..c47562233b 100644
--- a/package/apitrace/apitrace.mk
+++ b/package/apitrace/apitrace.mk
@@ -38,6 +38,11 @@ ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 APITRACE_CXXFLAGS += -O0
 endif
 
+# m68k needs 32-bit offsets in switch tables to build
+ifeq ($(BR2_m68k),y)
+APITRACE_CXXFLAGS += -mlong-jump-table-offsets
+endif
+
 APITRACE_CONF_OPTS += \
 	-DCMAKE_C_FLAGS="$(APITRACE_CFLAGS)" \
 	-DCMAKE_CXX_FLAGS="$(APITRACE_CXXFLAGS)"
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/apitrace: fix build failure on m68k architecture
  2022-01-29 18:34 [Buildroot] [PATCH] package/apitrace: fix build failure on m68k architecture Giulio Benetti
@ 2022-01-30 21:55 ` Thomas Petazzoni via buildroot
  2022-02-06 15:21 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-01-30 21:55 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Jérôme Pouiller, buildroot

On Sat, 29 Jan 2022 19:34:26 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> apitrace uses very big switch statements, which causes the build to fail
> on m68k, because the offsets there are only 16-bit.
> 
> We fix that by using -mlong-jump-table-offsets on m68k, to use 32-bit
> offsets for switch statements. That flag is available on gcc version >= 7
> but apitrace package already depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7, so
> we can use it with no problem.
> 
> Fixes:
> http://autobuild.buildroot.net/results/7306bf05962fec30fbe98b1eb8ee09b3162b8080/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  package/apitrace/apitrace.mk | 5 +++++
>  1 file changed, 5 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/apitrace: fix build failure on m68k architecture
  2022-01-29 18:34 [Buildroot] [PATCH] package/apitrace: fix build failure on m68k architecture Giulio Benetti
  2022-01-30 21:55 ` Thomas Petazzoni via buildroot
@ 2022-02-06 15:21 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-02-06 15:21 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Jérôme Pouiller, buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > apitrace uses very big switch statements, which causes the build to fail
 > on m68k, because the offsets there are only 16-bit.

 > We fix that by using -mlong-jump-table-offsets on m68k, to use 32-bit
 > offsets for switch statements. That flag is available on gcc version >= 7
 > but apitrace package already depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7, so
 > we can use it with no problem.

 > Fixes:
 > http://autobuild.buildroot.net/results/7306bf05962fec30fbe98b1eb8ee09b3162b8080/

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Committed to 2021.11.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-06 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-29 18:34 [Buildroot] [PATCH] package/apitrace: fix build failure on m68k architecture Giulio Benetti
2022-01-30 21:55 ` Thomas Petazzoni via buildroot
2022-02-06 15:21 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.