busybox: remove i386-specific build flags
authorMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 9 Mar 2018 11:19:37 +0000 (12:19 +0100)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Mon, 12 Mar 2018 11:49:03 +0000 (12:49 +0100)
busybox tries to be smart and passes a number of additional flags to the
compiler. Unfortunately, the i386-specific flags break ABI compatiblity
with libc.

Fixes busybox crashes observed on x86-generic with GCC 7.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
package/utils/busybox/patches/111-i386_no_arch_flags.patch [new file with mode: 0644]

diff --git a/package/utils/busybox/patches/111-i386_no_arch_flags.patch b/package/utils/busybox/patches/111-i386_no_arch_flags.patch
new file mode 100644 (file)
index 0000000..4560136
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/arch/i386/Makefile
++++ /dev/null
+@@ -1,7 +0,0 @@
+-# ==========================================================================
+-# Build system
+-# ==========================================================================
+-
+-# -mpreferred-stack-boundary=2 is essential in preventing gcc 4.2.x
+-# from aligning stack to 16 bytes. (Which is gcc's way of supporting SSE).
+-CFLAGS += $(call cc-option,-march=i386 -mpreferred-stack-boundary=2,)