add -funit-at-a-time to cflags, saves at least 45k and makes current images with...
authorFelix Fietkau <nbd@openwrt.org>
Sun, 23 Oct 2005 20:51:44 +0000 (20:51 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 23 Oct 2005 20:51:44 +0000 (20:51 +0000)
SVN-Revision: 2288

openwrt/target/linux/linux-2.4/patches/generic/005-extra_optimization.patch [new file with mode: 0644]
openwrt/toolchain/Config.in
openwrt/toolchain/Config.in.devel

diff --git a/openwrt/target/linux/linux-2.4/patches/generic/005-extra_optimization.patch b/openwrt/target/linux/linux-2.4/patches/generic/005-extra_optimization.patch
new file mode 100644 (file)
index 0000000..5ae25cb
--- /dev/null
@@ -0,0 +1,24 @@
+--- linux-2.4.30/Makefile      2005-10-23 20:52:56.813948000 +0200
++++ linux.dev/Makefile 2005-10-23 20:53:12.482927250 +0200
+@@ -89,6 +89,8 @@
+ # standard CFLAGS
+ #
++check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
++
+ CPPFLAGS := -D__KERNEL__ -I$(HPATH)
+ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
+@@ -100,6 +102,12 @@
+ endif
+ AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
++CFLAGS += $(call check_gcc, -funit-at-a-time,)
++
++
++
++
++
+ #
+ # ROOT_DEV specifies the default root-device when making the image.
+ # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
index fd906f05f6f33ce8444d0c873facff5512b38e50..67a331f0489dc6d76d6f095387011f8e590324e0 100644 (file)
@@ -24,5 +24,5 @@ config BR2_SOFT_FLOAT
 
 config BR2_TARGET_OPTIMIZATION
        string
-       default "-Os -pipe -mips32 -mtune=mips32"
+       default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time"
 
index 48fe1465dfc836c61df3b1e269d108ab77fcacf6..16c1746cd9d77a64e5a936ec9ac49b9a16d6aad9 100644 (file)
@@ -37,7 +37,7 @@ config BR2_SOFT_FLOAT
 
 config BR2_TARGET_OPTIMIZATION
        string "Target Optimizations"
-       default "-Os -pipe -mips32 -mtune=mips32"
+       default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time"
        help
          Optimizations to use when building for the target host.