All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ntpsec: fix build on xtensa
@ 2024-07-27  9:40 Dario Binacchi
  2024-07-27 14:13 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Dario Binacchi @ 2024-07-27  9:40 UTC (permalink / raw)
  To: buildroot; +Cc: Dario Binacchi

Fix the following build failure on xtensa:

Waf: Entering directory `/home/buildroot/instance-0/output-1/build/ntpsec-1.2.3/build/host'
[1/2] Processing ntpd/ntp_parser.y
[2/2] Compiling build/host/ntpd/ntp_parser.tab.c
gcc: error: unrecognized command-line option '-mlongcalls'
gcc: error: unrecognized command-line option '-mauto-litpools'

The 'longcalls' and 'auto-litpools' options are added to CFLAGS for
xtensa in package/Makefile.in, but as highlighted by the error message,
in this case, the options need to be removed.

Fixes:
 - http://autobuild.buildroot.org/results/9321a637f2c340ce8dcb24249676bb6c44d0dfc6

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 package/ntpsec/ntpsec.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/ntpsec/ntpsec.mk b/package/ntpsec/ntpsec.mk
index 661af788423c..70c993ba6b10 100644
--- a/package/ntpsec/ntpsec.mk
+++ b/package/ntpsec/ntpsec.mk
@@ -37,6 +37,9 @@ NTPSEC_DEPENDENCIES = \
 	libcap \
 	openssl
 
+NTPSEC_TARGET_CFLAGS = \
+	$(filter-out mlongcalls -mauto-litpools,$(TARGET_CFLAGS))
+
 # CC="$(HOSTCC)" is strange but needed to build some host tools, the
 # cross-compiler will properly be used to build target code thanks to
 # --cross-compiler
@@ -45,7 +48,7 @@ NTPSEC_CONF_OPTS = \
 	PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \
 	--libdir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/ntp \
 	--cross-compiler="$(TARGET_CC)" \
-	--cross-cflags="$(TARGET_CFLAGS) -std=gnu99" \
+	--cross-cflags="$(NTSPEC_TARGET_CFLAGS) -std=gnu99" \
 	--cross-ldflags="$(TARGET_LDFLAGS)" \
 	--notests \
 	--enable-early-droproot \
-- 
2.43.0

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

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

end of thread, other threads:[~2024-07-27 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-27  9:40 [Buildroot] [PATCH 1/1] package/ntpsec: fix build on xtensa Dario Binacchi
2024-07-27 14:13 ` Thomas Petazzoni via buildroot

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.