Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors
@ 2022-10-07 23:50 Vincent Fazio
  2022-10-07 23:50 ` [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null Vincent Fazio
  2022-11-01 22:40 ` [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 8+ messages in thread
From: Vincent Fazio @ 2022-10-07 23:50 UTC (permalink / raw)
  To: buildroot; +Cc: Vincent Fazio

As part of pkg-kconfig, the .config file gets regenerated after fixups.

When Busybox is built with per-package directories enabled, the
toolchain is not available for Busybox's makefile to determine compiler
capabilities so certain calls will fail and emit errors.

For now, assume the following are true:

Buildroot will not use GCC < 4
  Skip a call to cc-ifversion to avoid the following error

  /buildroot/output/build/busybox-1.35.0/scripts/gcc-version.sh: line 11: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: No such file or directory

Target system is linux
  Skip a call to -dumpmachine to avoid the following error

  make[2]: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: Command not found

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
 ...ags-assume-GCC-4-and-target-is-linux.patch | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch

diff --git a/package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch b/package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch
new file mode 100644
index 0000000000..567d46704f
--- /dev/null
+++ b/package/busybox/0006-Makefile.flags-assume-GCC-4-and-target-is-linux.patch
@@ -0,0 +1,50 @@
+From d384e999e1dff473f2bf084c6a9b9730ad39b878 Mon Sep 17 00:00:00 2001
+From: Vincent Fazio <vfazio@xes-inc.com>
+Date: Thu, 6 Oct 2022 13:16:34 -0500
+Subject: [PATCH] Makefile.flags: assume GCC >= 4 and target is linux
+
+As part of pkg-kconfig, the .config file gets regenerated after fixups.
+
+When Busybox is built with per-package directories enabled, the
+toolchain is not available for Busybox's makefile to determine compiler
+capabilities so certain calls will fail and emit errors.
+
+For now, assume the following are true:
+
+Buildroot will not use GCC < 4
+  Skip a call to cc-ifversion to avoid the following error
+
+  /buildroot/output/build/busybox-1.35.0/scripts/gcc-version.sh: line 11: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: No such file or directory
+
+Target system is linux
+  Skip a call to -dumpmachine to avoid the following error
+
+  make[2]: /buildroot/output/per-package/busybox/host/bin/x86_64-linux-gcc: Command not found
+
+Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
+
+diff --git a/Makefile.flags b/Makefile.flags
+index c34356230..274527954 100644
+--- a/Makefile.flags
++++ b/Makefile.flags
+@@ -45,7 +45,7 @@ CFLAGS += $(call cc-option,-Werror,)
+ #CFLAGS += $(call cc-ifversion, -eq, 0404, -fno-strict-aliasing)
+ endif
+ # gcc 3.x emits bogus "old style proto" warning on find.c:alloc_action()
+-CFLAGS += $(call cc-ifversion, -ge, 0400, -Wold-style-definition)
++CFLAGS += -Wold-style-definition
+ 
+ ifneq ($(CC),clang)
+ # "clang-9: warning: optimization flag '-finline-limit=0' is not supported
+@@ -184,7 +184,7 @@ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%
+ endif
+ 
+ ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
+-ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine)))
++ifneq (,$(findstring linux,linux))
+ LDLIBS += resolv
+ endif
+ endif
+-- 
+2.25.1
+
-- 
2.25.1

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

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

end of thread, other threads:[~2022-11-02 22:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-07 23:50 [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors Vincent Fazio
2022-10-07 23:50 ` [Buildroot] [PATCH 2/2] package/busybox: redirect errors to /dev/null Vincent Fazio
2022-11-01 22:41   ` Thomas Petazzoni via buildroot
2022-11-02 12:43     ` [Buildroot] [External] - " Vincent Fazio
2022-11-02 21:53     ` [Buildroot] " Yann E. MORIN
2022-11-02 22:11       ` Thomas Petazzoni via buildroot
2022-11-01 22:40 ` [Buildroot] [PATCH 1/2] package/busybox: add patch to silence build errors Thomas Petazzoni via buildroot
2022-11-02 22:00   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox