global cflags: remove -funit-at-a-time, it is ignored by recent compilers. instead add -fno-caller-saves, which improves compression ratio for generated code with no apparent negative effects on performance

SVN-Revision: 26300
This commit is contained in:
Felix Fietkau 2011-03-26 01:07:12 +00:00
parent 963b90bb5a
commit 335877a2b3
25 changed files with 32 additions and 32 deletions

View File

@ -157,17 +157,17 @@ ifeq ($(DUMP),1)
# remove duplicates # remove duplicates
FEATURES:=$(sort $(FEATURES)) FEATURES:=$(sort $(FEATURES))
endif endif
DEFAULT_CFLAGS_i386=-O2 -pipe -march=i486 -funit-at-a-time DEFAULT_CFLAGS_i386=-O2 -pipe -march=i486 -fno-caller-saves
DEFAULT_CFLAGS_x86_64=-O2 -pipe -march=athlon64 -funit-at-a-time DEFAULT_CFLAGS_x86_64=-O2 -pipe -march=athlon64 -fno-caller-saves
DEFAULT_CFLAGS_m68k=-Os -pipe -mcfv4e -funit-at-a-time DEFAULT_CFLAGS_m68k=-Os -pipe -mcfv4e -fno-caller-saves
DEFAULT_CFLAGS_mips=-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time DEFAULT_CFLAGS_mips=-Os -pipe -mips32 -mtune=mips32 -fno-caller-saves
DEFAULT_CFLAGS_mipsel=$(DEFAULT_CFLAGS_mips) DEFAULT_CFLAGS_mipsel=$(DEFAULT_CFLAGS_mips)
DEFAULT_CFLAGS_mips64=-Os -pipe -mips64 -mtune=mips64 -mabi=64 -funit-at-a-time DEFAULT_CFLAGS_mips64=-Os -pipe -mips64 -mtune=mips64 -mabi=64 -fno-caller-saves
DEFAULT_CFLAGS_mips64el=$(DEFAULT_CFLAGS_mips64) DEFAULT_CFLAGS_mips64el=$(DEFAULT_CFLAGS_mips64)
DEFAULT_CFLAGS_sparc=-Os -pipe -mcpu=ultrasparc -funit-at-a-time DEFAULT_CFLAGS_sparc=-Os -pipe -mcpu=ultrasparc -fno-caller-saves
DEFAULT_CFLAGS_arm=-Os -pipe -march=armv5te -mtune=xscale -funit-at-a-time DEFAULT_CFLAGS_arm=-Os -pipe -march=armv5te -mtune=xscale -fno-caller-saves
DEFAULT_CFLAGS_armeb=$(DEFAULT_CFLAGS_arm) DEFAULT_CFLAGS_armeb=$(DEFAULT_CFLAGS_arm)
DEFAULT_CFLAGS=$(if $(DEFAULT_CFLAGS_$(ARCH)),$(DEFAULT_CFLAGS_$(ARCH)),-Os -pipe -funit-at-a-time) DEFAULT_CFLAGS=$(if $(DEFAULT_CFLAGS_$(ARCH)),$(DEFAULT_CFLAGS_$(ARCH)),-Os -pipe -fno-caller-saves)
endif endif
define BuildTargets/DumpCurrent define BuildTargets/DumpCurrent

View File

@ -10,7 +10,7 @@ ARCH:=mips
BOARD:=ar71xx BOARD:=ar71xx
BOARDNAME:=Atheros AR71xx/AR7240/AR913x BOARDNAME:=Atheros AR71xx/AR7240/AR913x
FEATURES:=squashfs jffs2 targz FEATURES:=squashfs jffs2 targz
CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
SUBTARGETS:=generic nand SUBTARGETS:=generic nand
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4

View File

@ -11,7 +11,7 @@ BOARD:=at91
MAINTAINER:=Claudio Mignanti <c.mignanti@gmail.com> MAINTAINER:=Claudio Mignanti <c.mignanti@gmail.com>
BOARDNAME:=Atmel AT91 BOARDNAME:=Atmel AT91
FEATURES:=squashfs jffs2 targz FEATURES:=squashfs jffs2 targz
CFLAGS:=-Os -pipe -march=armv5te -mtune=arm926ej-s -funit-at-a-time CFLAGS:=-Os -pipe -march=armv5te -mtune=arm926ej-s -fno-caller-saves
SUBTARGETS:=netus tqma9263 SUBTARGETS:=netus tqma9263
LINUX_VERSION:=2.6.38 LINUX_VERSION:=2.6.38

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=cns21xx BOARD:=cns21xx
BOARDNAME:=Cavium Networks CNS21xx BOARDNAME:=Cavium Networks CNS21xx
FEATURES:=squashfs broken FEATURES:=squashfs broken
CFLAGS:=-Os -pipe -march=armv4 -mtune=fa526 -funit-at-a-time CFLAGS:=-Os -pipe -march=armv4 -mtune=fa526 -fno-caller-saves
LINUX_VERSION:=2.6.36.4 LINUX_VERSION:=2.6.36.4

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=cns3xxx BOARD:=cns3xxx
BOARDNAME:=Cavium Networks Econa CNS3xxx BOARDNAME:=Cavium Networks Econa CNS3xxx
FEATURES:=squashfs fpu gpio FEATURES:=squashfs fpu gpio
CFLAGS:=-Os -pipe -march=armv6k -mtune=mpcore -mfloat-abi=softfp -mfpu=vfp -funit-at-a-time CFLAGS:=-Os -pipe -march=armv6k -mtune=mpcore -mfloat-abi=softfp -mfpu=vfp -fno-caller-saves
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=2.6.31.14 LINUX_VERSION:=2.6.31.14

View File

@ -10,7 +10,7 @@ ARCH:=mipsel
BOARD:=cobalt BOARD:=cobalt
BOARDNAME:=Cobalt Microservers BOARDNAME:=Cobalt Microservers
FEATURES:=targz pci ext4 FEATURES:=targz pci ext4
CFLAGS:=-O2 -pipe -mtune=r5000 -funit-at-a-time CFLAGS:=-O2 -pipe -mtune=r5000 -fno-caller-saves
LINUX_VERSION:=2.6.32.33 LINUX_VERSION:=2.6.32.33

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=ep93xx BOARD:=ep93xx
BOARDNAME:=Cirrus Logic EP93xx BOARDNAME:=Cirrus Logic EP93xx
FEATURES:=squashfs jffs2 ext4 targz usb FEATURES:=squashfs jffs2 ext4 targz usb
CFLAGS:=-Os -pipe -march=armv4t -funit-at-a-time CFLAGS:=-Os -pipe -march=armv4t -fno-caller-saves
LINUX_VERSION:=2.6.36.4 LINUX_VERSION:=2.6.36.4

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=gemini BOARD:=gemini
BOARDNAME:=Cortina Systems CS351x BOARDNAME:=Cortina Systems CS351x
FEATURES:=squashfs FEATURES:=squashfs
CFLAGS:=-Os -pipe -march=armv4 -mtune=fa526 -funit-at-a-time CFLAGS:=-Os -pipe -march=armv4 -mtune=fa526 -fno-caller-saves
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=goldfish BOARD:=goldfish
BOARDNAME:=Goldfish (Android Emulator) BOARDNAME:=Goldfish (Android Emulator)
FEATURES:= FEATURES:=
CFLAGS:=-O2 -pipe -march=armv5te -mtune=xscale -funit-at-a-time CFLAGS:=-O2 -pipe -march=armv5te -mtune=xscale -fno-caller-saves
LINUX_VERSION:=2.6.30.10 LINUX_VERSION:=2.6.30.10

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=imx21 BOARD:=imx21
BOARDNAME:=Freescale i.MX21 BOARDNAME:=Freescale i.MX21
FEATURES:=jffs2 broken FEATURES:=jffs2 broken
CFLAGS:=-Os -pipe -march=armv5te -mtune=arm926ej-s -funit-at-a-time CFLAGS:=-Os -pipe -march=armv5te -mtune=arm926ej-s -fno-caller-saves
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4

View File

@ -14,7 +14,7 @@ SUBTARGETS:=falcon xway
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4
CFLAGS=-Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time CFLAGS=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
include $(INCLUDE_DIR)/target.mk include $(INCLUDE_DIR)/target.mk

View File

@ -11,7 +11,7 @@ BOARD:=leon
BOARDNAME:=LEON BOARDNAME:=LEON
FEATURES+=fpu tgz FEATURES+=fpu tgz
CFLAGS:=-Os -pipe -mcpu=v8 -funit-at-a-time CFLAGS:=-Os -pipe -mcpu=v8 -fno-caller-saves
KERNELNAME:="uImage" KERNELNAME:="uImage"
LINUX_VERSION:=2.6.36.4 LINUX_VERSION:=2.6.36.4

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
BOARD:=malta BOARD:=malta
BOARDNAME:=MIPS Malta CoreLV board (qemu) BOARDNAME:=MIPS Malta CoreLV board (qemu)
CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
SUBTARGETS:=le be SUBTARGETS:=le be
INITRAMFS_EXTRA_FILES:= INITRAMFS_EXTRA_FILES:=

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
ARCH:=powerpc ARCH:=powerpc
BOARD:=mpc52xx BOARD:=mpc52xx
BOARDNAME:=Freescale MPC52xx BOARDNAME:=Freescale MPC52xx
CFLAGS:=-Os -pipe -funit-at-a-time -mcpu=603e CFLAGS:=-Os -pipe -fno-caller-saves -mcpu=603e
FEATURES:=targz ext4 FEATURES:=targz ext4
LINUX_VERSION:=2.6.30.10 LINUX_VERSION:=2.6.30.10

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
ARCH:=powerpc ARCH:=powerpc
BOARD:=mpc83xx BOARD:=mpc83xx
BOARDNAME:=Freescale MPC83xx BOARDNAME:=Freescale MPC83xx
CFLAGS:=-Os -pipe -funit-at-a-time -mcpu=603e CFLAGS:=-Os -pipe -fno-caller-saves -mcpu=603e
FEATURES:=squashfs targz broken FEATURES:=squashfs targz broken
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
ARCH:=powerpc ARCH:=powerpc
BOARD:=mpc85xx BOARD:=mpc85xx
BOARDNAME:=Freescale MPC85xx BOARDNAME:=Freescale MPC85xx
CFLAGS:=-Os -pipe -funit-at-a-time -mcpu=8540 CFLAGS:=-Os -pipe -fno-caller-saves -mcpu=8540
FEATURES:=spe_fpu ramdisk FEATURES:=spe_fpu ramdisk
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>

View File

@ -10,7 +10,7 @@ ARCH:=mips
BOARD:=octeon BOARD:=octeon
BOARDNAME:=Cavium Networks Octeon BOARDNAME:=Cavium Networks Octeon
FEATURES:=squashfs jffs2 pci usb FEATURES:=squashfs jffs2 pci usb
CFLAGS:=-Os -pipe -march=octeon -funit-at-a-time CFLAGS:=-Os -pipe -march=octeon -fno-caller-saves
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=orion BOARD:=orion
BOARDNAME:=Marvell Orion BOARDNAME:=Marvell Orion
SUBTARGETS:=generic harddisk SUBTARGETS:=generic harddisk
CFLAGS=-Os -pipe -march=armv5t -mtune=xscale -funit-at-a-time CFLAGS=-Os -pipe -march=armv5t -mtune=xscale -fno-caller-saves
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4

View File

@ -10,7 +10,7 @@ ARCH:=powerpc
BOARD:=ppc40x BOARD:=ppc40x
BOARDNAME:=AMCC/IBM PPC40x BOARDNAME:=AMCC/IBM PPC40x
FEATURES:=squashfs FEATURES:=squashfs
CFLAGS:=-Os -pipe -funit-at-a-time -mcpu=405 CFLAGS:=-Os -pipe -fno-caller-saves -mcpu=405
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=2.6.32.33 LINUX_VERSION:=2.6.32.33

View File

@ -10,7 +10,7 @@ ARCH:=powerpc
BOARD:=ppc44x BOARD:=ppc44x
BOARDNAME:=AMCC/IBM PPC44x BOARDNAME:=AMCC/IBM PPC44x
FEATURES:=squashfs FEATURES:=squashfs
CFLAGS:=-Os -pipe -funit-at-a-time -mcpu=440 CFLAGS:=-Os -pipe -fno-caller-saves -mcpu=440
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=2.6.32.33 LINUX_VERSION:=2.6.32.33

View File

@ -10,7 +10,7 @@ ARCH:=mipsel
BOARD:=ramips BOARD:=ramips
BOARDNAME:=Ralink RT288x/RT305x BOARDNAME:=Ralink RT288x/RT305x
SUBTARGETS:=rt288x rt305x SUBTARGETS:=rt288x rt305x
CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
FEATURES:=squashfs FEATURES:=squashfs
LINUX_VERSION:=2.6.36.4 LINUX_VERSION:=2.6.36.4

View File

@ -10,7 +10,7 @@ ARCH:=i386
BOARD:=rdc BOARD:=rdc
BOARDNAME:=RDC 321x BOARDNAME:=RDC 321x
FEATURES:=squashfs jffs2 pci usb pcmcia FEATURES:=squashfs jffs2 pci usb pcmcia
CFLAGS:=-Os -pipe -march=i486 -mtune=i486 -funit-at-a-time CFLAGS:=-Os -pipe -march=i486 -mtune=i486 -fno-caller-saves
LINUX_VERSION:=2.6.32.33 LINUX_VERSION:=2.6.32.33

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=realview BOARD:=realview
BOARDNAME:=ARM Ltd. Realview board (qemu) BOARDNAME:=ARM Ltd. Realview board (qemu)
FEATURES:=squashfs jffs2 fpu FEATURES:=squashfs jffs2 fpu
CFLAGS:=-Os -pipe -march=armv6k -mtune=mpcore -mfloat-abi=softfp -mfpu=vfp -funit-at-a-time CFLAGS:=-Os -pipe -march=armv6k -mtune=mpcore -mfloat-abi=softfp -mfpu=vfp -fno-caller-saves
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4

View File

@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=s3c24xx BOARD:=s3c24xx
BOARDNAME:=Samsung S3C24xx BOARDNAME:=Samsung S3C24xx
FEATURES:=jffs2 FEATURES:=jffs2
CFLAGS:=-O2 -pipe -march=armv4t -mtune=arm920t -funit-at-a-time CFLAGS:=-O2 -pipe -march=armv4t -mtune=arm920t -fno-caller-saves
SUBTARGETS:=openmoko-gta02 SUBTARGETS:=openmoko-gta02
LINUX_VERSION:=2.6.30.10 LINUX_VERSION:=2.6.30.10

View File

@ -10,7 +10,7 @@ ARCH:=mips
BOARD:=sibyte BOARD:=sibyte
BOARDNAME:=Broadcom/SiByte SB-1 BOARDNAME:=Broadcom/SiByte SB-1
FEATURES:=fpu ramdisk FEATURES:=fpu ramdisk
CFLAGS:=-Os -pipe -march=sb1 -funit-at-a-time CFLAGS:=-Os -pipe -march=sb1 -fno-caller-saves
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=2.6.37.4 LINUX_VERSION:=2.6.37.4