summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-09-26 17:53:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-09-26 17:53:20 +0000
commitc8609ab4f80781b0c227d7b329d6b0a51801de72 (patch)
treed43bff23358acf486267bb0a585fbe33211ab774
parenta30681dff0c896464ebb3de81fcc737c114a6194 (diff)
downloadmtk-20170518-c8609ab4f80781b0c227d7b329d6b0a51801de72.zip
mtk-20170518-c8609ab4f80781b0c227d7b329d6b0a51801de72.tar.gz
mtk-20170518-c8609ab4f80781b0c227d7b329d6b0a51801de72.tar.bz2
build: unify arm target cflags
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 38211
-rw-r--r--include/target.mk9
-rw-r--r--target/linux/at91/Makefile2
-rw-r--r--target/linux/bcm53xx/Makefile4
-rw-r--r--target/linux/brcm2708/Makefile4
-rw-r--r--target/linux/cns21xx/Makefile2
-rw-r--r--target/linux/cns3xxx/Makefile3
-rw-r--r--target/linux/ep93xx/Makefile2
-rw-r--r--target/linux/gemini/Makefile2
-rw-r--r--target/linux/imx23/Makefile3
-rw-r--r--target/linux/imx6/Makefile3
-rw-r--r--target/linux/mcs814x/Makefile2
-rw-r--r--target/linux/mvebu/Makefile3
-rw-r--r--target/linux/omap24xx/Makefile3
-rw-r--r--target/linux/omap4/Makefile3
-rw-r--r--target/linux/orion/Makefile1
-rw-r--r--target/linux/realview/Makefile3
16 files changed, 31 insertions, 18 deletions
diff --git a/include/target.mk b/include/target.mk
index f9f378a..8c427c0 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -217,7 +217,16 @@ ifeq ($(DUMP),1)
endif
ifneq ($(findstring arm,$(ARCH)),)
CPU_TYPE ?= xscale
+ CPU_CFLAGS_arm920t = -march=armv4t -mtune=arm920t
+ CPU_CFLAGS_arm926ej-s = -march=armv5te -mtune=arm926ej-s
+ CPU_CFLAGS_arm1136j-s = -march=armv6 -mtune=arm1136j-s
+ CPU_CFLAGS_arm1176jzf-s = -march=armv6 -mtune=arm1176jzf-s
+ CPU_CFLAGS_cortex-a9 = -march=armv7-a -mtune=cortex-a9
+ CPU_CFLAGS_fa526 = -march=armv4 -mtune=fa526
+ CPU_CFLAGS_mpcore = -march=armv6k -mtune=mpcore
CPU_CFLAGS_xscale = march=armv5te -mtune=xscale
+ CPU_CFLAGS_vfp = -mfpu=vfp -mfloat-abi=softfp
+ CPU_CFLAGS_vfp3 = -mfpu=vfp3-d16 -mfloat-abi=softfp
endif
ifeq ($(ARCH),sparc)
CPU_TYPE = sparc
diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index e9cc6d1..3dac8a4 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -11,7 +11,7 @@ BOARD:=at91
MAINTAINER:=Claudio Mignanti <c.mignanti@gmail.com>
BOARDNAME:=Atmel AT91
FEATURES:=squashfs targz ext2 usb
-CFLAGS:=-Os -pipe -march=armv5te -mtune=arm926ej-s
+CPU_TYPE:=arm926ej-s
LINUX_VERSION:=3.8.13
diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile
index 4986d80..60701e5 100644
--- a/target/linux/bcm53xx/Makefile
+++ b/target/linux/bcm53xx/Makefile
@@ -11,6 +11,8 @@ BOARD:=bcm53xx
BOARDNAME:=Broadcom BCM47xx/53xx with ARM CPU
FEATURES:=squashfs usb pci pcie gpio
MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
+CPU_TYPE:=cortex-a9
+CPU_SUBTYPE:=vfp
LINUX_VERSION:=3.10.12
@@ -20,8 +22,6 @@ define Target/Description
Build firmware images for Broadcom based BCM47xx/53xx routers with ARM CPU, *not* MIPS.
endef
-CFLAGS:=-Os -pipe -mtune=cortex-a9 -march=armv7-a -mfpu=vfp -mfloat-abi=softfp
-
KERNELNAME:="zImage dtbs"
DEFAULT_PACKAGES += swconfig
diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index ad0d1fb..17606f4 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -12,6 +12,8 @@ BOARD:=brcm2708
BOARDNAME:=Broadcom BCM2708/BCM2835
FEATURES:=ext4 audio usb usbgadget display gpio
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
+CPU_TYPE:=arm1176jzf-s
+CPU_SUBTYPE:=vfp
LINUX_VERSION:=3.10.12
@@ -23,6 +25,4 @@ define Target/Description
Currently produces SD Card image for Raspberry Pi.
endef
-CFLAGS:=-pipe -march=armv6 -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp -marm
-
$(eval $(call BuildTarget))
diff --git a/target/linux/cns21xx/Makefile b/target/linux/cns21xx/Makefile
index 3ecc476..30066ab 100644
--- a/target/linux/cns21xx/Makefile
+++ b/target/linux/cns21xx/Makefile
@@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=cns21xx
BOARDNAME:=Cavium Networks Econa CNS21xx
FEATURES:=squashfs
-CFLAGS:=-Os -pipe -march=armv4 -mtune=fa526
+CPU_TYPE:=fa526
LINUX_VERSION:=3.10.12
diff --git a/target/linux/cns3xxx/Makefile b/target/linux/cns3xxx/Makefile
index a169d0b..505be7a 100644
--- a/target/linux/cns3xxx/Makefile
+++ b/target/linux/cns3xxx/Makefile
@@ -10,7 +10,8 @@ ARCH:=arm
BOARD:=cns3xxx
BOARDNAME:=Cavium Networks Econa CNS3xxx
FEATURES:=squashfs fpu gpio pcie usb usbgadget
-CFLAGS:=-Os -pipe -march=armv6k -mtune=mpcore -mfloat-abi=softfp -mfpu=vfp
+CPU_TYPE:=mpcore
+CPU_SUBTYPE:=vfp
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=3.8.13
diff --git a/target/linux/ep93xx/Makefile b/target/linux/ep93xx/Makefile
index 1cc0877..debb8e9 100644
--- a/target/linux/ep93xx/Makefile
+++ b/target/linux/ep93xx/Makefile
@@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=ep93xx
BOARDNAME:=Cirrus Logic EP93xx
FEATURES:=squashfs ext4 targz usb display sound
-CFLAGS:=-Os -pipe -march=armv4t
+CPU_TYPE:=arm920t
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
LINUX_VERSION:=3.8.13
diff --git a/target/linux/gemini/Makefile b/target/linux/gemini/Makefile
index e1586d1..b64c9c8 100644
--- a/target/linux/gemini/Makefile
+++ b/target/linux/gemini/Makefile
@@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=gemini
BOARDNAME:=Cortina Systems CS351x
FEATURES:=squashfs pci
-CFLAGS:=-Os -pipe -march=armv4 -mtune=fa526
+CPU_TYPE:=fa526
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=3.9.11
diff --git a/target/linux/imx23/Makefile b/target/linux/imx23/Makefile
index 21c33f9..439b01f 100644
--- a/target/linux/imx23/Makefile
+++ b/target/linux/imx23/Makefile
@@ -10,7 +10,8 @@ ARCH:=arm
BOARD:=imx23
BOARDNAME:=Freescale i.MX23 series
FEATURES:=ext4 rtc usb gpio
-CFLAGS:=-Os -pipe -march=armv5te -mtune=arm926ej-s
+CPU_TYPE:=arm926ej-s
+
MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
LINUX_VERSION:=3.10.12
KERNELNAME:="zImage dtbs"
diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile
index 6eccacb..c7b6a6d 100644
--- a/target/linux/imx6/Makefile
+++ b/target/linux/imx6/Makefile
@@ -10,7 +10,8 @@ ARCH:=arm
BOARD:=imx6
BOARDNAME:=Freescale i.MX 6 Series
FEATURES:=audio display gpio pcie usb usbgadget squashfs targz
-CFLAGS:=-Os -pipe -mtune=cortex-a9 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp
+CPU_TYPE:=cortex-a9
+CPU_SUBTYPE:=vfp3
MAINTAINER:=Luka Perkov <luka@openwrt.org>
LINUX_VERSION:=3.10.12
diff --git a/target/linux/mcs814x/Makefile b/target/linux/mcs814x/Makefile
index dac17b8..6b1b40e 100644
--- a/target/linux/mcs814x/Makefile
+++ b/target/linux/mcs814x/Makefile
@@ -10,7 +10,7 @@ ARCH:=arm
BOARD:=mcs814x
BOARDNAME:=Moschip MCS814x
FEATURES:=usb squashfs
-CFLAGS=-Os -pipe -march=armv5te -mtune=arm926ej-s
+CPU_TYPE:=arm926ej-s
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
LINUX_VERSION:=3.3.8
diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile
index 6b65eb7..c791747 100644
--- a/target/linux/mvebu/Makefile
+++ b/target/linux/mvebu/Makefile
@@ -10,7 +10,8 @@ ARCH:=arm
BOARD:=mvebu
BOARDNAME:=Marvell Armada XP/370
FEATURES:=targz usb pci pcie gpio
-CFLAGS:=-Os -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp
+CPU_TYPE:=cortex-a9
+CPU_SUBTYPE:=vfp3
LINUX_VERSION:=3.8.13
diff --git a/target/linux/omap24xx/Makefile b/target/linux/omap24xx/Makefile
index b3e54d3..f8cd3c5 100644
--- a/target/linux/omap24xx/Makefile
+++ b/target/linux/omap24xx/Makefile
@@ -11,6 +11,7 @@ BOARD:=omap24xx
BOARDNAME:=TI OMAP24xx
MAINTAINER:=Michael Buesch <m@bues.ch>
FEATURES:=targz squashfs jffs2_nand usb usbgadget display gpio audio broken
+CPU_TYPE:=arm1136j-s
LINUX_VERSION:=3.3.8
@@ -18,8 +19,6 @@ define Target/Description
TI OMAP-24xx
endef
-CFLAGS:=-Os -pipe -march=armv6 -mtune=arm1136j-s
-
KERNELNAME:="zImage"
include $(INCLUDE_DIR)/target.mk
diff --git a/target/linux/omap4/Makefile b/target/linux/omap4/Makefile
index f513144..aa27607 100644
--- a/target/linux/omap4/Makefile
+++ b/target/linux/omap4/Makefile
@@ -10,10 +10,11 @@ ARCH:=arm
BOARD:=omap4
BOARDNAME:=TI OMAP4
FEATURES:=usb targz audio display
+CPU_TYPE:=cortex-a9
+CPU_SUBTYPE:=vfp3
LINUX_VERSION:=3.3.8
-CFLAGS:=-Os -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
KERNELNAME:="uImage"
diff --git a/target/linux/orion/Makefile b/target/linux/orion/Makefile
index fa06466..055ccd1 100644
--- a/target/linux/orion/Makefile
+++ b/target/linux/orion/Makefile
@@ -10,7 +10,6 @@ ARCH:=arm
BOARD:=orion
BOARDNAME:=Marvell Orion
SUBTARGETS:=generic harddisk
-CFLAGS=-Os -pipe -march=armv5te -mtune=xscale
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
LINUX_VERSION:=3.3.8
diff --git a/target/linux/realview/Makefile b/target/linux/realview/Makefile
index ab284be..7088bc3 100644
--- a/target/linux/realview/Makefile
+++ b/target/linux/realview/Makefile
@@ -10,7 +10,8 @@ ARCH:=arm
BOARD:=realview
BOARDNAME:=ARM Ltd. Realview board (qemu)
FEATURES:=fpu ramdisk
-CFLAGS:=-Os -pipe -march=armv6k -mtune=mpcore -mfloat-abi=softfp -mfpu=vfp
+CPU_TYPE:=mpcore
+CPU_SUBTYPE:=vfp
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
LINUX_VERSION:=3.10.12