conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH

Since we're updating the tune file format, it makes sense to abstract
the compiler tune arguments at this point too. This means that should
these need to be overridden at any point, the original values can
still be obtained in a similar manner to the other TUNE* variables.

Whilst this isn't strictly necessary for any current need, its likely
good practise to standardise this behaviour.

(From OE-Core rev: 3a3c69a1bc3cf0b6f6a3b13d86c12ed21798d48e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-07-22 15:13:03 +01:00
parent 039a2d006b
commit d74176473a
28 changed files with 34 additions and 32 deletions

View File

@ -82,12 +82,14 @@ HOST_CC_ARCH = "${TARGET_CC_ARCH}"
HOST_EXEEXT = ""
TUNE_ARCH ??= "INVALID"
TUNE_CCARGS ??= ""
TARGET_ARCH = "${TUNE_ARCH}"
TARGET_OS = "INVALID"
TARGET_VENDOR = "-oe"
TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}"
TARGET_PREFIX = "${TARGET_SYS}-"
TARGET_CC_ARCH = ""
TARGET_CC_ARCH = "${TUNE_CCARGS}"
SDK_ARCH = "${BUILD_ARCH}"
SDK_OS = "${BUILD_OS}"

View File

@ -1,7 +1,7 @@
TUNE_ARCH = "arm"
TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s"
TARGET_CC_ARCH += "${@['', '-mfloat-abi=softfp -mfpu=vfp'][(bb.data.getVar('TARGET_FPU', d, 1) == 'soft') and (bb.data.getVar('CPU_FEATURES', d, 1).find('vfp') != -1)]}"
TUNE_CCARGS = "-march=armv6j -mtune=arm1136jf-s"
TUNE_CCARGS += "${@['', '-mfloat-abi=softfp -mfpu=vfp'][(bb.data.getVar('TARGET_FPU', d, 1) == 'soft') and (bb.data.getVar('CPU_FEATURES', d, 1).find('vfp') != -1)]}"
TUNE_PKGARCH = "armv6"
ARM_INSTRUCTION_SET = "${@['thumb','arm'][bb.data.getVar('CPU_FEATURES', d, 1).find('thumb') == -1]}"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "arm"
TUNE_PKGARCH = "armv4t"
TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t"
TUNE_CCARGS = "-march=armv4t -mtune=arm920t"
PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"

View File

@ -3,7 +3,7 @@ TUNE_ARCH = "arm"
TUNE_PKGARCH = "armv5te"
PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te"
# For gcc 3.x you need:
#TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ejs"
#TUNE_CCARGS = "-march=armv5te -mtune=arm926ejs"
# For gcc 4.x you need:
TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s"
TUNE_CCARGS = "-march=armv5te -mtune=arm926ej-s"

View File

@ -2,4 +2,4 @@ TUNE_ARCH = "arm"
TUNE_PKGARCH = "armv4t"
PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi"
TUNE_CCARGS = "-mcpu=arm9tdmi -mtune=arm9tdmi"

View File

@ -3,6 +3,6 @@ TUNE_ARCH = "arm"
# valid options for -march: `armv7', `armv7-a', `armv7-r', `armv7-m'
# valid option for -mtune: `cortex-a8', `cortex-r4', `cortex-m3', `cortex-m1'
# This will NOT compile programs in 'ARM' mode, which is what you really want
TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"
TUNE_CCARGS = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"
TUNE_PKGARCH = "armv7"
PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7"

View File

@ -1,7 +1,7 @@
TUNE_ARCH = "i586"
TUNE_PKGARCH = "core2"
TARGET_CC_ARCH = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
TUNE_CCARGS = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
#MOBLIN_CFLAGS = "-Os -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables"
PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586 i686 core2"

View File

@ -2,5 +2,5 @@ TUNE_ARCH = "i586"
TUNE_PKGARCH = "i586"
TARGET_CC_ARCH = "-march=c3 -mtune=c3"
TUNE_CCARGS = "-march=c3 -mtune=c3"
PACKAGE_EXTRA_ARCHS = "i386 i486 i586"

View File

@ -5,7 +5,7 @@ TUNE_ARCH = "arm"
# [2] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
# [3] https://support.codesourcery.com/GNUToolchain/kbentry29
TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-tree-vectorize"
TUNE_CCARGS = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-tree-vectorize"
# Other potentially useful options
#-ftree-vectorize -ffast-math -fno-omit-frame-pointer

View File

@ -1,4 +1,4 @@
TUNE_ARCH = "arm"
TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp"
TUNE_CCARGS = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp"
TUNE_PKGARCH = "armv6"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "arm"
# valid options for -march: `armv7', `armv7-m'
TARGET_CC_ARCH = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
TUNE_CCARGS = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
TUNE_PKGARCH = "armv7"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "arm"
# valid options for -march: `armv7', `armv7-r'
TARGET_CC_ARCH = "-march=armv7-r -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
TUNE_CCARGS = "-march=armv7-r -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
TUNE_PKGARCH = "armv7"

View File

@ -1,6 +1,6 @@
TUNE_ARCH = "arm"
TARGET_CC_ARCH = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
TUNE_CCARGS = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
# add "-mfp=maverick" for newer gcc versions > 4.0
#set arch to ep9312 for all generated packages

View File

@ -1,6 +1,6 @@
TUNE_ARCH = "i586"
TUNE_PKGARCH = "i586"
TARGET_CC_ARCH = "-m32 -march=i586"
TUNE_CCARGS = "-m32 -march=i586"
PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586"

View File

@ -2,7 +2,7 @@ TUNE_ARCH = "arm"
# Configurations for the Intel PXA27x Appications Processor Family.
# Please use tune-xscale for PXA255/PXA26x based processors.
TARGET_CC_ARCH = "-march=iwmmxt -mcpu=iwmmxt -mtune=iwmmxt"
TUNE_CCARGS = "-march=iwmmxt -mcpu=iwmmxt -mtune=iwmmxt"
PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te iwmmxt"
TUNE_PKGARCH = "iwmmxt"

View File

@ -1,4 +1,4 @@
TUNE_ARCH = "mips"
TARGET_CC_ARCH = "-march=mips32"
TUNE_CCARGS = "-march=mips32"
TUNE_PKGARCH = "mips"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "powerpc"
TARGET_CC_ARCH = "-mcpu=603e -mhard-float"
TUNE_CCARGS = "-mcpu=603e -mhard-float"
TUNE_PKGARCH = "ppc603e"
PACKAGE_EXTRA_ARCHS = "powerpc ppc603e"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "powerpc"
TARGET_CC_ARCH = "-mcpu=e300c2 -msoft-float"
TUNE_CCARGS = "-mcpu=e300c2 -msoft-float"
TUNE_PKGARCH = "ppce300"
PACKAGE_EXTRA_ARCHS = "powerpc ppce300"

View File

@ -1,6 +1,6 @@
TUNE_ARCH = "powerpc"
TARGET_CC_ARCH = "-mcpu=8540"
TUNE_CCARGS = "-mcpu=8540"
BASE_PACKAGE_ARCH = "ppce500"
TUNE_PKGARCH = "ppce500"
PACKAGE_EXTRA_ARCHS = "powerpc ppce500"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "powerpc"
TARGET_CC_ARCH = "-mcpu=e500mc"
TUNE_CCARGS = "-mcpu=e500mc"
TUNE_PKGARCH = "ppce500mc"
PACKAGE_EXTRA_ARCHS = "powerpc ppce500mc"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "powerpc"
TARGET_CC_ARCH = "-mcpu=8548 -mabi=spe -mspe"
TUNE_CCARGS = "-mcpu=8548 -mabi=spe -mspe"
TUNE_PKGARCH = "ppce500v2"
PACKAGE_EXTRA_ARCHS = "powerpc ppce500v2"

View File

@ -1,4 +1,4 @@
TUNE_ARCH = "sh3"
TARGET_CC_ARCH = "-ml -m3"
TUNE_CCARGS = "-ml -m3"
TUNE_PKGARCH = "sh3"

View File

@ -4,5 +4,5 @@ TUNE_ARCH = "sh4"
# But it is not compatible for sh4.
# The binary optimized by m4a doesn't operate on sh4. It works on sh4a only.
TARGET_CC_ARCH = "-ml -m4"
TUNE_CCARGS = "-ml -m4"
TUNE_PKGARCH = "sh4"

View File

@ -5,5 +5,5 @@ TUNE_PKGARCH = "arm"
# This machine lists common configuration options for Strongarm 1100 devices
# NOTE: The Zaurus Collie also has a Strongarm processor, but uses the 1110 type
TARGET_CC_ARCH = "-march=armv4 -mtune=strongarm1100"
TUNE_CCARGS = "-march=armv4 -mtune=strongarm1100"

View File

@ -1,4 +1,4 @@
TUNE_ARCH = "sparc"
TARGET_CC_ARCH = "-mcpu=supersparc"
TUNE_CCARGS = "-mcpu=supersparc"
TUNE_PKGARCH = "supersparc"

View File

@ -27,6 +27,6 @@ ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.
ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
#
TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
TUNE_CCARGS += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb"

View File

@ -1,5 +1,5 @@
TUNE_ARCH = "x86_64"
TUNE_PKGARCH = "x86_64"
TARGET_CC_ARCH = "-m64"
TUNE_CCARGS = "-m64"

View File

@ -2,12 +2,12 @@ TUNE_ARCH = "arm"
INHERIT += "siteinfo"
TARGET_CC_ARCH = "-march=armv5te -mtune=xscale"
TUNE_CCARGS = "-march=armv5te -mtune=xscale"
TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale"
TUNE_PKGARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
PACKAGE_EXTRA_ARCHS = "${@['armeb armv4b armv4tb armv5teb', 'arm armv4 armv4t armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
# webkit-gtk has alignment issues with double instructions on armv5 so
# disable them here
TARGET_CC_ARCH_pn-webkit-gtk = "-march=armv4t"
TARGET_CC_ARCH_pn-cairo = "-march=armv4t"
TUNE_CCARGS_pn-webkit-gtk = "-march=armv4t"
TUNE_CCARGS_pn-cairo = "-march=armv4t"