First round of tune config file updates
cover First round of tune config file updates
These patches set the scene for the multilib work. I'm posting these first as they're the more invasive changes to the variables the tune files currently expose and are likely the more user visible changes.
The first patch allows multilib to be able to change "/lib" as needed dynamically to variants like "/lib64". Reasons for doing it the way its been done are included in the commit message of the patch.
The second two patches change the tune files to operate on TUNE* variables. This allows some cleanup and simplification of the core and creates a clear namespace for the tune files to operate under.
It does mean that machine support files need to remove any explicit TARGET_ARCH setting and now should always include an appopriate tune file to ensure the TUNE variables are set correctly.
Sanity checks have been added to ensure users are informed when this has not been done.
These should be the only compatibility break multilib requires with the rest of the work involving changes to the tune file internals themselves.
The changes are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rpurdie/ml-stage
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rpurdie/ml-stage
Richard Purdie (3):
bitbake.conf/cross.bbclass: Add ability to dynamically change library
location
conf/machine/tune: Overhaul tune include file variables conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
meta/classes/cross.bbclass | 7 +++-- meta/classes/sanity.bbclass | 10 ++++++-- meta/conf/bitbake.conf | 26 ++++++++++++++------- meta/conf/machine/include/tune-arm1136jf-s.inc | 9 ++++--- meta/conf/machine/include/tune-arm920t.inc | 7 +++-- meta/conf/machine/include/tune-arm926ejs.inc | 10 +++++--- meta/conf/machine/include/tune-arm9tdmi.inc | 7 +++-- meta/conf/machine/include/tune-armv7.inc | 7 +++-- meta/conf/machine/include/tune-atom.inc | 6 +++- meta/conf/machine/include/tune-c3.inc | 8 ++++-- meta/conf/machine/include/tune-cortexa8.inc | 7 +++-- meta/conf/machine/include/tune-cortexm1.inc | 7 +++-- meta/conf/machine/include/tune-cortexm3.inc | 7 +++-- meta/conf/machine/include/tune-cortexr4.inc | 7 +++-- meta/conf/machine/include/tune-ep9312.inc | 7 +++-- meta/conf/machine/include/tune-i586.inc | 6 +++++ meta/conf/machine/include/tune-iwmmxt.inc | 7 +++-- meta/conf/machine/include/tune-mips32.inc | 7 +++-- meta/conf/machine/include/tune-ppc603e.inc | 7 +++-- meta/conf/machine/include/tune-ppce300c2.inc | 6 +++- meta/conf/machine/include/tune-ppce500.inc | 6 +++- meta/conf/machine/include/tune-ppce500mc.inc | 7 +++-- meta/conf/machine/include/tune-ppce500v2.inc | 7 +++-- meta/conf/machine/include/tune-sh3.inc | 7 +++-- meta/conf/machine/include/tune-sh4.inc | 7 +++-- meta/conf/machine/include/tune-strongarm1100.inc | 6 ++++- meta/conf/machine/include/tune-supersparc.inc | 7 +++-- meta/conf/machine/include/tune-thumb.inc | 2 +- meta/conf/machine/include/tune-x86_64.inc | 5 ++++ meta/conf/machine/include/tune-xscale.inc | 10 ++++---- meta/conf/machine/qemuarm.conf | 2 - meta/conf/machine/qemumips.conf | 2 - meta/conf/machine/qemuppc.conf | 2 - meta/conf/machine/qemux86-64.conf | 3 +- meta/conf/machine/qemux86.conf | 4 +-- 35 files changed, 144 insertions(+), 98 deletions(-) create mode 100644 meta/conf/machine/include/tune-i586.inc create mode 100644 meta/conf/machine/include/tune-x86_64.inc
Signature · 1 line
1.7.4.1
PATCH 1/3 bitbake.conf/cross.bbclass: Add ability to dynamically change library location
Add the ability to dynamically change the library directory from "lib" to other values. This allows the tune files to specifiy altnerative ABIs which can be dynamically enabled by the multilib BBCLASSEXTEND code.
A variety of approaches have been attempted with this, the immediate expansions in cross.bbclass being problematic as they are they are expanded before the bbclass extend event hander runs. This approach ensures the ${baselib} variable is retained in the expressions resolving that complication.
Derived from some ideas from Mark Hatle.
--- meta/classes/cross.bbclass | 7 ++++--- meta/conf/bitbake.conf | 15 ++++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-)
meta/classes/cross.bbclass +4 -3
@@ -38,11 +38,12 @@ DEPENDS_GETTEXT = "gettext-native" # Path mangling needed by the cross packaging # Note that we use := here to ensure that libdir and includedir are # target paths. -target_libdir := "${libdir}" -target_includedir := "${includedir}" -target_base_libdir := "${base_libdir}" +target_base_prefix := "${base_prefix}" target_prefix := "${prefix}" target_exec_prefix := "${exec_prefix}" +target_base_libdir = "${target_base_prefix}/${baselib}" +target_libdir = "${target_exec_prefix}/${baselib}" +target_includedir := "${includedir}" # Overrides for paths CROSS_TARGET_SYS_DIR = "${MULTIMACH_TARGET_SYS}"
meta/conf/bitbake.conf +10 -5
@@ -1,6 +1,13 @@ ################################################################## # Standard target filesystem paths. ################################################################## +# +# If changing these values, beware that native/cross/nativesdk bbclass +# files may also need changes to keep in sync. +# + +# Used by multilib code to change the library paths +baselib = "lib" # Path prefixes export base_prefix = ""
@@ -10,7 +17,7 @@ export exec_prefix = "/usr" # Base paths export base_bindir = "${base_prefix}/bin" export base_sbindir = "${base_prefix}/sbin" -export base_libdir = "${base_prefix}/lib" +export base_libdir = "${base_prefix}/${baselib}" # Architecture independent paths export datadir = "${prefix}/share"
@@ -26,13 +33,11 @@ export docdir = "${datadir}/doc" export bindir = "${exec_prefix}/bin" export sbindir = "${exec_prefix}/sbin" export libexecdir = "${exec_prefix}/libexec" -export libdir = "${exec_prefix}/lib" +export libdir = "${exec_prefix}/${baselib}" export includedir = "${exec_prefix}/include" export oldincludedir = "${exec_prefix}/include" -# -# These must match the various bbclass layout definitions -# +# Linkage between native/cross/nativesdk layouts base_bindir_native = "/bin" base_sbindir_native = "/sbin" sysconfdir_native = "/etc"
Signature · 1 line
1.7.4.1
PATCH 2/3 conf/machine/tune: Overhaul tune include file variables
There is currently consideradble confusion over how the tune files operate and how these interact with the rest of the build system. This update/overhaul changes things so the tune files are primarily resonsible for setting:
TUNE_ARCH - What was formerly set as TARGET_ARCH and is the value that represents the architecture we're targetting.
TUNE_PKGARCH - The value that represents the tune confuration that this set of tune parameters results in.
This allows the significant improvement that the core can now always determine the target architecture value, even when TARGET_ARCH needs to be reset to something different and likewise, there is one package architecture variable the core can reference allowing simplification of the BASE_PACKAGE_ARCH, PACKAGE_ARCH and FEED_ARCH variables.
--- meta/classes/sanity.bbclass | 10 +++++++--- meta/conf/bitbake.conf | 7 ++++--- meta/conf/machine/include/tune-arm1136jf-s.inc | 5 +++-- meta/conf/machine/include/tune-arm920t.inc | 5 +++-- meta/conf/machine/include/tune-arm926ejs.inc | 6 ++++-- meta/conf/machine/include/tune-arm9tdmi.inc | 5 +++-- meta/conf/machine/include/tune-armv7.inc | 5 +++-- meta/conf/machine/include/tune-atom.inc | 4 +++- meta/conf/machine/include/tune-c3.inc | 6 ++++-- meta/conf/machine/include/tune-cortexa8.inc | 5 +++-- meta/conf/machine/include/tune-cortexm1.inc | 5 +++-- meta/conf/machine/include/tune-cortexm3.inc | 5 +++-- meta/conf/machine/include/tune-cortexr4.inc | 5 +++-- meta/conf/machine/include/tune-ep9312.inc | 5 +++-- meta/conf/machine/include/tune-i586.inc | 6 ++++++ meta/conf/machine/include/tune-iwmmxt.inc | 5 +++-- meta/conf/machine/include/tune-mips32.inc | 5 +++-- meta/conf/machine/include/tune-ppc603e.inc | 5 +++-- meta/conf/machine/include/tune-ppce300c2.inc | 4 +++- meta/conf/machine/include/tune-ppce500.inc | 4 +++- meta/conf/machine/include/tune-ppce500mc.inc | 5 +++-- meta/conf/machine/include/tune-ppce500v2.inc | 5 +++-- meta/conf/machine/include/tune-sh3.inc | 5 +++-- meta/conf/machine/include/tune-sh4.inc | 5 +++-- meta/conf/machine/include/tune-strongarm1100.inc | 4 ++++ meta/conf/machine/include/tune-supersparc.inc | 5 +++-- meta/conf/machine/include/tune-x86_64.inc | 5 +++++ meta/conf/machine/include/tune-xscale.inc | 4 ++-- meta/conf/machine/qemuarm.conf | 2 -- meta/conf/machine/qemumips.conf | 2 -- meta/conf/machine/qemuppc.conf | 2 -- meta/conf/machine/qemux86-64.conf | 3 +-- meta/conf/machine/qemux86.conf | 4 +--- 33 files changed, 98 insertions(+), 60 deletions(-) create mode 100644 meta/conf/machine/include/tune-i586.inc create mode 100644 meta/conf/machine/include/tune-x86_64.inc
meta/classes/sanity.bbclass +7 -3
@@ -147,9 +147,13 @@ def check_sanity(e): if (LooseVersion(__version__) < LooseVersion(minversion)): messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__) - # Check TARGET_ARCH is set - if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID': - messages = messages + 'Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.\n' + # Check TUNE_ARCH is set + if data.getVar('TUNE_ARCH', e.data, True) == 'INVALID': + messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n' + + # Check TARGET_ARCH is set correctly + if data.getVar('TARGE_ARCH', e.data, False) == '${TUNE_ARCH}': + messages = messages + 'TARGET_ARCH is being overwritten, likely by your MACHINE configuration files.\nPlease use a valid tune configuration file which should set this correctly automatically\nand avoid setting this in the machine configuration. See the OE-Core mailing list for more information.\n' # Check TARGET_OS is set if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
meta/conf/bitbake.conf +4 -3
@@ -81,7 +81,8 @@ HOST_PREFIX = "${TARGET_PREFIX}" HOST_CC_ARCH = "${TARGET_CC_ARCH}" HOST_EXEEXT = "" -TARGET_ARCH = "INVALID" +TUNE_ARCH ??= "INVALID" +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')]}"
@@ -95,9 +96,9 @@ SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), ''] SDK_PREFIX = "${SDK_SYS}-" SDK_CC_ARCH = "${BUILD_CC_ARCH}" -BASE_PACKAGE_ARCH = "${HOST_ARCH}" +BASE_PACKAGE_ARCH = "${TUNE_PKGARCH}" PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" -MACHINE_ARCH = "${@[bb.data.getVar('BASE_PACKAGE_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}" +MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}" PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}" PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" # MACHINE_ARCH shouldn't be included here as a variable dependency
meta/conf/machine/include/tune-arm1136jf-s.inc +3 -2
@@ -1,7 +1,8 @@ +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)]}" -FEED_ARCH = "armv6" -BASE_PACKAGE_ARCH = "armv6" +TUNE_PKGARCH = "armv6" ARM_INSTRUCTION_SET = "${@['thumb','arm'][bb.data.getVar('CPU_FEATURES', d, 1).find('thumb') == -1]}" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6"
meta/conf/machine/include/tune-arm920t.inc +3 -2
@@ -1,4 +1,5 @@ -FEED_ARCH = "armv4t" -BASE_PACKAGE_ARCH = "armv4t" +TUNE_ARCH = "arm" + +TUNE_PKGARCH = "armv4t" TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
meta/conf/machine/include/tune-arm926ejs.inc +4 -2
@@ -1,7 +1,9 @@ -FEED_ARCH = "armv5te" +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" # For gcc 4.x you need: TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s" -BASE_PACKAGE_ARCH = "armv5te" +
meta/conf/machine/include/tune-arm9tdmi.inc +3 -2
@@ -1,4 +1,5 @@ -FEED_ARCH = "armv4t" -BASE_PACKAGE_ARCH = "armv4t" +TUNE_ARCH = "arm" + +TUNE_PKGARCH = "armv4t" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t" TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi"
meta/conf/machine/include/tune-armv7.inc +3 -2
@@ -1,7 +1,8 @@ +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" -FEED_ARCH = "armv7" +TUNE_PKGARCH = "armv7" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7" -BASE_PACKAGE_ARCH = "armv7"
meta/conf/machine/include/tune-atom.inc +3 -1
@@ -1,4 +1,6 @@ -BASE_PACKAGE_ARCH = "core2" +TUNE_ARCH = "i586" + +TUNE_PKGARCH = "core2" TARGET_CC_ARCH = "-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"
meta/conf/machine/include/tune-c3.inc +4 -2
@@ -1,4 +1,6 @@ +TUNE_ARCH = "i586" + +TUNE_PKGARCH = "i586" + TARGET_CC_ARCH = "-march=c3 -mtune=c3" PACKAGE_EXTRA_ARCHS = "i386 i486 i586" -BASE_PACKAGE_ARCH = "i586" -FEED_ARCH = "i586"
meta/conf/machine/include/tune-cortexa8.inc +3 -2
@@ -1,3 +1,5 @@ +TUNE_ARCH = "arm" + # Instead of using -mfpu=vfp[2] we can use -mfpu=neon to make use of gcc intrinsics[1] and vectorize loops with -ftree-vectorize[3] # [1] http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html # [2] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
@@ -8,6 +10,5 @@ TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp # Other potentially useful options #-ftree-vectorize -ffast-math -fno-omit-frame-pointer -FEED_ARCH = "armv7a" -BASE_PACKAGE_ARCH = "armv7a" +TUNE_PKGARCH = "armv7a" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7 armv7a"
meta/conf/machine/include/tune-cortexm1.inc +3 -2
@@ -1,3 +1,4 @@ +TUNE_ARCH = "arm" + TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp" -FEED_ARCH = "armv6" -BASE_PACKAGE_ARCH = "armv6" +TUNE_PKGARCH = "armv6"
meta/conf/machine/include/tune-cortexm3.inc +3 -2
@@ -1,4 +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" -FEED_ARCH = "armv7" -BASE_PACKAGE_ARCH = "armv7" +TUNE_PKGARCH = "armv7"
meta/conf/machine/include/tune-cortexr4.inc +3 -2
@@ -1,4 +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" -FEED_ARCH = "armv7" -BASE_PACKAGE_ARCH = "armv7" +TUNE_PKGARCH = "armv7"
meta/conf/machine/include/tune-ep9312.inc +3 -2
@@ -1,8 +1,9 @@ +TUNE_ARCH = "arm" + TARGET_CC_ARCH = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312" # add "-mfp=maverick" for newer gcc versions > 4.0 #set arch to ep9312 for all generated packages PACKAGE_EXTRA_ARCHS = "arm armv4t ep9312" -BASE_PACKAGE_ARCH = "ep9312" -FEED_ARCH = "ep9312" +TUNE_PKGARCH = "ep9312"
meta/conf/machine/include/tune-i586.inc new file +6 -0
@@ -0,0 +1,6 @@ +TUNE_ARCH = "i586" + +TUNE_PKGARCH = "i586" +TARGET_CC_ARCH = "-m32 -march=i586" + +PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586"
meta/conf/machine/include/tune-iwmmxt.inc +3 -2
@@ -1,7 +1,8 @@ +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" -BASE_PACKAGE_ARCH = "iwmmxt" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te iwmmxt" -FEED_ARCH = "iwmmxt" +TUNE_PKGARCH = "iwmmxt"
meta/conf/machine/include/tune-mips32.inc +3 -2
@@ -1,3 +1,4 @@ +TUNE_ARCH = "mips" + TARGET_CC_ARCH = "-march=mips32" -FEED_ARCH = "${TARGET_ARCH}" -BASE_PACKAGE_ARCH = "${TARGET_ARCH}" +TUNE_PKGARCH = "mips"
meta/conf/machine/include/tune-ppc603e.inc +3 -2
@@ -1,4 +1,5 @@ +TUNE_ARCH = "powerpc" + TARGET_CC_ARCH = "-mcpu=603e -mhard-float" -BASE_PACKAGE_ARCH = "ppc603e" -FEED_ARCH = "ppc603e" +TUNE_PKGARCH = "ppc603e" PACKAGE_EXTRA_ARCHS = "powerpc ppc603e"
meta/conf/machine/include/tune-ppce300c2.inc +3 -1
@@ -1,3 +1,5 @@ +TUNE_ARCH = "powerpc" + TARGET_CC_ARCH = "-mcpu=e300c2 -msoft-float" -BASE_PACKAGE_ARCH = "ppce300" +TUNE_PKGARCH = "ppce300" PACKAGE_EXTRA_ARCHS = "powerpc ppce300"
meta/conf/machine/include/tune-ppce500.inc +3 -1
@@ -1,4 +1,6 @@ +TUNE_ARCH = "powerpc" + TARGET_CC_ARCH = "-mcpu=8540" BASE_PACKAGE_ARCH = "ppce500" -FEED_ARCH = "ppce500" +TUNE_PKGARCH = "ppce500" PACKAGE_EXTRA_ARCHS = "powerpc ppce500"
meta/conf/machine/include/tune-ppce500mc.inc +3 -2
@@ -1,4 +1,5 @@ +TUNE_ARCH = "powerpc" + TARGET_CC_ARCH = "-mcpu=e500mc" -BASE_PACKAGE_ARCH = "ppce500mc" -FEED_ARCH = "ppce500mc" +TUNE_PKGARCH = "ppce500mc" PACKAGE_EXTRA_ARCHS = "powerpc ppce500mc"
meta/conf/machine/include/tune-ppce500v2.inc +3 -2
@@ -1,4 +1,5 @@ +TUNE_ARCH = "powerpc" + TARGET_CC_ARCH = "-mcpu=8548 -mabi=spe -mspe" -BASE_PACKAGE_ARCH = "ppce500v2" -FEED_ARCH = "ppce500v2" +TUNE_PKGARCH = "ppce500v2" PACKAGE_EXTRA_ARCHS = "powerpc ppce500v2"
meta/conf/machine/include/tune-sh3.inc +3 -2
@@ -1,3 +1,4 @@ +TUNE_ARCH = "sh3" + TARGET_CC_ARCH = "-ml -m3" -FEED_ARCH = "sh3" -BASE_PACKAGE_ARCH = "sh3" +TUNE_PKGARCH = "sh3"
meta/conf/machine/include/tune-sh4.inc +3 -2
@@ -1,7 +1,8 @@ +TUNE_ARCH = "sh4" + # NOTE: If you want to optimize to sh4a, conf/machine/include/tune-sh4a.inc. # 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" -FEED_ARCH = "sh4" -BASE_PACKAGE_ARCH = "sh4" +TUNE_PKGARCH = "sh4"
meta/conf/machine/include/tune-strongarm1100.inc +4 -0
@@ -1,3 +1,7 @@ +TUNE_ARCH = "arm" + +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
meta/conf/machine/include/tune-supersparc.inc +3 -2
@@ -1,3 +1,4 @@ +TUNE_ARCH = "sparc" + TARGET_CC_ARCH = "-mcpu=supersparc" -BASE_PACKAGE_ARCH = "supersparc" -FEED_ARCH = "supersparc" +TUNE_PKGARCH = "supersparc"
meta/conf/machine/include/tune-x86_64.inc new file +5 -0
@@ -0,0 +1,5 @@ +TUNE_ARCH = "x86_64" + +TUNE_PKGARCH = "x86_64" +TARGET_CC_ARCH = "-m64" +
meta/conf/machine/include/tune-xscale.inc +2 -2
@@ -1,10 +1,10 @@ -FEED_ARCH = "armv5te" +TUNE_ARCH = "arm" INHERIT += "siteinfo" TARGET_CC_ARCH = "-march=armv5te -mtune=xscale" TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale" -BASE_PACKAGE_ARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}" +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
meta/conf/machine/qemuarm.conf +0 -2
@@ -2,8 +2,6 @@ #@NAME: arm_versaile_926ejs #@DESCRIPTION: arm_versaile_926ejs -TARGET_ARCH = "arm" - require conf/machine/include/qemu.inc require conf/machine/include/tune-arm926ejs.inc #require conf/machine/include/tune-arm1136jf-s.inc
meta/conf/machine/qemumips.conf +0 -2
@@ -2,8 +2,6 @@ #@NAME: mti_malta32_be MIPS #@DESCRIPTION: mti_malta32_be -TARGET_ARCH = "mips" - require conf/machine/include/qemu.inc require conf/machine/include/tune-mips32.inc
meta/conf/machine/qemuppc.conf +0 -2
@@ -2,8 +2,6 @@ #@NAME: qemu PPC Emulator setup #@DESCRIPTION: Machine configuration for running an PPC system under qemu emulation -TARGET_ARCH = "powerpc" - PREFERRED_PROVIDER_virtual/libgl = "mesa-xlib" require conf/machine/include/qemu.inc
meta/conf/machine/qemux86-64.conf +1 -2
@@ -10,6 +10,7 @@ PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite" PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-dri-lite" +require conf/machine/include/tune-x86_64.inc require conf/machine/include/qemu.inc MACHINE_FEATURES += "x86"
@@ -31,5 +32,3 @@ GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d" - -TARGET_CC_ARCH = "-m64"
meta/conf/machine/qemux86.conf +1 -3
@@ -2,13 +2,12 @@ #@NAME: common_pc #@DESCRIPTION: Machine configuration for running a common x86 -TARGET_ARCH = "i586" - PREFERRED_PROVIDER_virtual/libgl = "mesa-dri" PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite" PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-dri-lite" +require conf/machine/include/tune-i586.inc require conf/machine/include/qemu.inc MACHINE_FEATURES += "x86"
@@ -31,4 +30,3 @@ GLIBC_EXTRA_OECONF = "--with-tls" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d" -TARGET_CC_ARCH = "-march=i586"
Signature · 1 line
1.7.4.1
Re: [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables
Quoted 10 lines · Richard Purdie
There is currently consideradble confusion over how the tune files operate and how these interact with the rest of the build system. This update/overhaul changes things so the tune files are primarily resonsible for setting:
TUNE_ARCH- What was formerly set asTARGET_ARCHand is the value that represents the architecture we're targetting.
TUNE_PKGARCH- The value that represents the tune confuration that this set of tune parameters results in.
Quoted 8 lines
This allows the significant improvement that the core can now always determine the target architecture value, even when
TARGET_ARCHneeds to be reset to something different and likewise, there is one package architecture variable the core can reference allowing simplification of theBASE_PACKAGE_ARCH,PACKAGE_ARCHandFEED_ARCHvariables.Signed-off-by Richard Purdie <[email protected]>---
Can you give an example of how this will work for multilib?
- k
Re: [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables
Quoted 18 lines · Kumar Gala
Quoted 16 lines · Richard Purdie
There is currently consideradble confusion over how the tune files operate and how these interact with the rest of the build system. This update/overhaul changes things so the tune files are primarily resonsible for setting:
TUNE_ARCH- What was formerly set asTARGET_ARCHand is the value that represents the architecture we're targetting.
TUNE_PKGARCH- The value that represents the tune confuration that this set of tune parameters results in.This allows the significant improvement that the core can now always determine the target architecture value, even when
TARGET_ARCHneeds to be reset to something different and likewise, there is one package architecture variable the core can reference allowing simplification of theBASE_PACKAGE_ARCH,PACKAGE_ARCHandFEED_ARCHvariables.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Richard Purdie <[email protected]>---
Can you give an example of how this will work for multilib?
These are setting the scene for multilib, it doesn't directly enable it. For an example of the end result see this branch:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mhatle/oe-core/ml
but this isn't in a form suitable for submission yet which is what I'm working towards.
Cheers,
Richard
PATCH 3/3 conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
In reply to Richard PurdieSince 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.
--- meta/conf/bitbake.conf | 4 +++- meta/conf/machine/include/tune-arm1136jf-s.inc | 4 ++-- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 4 ++-- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-armv7.inc | 2 +- meta/conf/machine/include/tune-atom.inc | 2 +- meta/conf/machine/include/tune-c3.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexm1.inc | 2 +- meta/conf/machine/include/tune-cortexm3.inc | 2 +- meta/conf/machine/include/tune-cortexr4.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-i586.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-mips32.inc | 2 +- meta/conf/machine/include/tune-ppc603e.inc | 2 +- meta/conf/machine/include/tune-ppce300c2.inc | 2 +- meta/conf/machine/include/tune-ppce500.inc | 2 +- meta/conf/machine/include/tune-ppce500mc.inc | 2 +- meta/conf/machine/include/tune-ppce500v2.inc | 2 +- meta/conf/machine/include/tune-sh3.inc | 2 +- meta/conf/machine/include/tune-sh4.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-supersparc.inc | 2 +- meta/conf/machine/include/tune-thumb.inc | 2 +- meta/conf/machine/include/tune-x86_64.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 6 +++--- 28 files changed, 34 insertions(+), 32 deletions(-)
meta/conf/bitbake.conf +3 -1
@@ -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}"
meta/conf/machine/include/tune-arm1136jf-s.inc +2 -2
@@ -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]}"
meta/conf/machine/include/tune-arm920t.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-arm926ejs.inc +2 -2
@@ -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"
meta/conf/machine/include/tune-arm9tdmi.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-armv7.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-atom.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-c3.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-cortexa8.inc +1 -1
@@ -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
meta/conf/machine/include/tune-cortexm1.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-cortexm3.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-cortexr4.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-ep9312.inc +1 -1
@@ -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
meta/conf/machine/include/tune-i586.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-iwmmxt.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-mips32.inc +1 -1
@@ -1,4 +1,4 @@ TUNE_ARCH = "mips" -TARGET_CC_ARCH = "-march=mips32" +TUNE_CCARGS = "-march=mips32" TUNE_PKGARCH = "mips"
meta/conf/machine/include/tune-ppc603e.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-ppce300c2.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-ppce500.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-ppce500mc.inc +1 -1
@@ -1,5 +1,5 @@ TUNE_ARCH = "powerpc" -TARGET_CC_ARCH = "-mcpu=e500mc" +TUNE_CCARGS = "-mcpu=e500mc" TUNE_PKGARCH = "ppce500mc" PACKAGE_EXTRA_ARCHS = "powerpc ppce500mc"
meta/conf/machine/include/tune-ppce500v2.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-sh3.inc +1 -1
@@ -1,4 +1,4 @@ TUNE_ARCH = "sh3" -TARGET_CC_ARCH = "-ml -m3" +TUNE_CCARGS = "-ml -m3" TUNE_PKGARCH = "sh3"
meta/conf/machine/include/tune-sh4.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-strongarm1100.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-supersparc.inc +1 -1
@@ -1,4 +1,4 @@ TUNE_ARCH = "sparc" -TARGET_CC_ARCH = "-mcpu=supersparc" +TUNE_CCARGS = "-mcpu=supersparc" TUNE_PKGARCH = "supersparc"
meta/conf/machine/include/tune-thumb.inc +1 -1
@@ -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"
meta/conf/machine/include/tune-x86_64.inc +1 -1
@@ -1,5 +1,5 @@ TUNE_ARCH = "x86_64" TUNE_PKGARCH = "x86_64" -TARGET_CC_ARCH = "-m64" +TUNE_CCARGS = "-m64"
meta/conf/machine/include/tune-xscale.inc +3 -3
@@ -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"
Signature · 1 line
1.7.4.1
Re: [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
Op 22 jul. 2011, om 16:49 heeft Richard Purdie het volgende geschreven:
Quoted 7 lines
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.
So if I'm reading the patch correctly this doesn't result in a behaviour change, it just shuffles the definitions around in preparation for Mark's tune overhaul.
regards,
Koen
Re: [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
Quoted 7 lines · Koen Kooi
Op 22 jul. 2011, om 16:49 heeft Richard Purdie het volgende geschreven:
Quoted 5 lines
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.
Quoted 6 lines
Quoted 2 lines
Whilst this isn't strictly necessary for any current need, its likely good practise to standardise this behaviour.
So if I'm reading the patch correctly this doesn't result in a behaviour change, it just shuffles the definitions around in preparation for Mark's tune overhaul.
Yes.
I'm trying to split the work Mark and I have done into logical chunks we can review and these are the pieces to setup the externally facing variables we need.
I've not yet finished the patches which change the tune files themselves but we have a pretty good idea of what the finished result needs to look like to get all this working which we have experimented and tested with.
Cheers,
Richard
Koen Kooi
Tested-byRe: [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
Op 22 jul. 2011, om 17:11 heeft Richard Purdie het volgende geschreven:
Quoted 17 lines · Koen Kooi
Quoted 7 lines
Op 22 jul. 2011, om 16:49 heeft Richard Purdie het volgende geschreven:
Quoted 5 lines
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.
Quoted 6 lines
Quoted 2 lines
Whilst this isn't strictly necessary for any current need, its likely good practise to standardise this behaviour.
So if I'm reading the patch correctly this doesn't result in a behaviour change, it just shuffles the definitions around in preparation for Mark's tune overhaul.
Yes.
Quoted 7 lines
I'm trying to split the work Mark and I have done into logical chunks we can review and these are the pieces to setup the externally facing variables we need.
I've not yet finished the patches which change the tune files themselves but we have a pretty good idea of what the finished result needs to look like to get all this working which we have experimented and tested with.
After some changes to meta-ti to move aside the tune files in there 'bitbake -e' is functionally the same. So for arm926 and cortexa8:
regards,
Koen
[PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
In reply to Richard PurdieThese changes revolve around the idea of tune features. These are represented by 'flag' strings that are included in the TUNE_FEATURES variable.
Any string included in TUNE_FEATURES should also add a TUNEVALID[<name>] entry so we can know which flags are available in TUNE_FEATURES and have documentation about what the flags do. We will add sanity code to error if flags are listed in TUNE_FEATURES but are not documented in TUNEVALID.
A given tune configuration will want to define one or more predetermined sets of _FEATURE flag lists. These are defined in the form TUNE_FEATURES_tune-<name>. For defined tune configuation, <name> should be added to the AVAILTUNE list so that we can determine what tune configurations are available. Flags cannot be used in this case as with TUNEVALID since its useful to be able to build up tune lists from other TUNE_FEATURES_tune-yyy options.
A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and BASE_LIB_tune-<name> to control the multilib location. All options can be overridden by the distro or local user configuration.
---
meta/conf/bitbake.conf +3 -1
@@ -83,6 +83,8 @@ HOST_EXEEXT = "" TUNE_ARCH ??= "INVALID" TUNE_CCARGS ??= "" +TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" +PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE} ??= "${TARGET_ARCH}" TARGET_ARCH = "${TUNE_ARCH}" TARGET_OS = "INVALID"
@@ -100,7 +102,7 @@ SDK_CC_ARCH = "${BUILD_CC_ARCH}" PACKAGE_ARCH = "${TUNE_PKGARCH}" MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}" -PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}" +PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}" PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" # MACHINE_ARCH shouldn't be included here as a variable dependency # since machine specific packages are handled using multimachine
meta/conf/machine/include/arm/arch-arm.inc renamed from dev/null +1 -0
@@ -0,0 +1 @@ +TUNE_ARCH = "arm"
meta/conf/machine/include/ia32/arch-ia32.inc renamed from dev/null +29 -0
@@ -0,0 +1,29 @@ +# +# IA32 Architecture definition +# + +DEFAULTTUNE = "x86" +TARGET_FPU = "hard" + +# ELF32 ABI +TUNEVALID[m32] = "IA32 ELF32 standard ABI" +TUNECONFLICTS[m32] = "m64" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "i586", "" ,d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}" + +# ELF64 ABI +TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI" +TUNECONFLICT[m64] = "m32" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "x86_64", "" ,d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}" + +# Default Tune configurations +AVAILTUNES += "x86" +TUNE_FEATURES_tune-x86 ?= "m32" +BASE_LIB_tune-x86 = "lib" +PACKAGE_EXTRA_ARCHS_tune-x86 = "x86" + +AVAILTUNES += "x86-64" +TUNE_FEATURES_tune-x86-64 ?= "m64" +BASE_LIB_tune-x86-64 = "lib64" +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
meta/conf/machine/include/mips/arch-mips.inc renamed from dev/null +1 -0
@@ -0,0 +1 @@ +TUNE_ARCH = "mips"
meta/conf/machine/include/powerpc/arch-powerpc.inc renamed from dev/null +1 -0
@@ -0,0 +1 @@ +TUNE_ARCH = "powerpc"
meta/conf/machine/include/tune-arm1136jf-s.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc 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)]}"
meta/conf/machine/include/tune-arm920t.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc TUNE_PKGARCH = "armv4t" TUNE_CCARGS = "-march=armv4t -mtune=arm920t"
meta/conf/machine/include/tune-arm926ejs.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc TUNE_PKGARCH = "armv5te" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te"
meta/conf/machine/include/tune-arm9tdmi.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc TUNE_PKGARCH = "armv4t" PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
meta/conf/machine/include/tune-armv7.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc # valid options for -march: `armv7', `armv7-a', `armv7-r', `armv7-m' # valid option for -mtune: `cortex-a8', `cortex-r4', `cortex-m3', `cortex-m1'
meta/conf/machine/include/tune-atom.inc +2 -7
@@ -1,7 +1,2 @@ -TUNE_ARCH = "i586" - -TUNE_PKGARCH = "core2" -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" +# Atom tunings are the same as core2 for now... +require conf/machine/include/tune-core2.inc
meta/conf/machine/include/tune-c3.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "i586" +require conf/machine/include/ia32/arch-ia32.inc TUNE_PKGARCH = "i586"
meta/conf/machine/include/tune-core2.inc renamed from dev/null +21 -0
@@ -0,0 +1,21 @@ +require conf/machine/include/tune-i586.inc + +DEFAULTTUNE = "core2" +TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "m32", "i686", "x86_64", d)}" +TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "m32", "core2", "core2-64", d)}" + +# Extra tune features +TUNEVALID[core2] = "Enable core2 specific processor optimizations" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "core2", "-march=core2 -msse3 -mtune=generic -mfpmath=sse", "", d)}" + +# Extra tune selections +AVAILTUNES += "core2" +TUNE_FEATURES_tune-core2 ?= "${TUNE_FEATURES_tune-x86} core2" +BASE_LIB_tune-core2 = "lib" +PACKAGE_EXTRA_ARCHS_tune-core2 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586 i686 core2" + +AVAILTUNES += "core2-64" +TUNE_FEATURES_tune-core2-64 ?= "${TUNE_FEATURES_tune-x86-64} core2" +BASE_LIB_tune-core2-64 = "lib64" +PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64} core2-64" +
meta/conf/machine/include/tune-cortexa8.inc +2 -1
@@ -1,4 +1,5 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc + # Instead of using -mfpu=vfp[2] we can use -mfpu=neon to make use of gcc intrinsics[1] and vectorize loops with -ftree-vectorize[3] # [1] http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
meta/conf/machine/include/tune-cortexm1.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc TUNE_CCARGS = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp" TUNE_PKGARCH = "armv6"
meta/conf/machine/include/tune-cortexm3.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc # valid options for -march: `armv7', `armv7-m' TUNE_CCARGS = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
meta/conf/machine/include/tune-cortexr4.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc # valid options for -march: `armv7', `armv7-r' TUNE_CCARGS = "-march=armv7-r -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
meta/conf/machine/include/tune-ep9312.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc TUNE_CCARGS = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312" # add "-mfp=maverick" for newer gcc versions > 4.0
meta/conf/machine/include/tune-i586.inc +12 -3
@@ -1,6 +1,15 @@ -TUNE_ARCH = "i586" +require conf/machine/include/ia32/arch-ia32.inc +DEFAULTTUNE = "i586" TUNE_PKGARCH = "i586" -TUNE_CCARGS = "-m32 -march=i586" -PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586" +# Extra tune features +TUNEVALID[i586] = "Enable i586 specific processor optimizations" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "i586", "-march=i586", "", d)}" + +# Extra tune selections +AVAILTUNES += "i586" +TUNE_FEATURES_tune-i586 ?= "${TUNE_FEATURES_tune-x86} i586" +BASE_LIB_tune-i586 = "lib" +PACKAGE_EXTRA_ARCHS_tune-i586 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586" +
meta/conf/machine/include/tune-iwmmxt.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc # Configurations for the Intel PXA27x Appications Processor Family. # Please use tune-xscale for PXA255/PXA26x based processors.
meta/conf/machine/include/tune-mips32.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "mips" +require conf/machine/include/mips/arch-mips.inc TUNE_CCARGS = "-march=mips32" TUNE_PKGARCH = "mips"
meta/conf/machine/include/tune-ppc603e.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "powerpc" +require conf/machine/include/powerpc/arch-powerpc.inc TUNE_CCARGS = "-mcpu=603e -mhard-float" TUNE_PKGARCH = "ppc603e"
meta/conf/machine/include/tune-ppce300c2.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "powerpc" +require conf/machine/include/powerpc/arch-powerpc.inc TUNE_CCARGS = "-mcpu=e300c2 -msoft-float" TUNE_PKGARCH = "ppce300"
meta/conf/machine/include/tune-ppce500.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "powerpc" +require conf/machine/include/powerpc/arch-powerpc.inc TUNE_CCARGS = "-mcpu=8540" BASE_PACKAGE_ARCH = "ppce500"
meta/conf/machine/include/tune-ppce500mc.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "powerpc" +require conf/machine/include/powerpc/arch-powerpc.inc TUNE_CCARGS = "-mcpu=e500mc" TUNE_PKGARCH = "ppce500mc"
meta/conf/machine/include/tune-ppce500v2.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "powerpc" +require conf/machine/include/powerpc/arch-powerpc.inc TUNE_CCARGS = "-mcpu=8548 -mabi=spe -mspe" TUNE_PKGARCH = "ppce500v2"
meta/conf/machine/include/tune-strongarm1100.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc TUNE_PKGARCH = "arm"
meta/conf/machine/include/tune-x86_64.inc +2 -4
@@ -1,5 +1,3 @@ -TUNE_ARCH = "x86_64" - -TUNE_PKGARCH = "x86_64" -TUNE_CCARGS = "-m64" +require conf/machine/include/ia32/arch-ia32.inc +DEFAULTTUNE = "x86-64"
meta/conf/machine/include/tune-xscale.inc +1 -1
@@ -1,4 +1,4 @@ -TUNE_ARCH = "arm" +require conf/machine/include/arm/arch-arm.inc INHERIT += "siteinfo"
Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
Quoted 15 lines · Richard Purdie
These changes revolve around the idea of tune features. These are represented by 'flag' strings that are included in the
TUNE_FEATURESvariable.Any string included in
TUNE_FEATURESshould also add a TUNEVALID[<name>] entry so we can know which flags are available inTUNE_FEATURESand have documentation about what the flags do. We will add sanity code to error if flags are listed inTUNE_FEATURESbut are not documented in TUNEVALID.A given tune configuration will want to define one or more predetermined sets of
_FEATUREflag lists. These are defined in the form TUNE_FEATURES_tune-<name>. For defined tune configuation, <name> should be added to the AVAILTUNE list so that we can determine what tune configurations are available. Flags cannot be used in this case as with TUNEVALID since its useful to be able to build up tune lists from other TUNE_FEATURES_tune-yyy options.
Quoted 5 lines
A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and BASE_LIB_tune-<name> to control the multilib location. All options can be overridden by the distro or local user configuration.
Signed-off-by Richard Purdie <[email protected]>
As a specific nit, we can't use x86_64 in OVERRIDES (using the normal mechanism need base_contains(...). Can we switch to calling it amd64 ala Debian/Ubuntu? Aside from that, as I told Mark the other day, this looks good to me.
Signature · 2 lines
Tom Rini Mentor Graphics Corporation
Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
Quoted 20 lines · Tom Rini
Quoted 19 lines · Richard Purdie
These changes revolve around the idea of tune features. These are represented by 'flag' strings that are included in the
TUNE_FEATURESvariable.Any string included in
TUNE_FEATURESshould also add a TUNEVALID[<name>] entry so we can know which flags are available inTUNE_FEATURESand have documentation about what the flags do. We will add sanity code to error if flags are listed inTUNE_FEATURESbut are not documented in TUNEVALID.A given tune configuration will want to define one or more predetermined sets of
_FEATUREflag lists. These are defined in the form TUNE_FEATURES_tune-<name>. For defined tune configuation, <name> should be added to the AVAILTUNE list so that we can determine what tune configurations are available. Flags cannot be used in this case as with TUNEVALID since its useful to be able to build up tune lists from other TUNE_FEATURES_tune-yyy options.A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and BASE_LIB_tune-<name> to control the multilib location. All options can be overridden by the distro or local user configuration.
Quoted 7 lines
Quoted 1 line
Signed-off-by Richard Purdie <[email protected]>As a specific nit, we can't use
x86_64in OVERRIDES (using the normal mechanism needbase_contains(...). Can we switch to calling it amd64 ala Debian/Ubuntu? Aside from that, as I told Mark the other day, this looks good to me.
I actually prefer "x86-64" I think that is a reasonable compromise between the x86_64 naming and the need to not use "_".
--Mark
Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
Quoted 23 lines · Mark Hatle
Quoted 22 lines · Tom Rini
Quoted 20 lines · Richard Purdie
These changes revolve around the idea of tune features. These are represented by 'flag' strings that are included in the
TUNE_FEATURESvariable.Any string included in
TUNE_FEATURESshould also add a TUNEVALID[<name>] entry so we can know which flags are available inTUNE_FEATURESand have documentation about what the flags do. We will add sanity code to error if flags are listed inTUNE_FEATURESbut are not documented in TUNEVALID.A given tune configuration will want to define one or more predetermined sets of
_FEATUREflag lists. These are defined in the form TUNE_FEATURES_tune-<name>. For defined tune configuation, <name> should be added to the AVAILTUNE list so that we can determine what tune configurations are available. Flags cannot be used in this case as with TUNEVALID since its useful to be able to build up tune lists from other TUNE_FEATURES_tune-yyy options.A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and BASE_LIB_tune-<name> to control the multilib location. All options can be overridden by the distro or local user configuration.
Signed-off-by Richard Purdie <[email protected]>
Quoted 8 lines
Quoted 5 lines
As a specific nit, we can't use
x86_64in OVERRIDES (using the normal mechanism needbase_contains(...). Can we switch to calling it amd64 ala Debian/Ubuntu? Aside from that, as I told Mark the other day, this looks good to me.I actually prefer "x86-64" I think that is a reasonable compromise between the
x86_64naming and the need to not use "_".
That causes other problems, no? Top of my head would be that deb/ipk doesn't allow a dash in that field. Could be mistaken tho...
Signature · 2 lines
Tom Rini Mentor Graphics Corporation
Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
Quoted 30 lines · Tom Rini
Quoted 29 lines · Mark Hatle
Quoted 27 lines · Tom Rini
Quoted 15 lines · Richard Purdie
These changes revolve around the idea of tune features. These are represented by 'flag' strings that are included in the
TUNE_FEATURESvariable.Any string included in
TUNE_FEATURESshould also add a TUNEVALID[<name>] entry so we can know which flags are available inTUNE_FEATURESand have documentation about what the flags do. We will add sanity code to error if flags are listed inTUNE_FEATURESbut are not documented in TUNEVALID.A given tune configuration will want to define one or more predetermined sets of
_FEATUREflag lists. These are defined in the form TUNE_FEATURES_tune-<name>. For defined tune configuation, <name> should be added to the AVAILTUNE list so that we can determine what tune configurations are available. Flags cannot be used in this case as with TUNEVALID since its useful to be able to build up tune lists from other TUNE_FEATURES_tune-yyy options.Quoted 5 lines
A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and BASE_LIB_tune-<name> to control the multilib location. All options can be overridden by the distro or local user configuration.
Signed-off-by Richard Purdie <[email protected]>As a specific nit, we can't use
x86_64in OVERRIDES (using the normal mechanism needbase_contains(...). Can we switch to calling it amd64 ala Debian/Ubuntu? Aside from that, as I told Mark the other day, this looks good to me.
Quoted 6 lines
Quoted 2 lines
I actually prefer "x86-64" I think that is a reasonable compromise between the
x86_64naming and the need to not use "_".That causes other problems, no? Top of my head would be that deb/ipk doesn't allow a dash in that field. Could be mistaken tho...
I expect the packaging system to have to have change the fields to suite their specific needs. I know I have search/replace items similar to that in RPM because there are constructs that RPM doesn't support that deb and ipk do.
--Mark
Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
In reply to Tom RiniQuoted 6 lines · Tom Rini
Quoted 2 lines · Mark Hatle
I actually prefer "x86-64" I think that is a reasonable compromise between the
x86_64naming and the need to not use "_".That causes other problems, no? Top of my head would be that deb/ipk doesn't allow a dash in that field. Could be mistaken tho...
The package management backend could always rewrite it to something else (under control of the DISTRO if need be, so AMD and Intel folks can each call it their own thing if they want to).
Personally though, I would be tempted just to call it "x64", which is then nicely symmetric with x32 and doesn't seem likely to collide with anything else.
p.
Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
Quoted 8 lines · Phil Blundell
Quoted 6 lines · Tom Rini
Quoted 2 lines · Mark Hatle
I actually prefer "x86-64" I think that is a reasonable compromise between the
x86_64naming and the need to not use "_".That causes other problems, no? Top of my head would be that deb/ipk doesn't allow a dash in that field. Could be mistaken tho...
Quoted 7 lines
The package management backend could always rewrite it to something else (under control of the DISTRO if need be, so AMD and Intel folks can each call it their own thing if they want to).
Personally though, I would be tempted just to call it "x64", which is then nicely symmetric with x32 and doesn't seem likely to collide with anything else.
Yeah, but x32 means something else (not i586, etc) :) My main suggestion is to follow existing conventions, so amd64 since we can't match x86_64 like the RPM world. FWIW, x64 appears to be the MS ABI for this case, so.. not a bad idea?
Signature · 2 lines
Tom Rini Mentor Graphics Corporation
[PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
In reply to Richard Purdie---
meta/conf/bitbake.conf +3 -1
@@ -85,9 +85,11 @@ TUNE_ARCH ??= "INVALID" TUNE_CCARGS ??= "" TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE} ??= "${TARGET_ARCH}" +LIBCEXTENSION ??= "" +ABIEXTENSION ??= "" TARGET_ARCH = "${TUNE_ARCH}" -TARGET_OS = "INVALID" +TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}" 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}-"
meta/conf/distro/include/tclibc-eglibc.inc +1 -4
@@ -2,10 +2,7 @@ # eglibc specific configuration # -TARGET_OS = "linux" -TARGET_OS_arm = "linux-gnueabi" -TARGET_OS_armeb = "linux-gnueabi" -TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}" +LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}" # Add glibc overrides to the overrides for eglibc. OVERRIDES .= ":libc-glibc"
meta/conf/distro/include/tclibc-glibc.inc +1 -4
@@ -2,10 +2,7 @@ # glibc specific configuration # -TARGET_OS = "linux" -TARGET_OS_arm = "linux-gnueabi" -TARGET_OS_armeb = "linux-gnueabi" -TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}" +LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}" # Add glibc to the overrides. OVERRIDES =. "libc-glibc:"
meta/conf/distro/include/tclibc-uclibc.inc +1 -4
@@ -2,10 +2,7 @@ # uclibc specific configuration # -TARGET_OS = "linux-uclibc" -TARGET_OS_arm = "linux-uclibceabi" -TARGET_OS_armeb = "linux-uclibceabi" -TARGET_OS_powerpc = "linux-uclibc${@['','spe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}" +LIBCEXTENSION = "-uclibc" # Add uclibc overrides to the overrides. OVERRIDES =. "libc-uclibc:"
meta/conf/machine/include/arm/arch-arm.inc +2 -0
@@ -1 +1,3 @@ TUNE_ARCH = "arm" + +ABIEXTENSION = "eabi"
meta/conf/machine/include/powerpc/arch-powerpc.inc +2 -0
@@ -1 +1,3 @@ TUNE_ARCH = "powerpc" + +ABIEXTENSION = "${@['','spe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
Re: [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
To try and help preserve my sanity when pulling the various multilib patches together, I've merged these six patches, along with a patch incrementing bitbake's miniumum version requirement for the bb.utils.contains usage.
Cheers,
Richard
Re: [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
Quoted 4 lines · Richard Purdie
To try and help preserve my sanity when pulling the various multilib patches together, I've merged these six patches, along with a patch incrementing bitbake's miniumum version requirement for the bb.utils.contains usage.
FWIW, the bitbake minimum version check (at least in its current form) doesn't buy much in this sort of situation because you get a parse error before the event handler in sanity.bbclass ever runs. I think this happened last time there was a bitbake-affecting change too although I don't recall the details.
Perhaps adding something like:
__sane_bitbake := "${oe.check_bb_version_sanity}"
to the top of bitbake.conf would improve matters, I dunno.
p.
Re: [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
Quoted 12 lines · Phil Blundell
Quoted 4 lines · Richard Purdie
To try and help preserve my sanity when pulling the various multilib patches together, I've merged these six patches, along with a patch incrementing bitbake's miniumum version requirement for the bb.utils.contains usage.
FWIW, the bitbake minimum version check (at least in its current form) doesn't buy much in this sort of situation because you get a parse error before the event handler in sanity.bbclass ever runs. I think this happened last time there was a bitbake-affecting change too although I don't recall the details.
Quoted 5 lines
Perhaps adding something like:
__sane_bitbake:= "${oe.check_bb_version_sanity}"to the top of bitbake.conf would improve matters, I dunno.
Ouch, yes, we probably should do something like this.
Cheers,
Richard
[PATCH 4/3] bitbake.conf/classes: Variable cleanup
In reply to Richard PurdieThis patch removes the variables BASE_PACKAGE_ARCH, BASEPKG_HOST_SYS, BASEPKG_TARGET_SYS and also removes the immediate assignments in several core classes as these are no longer required.
This should make it clearer what some of the core variables do and simplfy some overly complex and confusing class code.
---
meta/classes/allarch.bbclass +0 -1
@@ -2,7 +2,6 @@ # This class is used for architecture independent recipes/data files (usally scripts) # -BASE_PACKAGE_ARCH = "all" PACKAGE_ARCH = "all" # No need for virtual/libc or a cross compiler
meta/classes/cross-canadian.bbclass +5 -8
@@ -9,15 +9,12 @@ # or indirectly via dependency. No need to be in 'world'. EXCLUDE_FROM_WORLD = "1" -STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${OLD_BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" +STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" # # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS # -OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}" -OLD_MULTIMACH_TARGET_SYS := "${MULTIMACH_TARGET_SYS}" -OLD_BASE_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH} -BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" +PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" python () { archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() sdkarchs = []
@@ -66,12 +63,12 @@ target_exec_prefix := "${exec_prefix}" base_prefix = "${SDKPATHNATIVE}" prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" -bindir = "${exec_prefix}/bin/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" +bindir = "${exec_prefix}/bin/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" sbindir = "${bindir}" base_bindir = "${bindir}" base_sbindir = "${bindir}" -libdir = "${exec_prefix}/lib/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" -libexecdir = "${exec_prefix}/libexec/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" +libdir = "${exec_prefix}/lib/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" +libexecdir = "${exec_prefix}/libexec/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" FILES_${PN} = "${prefix}" FILES_${PN}-dbg += "${prefix}/.debug \
meta/classes/cross.bbclass +3 -11
@@ -4,14 +4,6 @@ inherit relocatable # no need for them to be a direct target of 'world' EXCLUDE_FROM_WORLD = "1" -# Save PACKAGE_ARCH before changing HOST_ARCH -OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}" -PACKAGE_ARCH = "${OLD_PACKAGE_ARCH}" -# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it -OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}" -BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}" -BASEPKG_HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}" - PACKAGES = "" HOST_ARCH = "${BUILD_ARCH}"
@@ -20,10 +12,10 @@ HOST_OS = "${BUILD_OS}" HOST_PREFIX = "${BUILD_PREFIX}" HOST_CC_ARCH = "${BUILD_CC_ARCH}" -STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}" +STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}" -export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig" -export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" +export PKG_CONFIG_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig" +export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" CPPFLAGS = "${BUILD_CPPFLAGS}" CFLAGS = "${BUILD_CFLAGS}"
meta/classes/crosssdk.bbclass +2 -2
@@ -1,8 +1,8 @@ inherit cross -BASE_PACKAGE_ARCH = "${SDK_ARCH}" -PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" +PACKAGE_ARCH = "${SDK_ARCH}" STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" +STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" TARGET_ARCH = "${SDK_ARCH}" TARGET_VENDOR = "${SDK_VENDOR}"
meta/classes/native.bbclass +0 -4
@@ -15,10 +15,6 @@ PACKAGE_ARCH = "${BUILD_ARCH}" OECMAKE_RPATH = "${libdir}" OECMAKE_RPATH_virtclass-native = "${libdir}" -BASE_PACKAGE_ARCH = "${BUILD_ARCH}" -BASEPKG_HOST_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}" -BASEPKG_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}" - # When this class has packaging enabled, setting # RPROVIDES becomes unnecessary. RPROVIDES = "${PN}"
meta/classes/nativesdk.bbclass +4 -7
@@ -5,10 +5,9 @@ EXCLUDE_FROM_WORLD = "1" STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" # -# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS +# Update PACKAGE_ARCH and PACKAGE_ARCHS # -OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH} -BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" +PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" python () { archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() sdkarchs = []
@@ -17,10 +16,8 @@ python () { bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) } -#STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" -#STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk" -STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}" -STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}" +STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}" +STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}" HOST_ARCH = "${SDK_ARCH}" HOST_VENDOR = "${SDK_VENDOR}"
meta/classes/sstate.bbclass +3 -3
@@ -22,14 +22,14 @@ python () { if bb.data.inherits_class('native', d): bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d) elif bb.data.inherits_class('cross', d): - bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d) + bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${TUNE_PKGARCH}", d), d) bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${BUILD_ARCH}_${MACHINE}", d), d) elif bb.data.inherits_class('crosssdk', d): - bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d) + bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${PACKAGE_ARCH}", d), d) elif bb.data.inherits_class('nativesdk', d): bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}", d), d) elif bb.data.inherits_class('cross-canadian', d): - bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${BASE_PACKAGE_ARCH}", d), d) + bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${PACKAGE_ARCH}", d), d) else: bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${MACHINE}", d), d)
meta/conf/bitbake.conf +2 -5
@@ -98,8 +98,7 @@ SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), ''] SDK_PREFIX = "${SDK_SYS}-" SDK_CC_ARCH = "${BUILD_CC_ARCH}" -BASE_PACKAGE_ARCH = "${TUNE_PKGARCH}" -PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" +PACKAGE_ARCH = "${TUNE_PKGARCH}" MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}" PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}" PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
@@ -109,8 +108,6 @@ PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH" MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" -BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" -BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" # select proper CPU to get binary locales generated QEMU_OPTIONS = ""
@@ -317,7 +314,7 @@ STAGING_DIR = "${TMPDIR}/sysroots" STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}" STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}" STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts" -STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_TARGET_SYS}" +STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}" STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}" STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
meta/recipes-graphics/xorg-font/font-util_1.2.0.bb +0 -2
@@ -8,8 +8,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c0067273d90f6336008cb2504e14bd32 \ file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \ file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34" -PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" - DEPENDS = "encodings util-macros" DEPENDS_virtclass-native = "util-macros-native" RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"