]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake.conf/tune files: Adjust PACKAGE_EXTEA_ARCHS
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Mar 2011 20:11:17 +0000 (20:11 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Mar 2011 17:40:21 +0000 (17:40 +0000)
There is a problem with the current PACKAGE_EXTRA_ARCHS implementation
since its impossible to control which extra architectures sort higher
than TARGET_ARCH and which sort lower. In the x86 case for example,
TARGET_ARCH might be "i586", i486 should be lower than this and i686 should
be higher. There are also complications where its easy to inject duplicate
entries into the variable.

I tried various versions of this patch and concluded that it was simplest
just to force the tune files to include TARGET_ARCH in the list in the
right place if they're planning to customise it themselves. Other approaches
with appends and prepends just complicated the code for no good reason.

The TARGET_ARCH definitions should also move to the tune files but I'll
leave this for a separate patch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
15 files changed:
meta/conf/bitbake.conf
meta/conf/machine/include/tune-arm1136jf-s.inc
meta/conf/machine/include/tune-arm920t.inc
meta/conf/machine/include/tune-arm926ejs.inc
meta/conf/machine/include/tune-arm9tdmi.inc
meta/conf/machine/include/tune-armv7.inc
meta/conf/machine/include/tune-atom.inc
meta/conf/machine/include/tune-c3.inc
meta/conf/machine/include/tune-cortexa8.inc
meta/conf/machine/include/tune-ep9312.inc
meta/conf/machine/include/tune-iwmmxt.inc
meta/conf/machine/include/tune-ppc603e.inc
meta/conf/machine/include/tune-ppce300c2.inc
meta/conf/machine/include/tune-ppce500.inc
meta/conf/machine/include/tune-xscale.inc

index 2cd115dfa0b1081264456017bcd117dbab4a5845..4108e2e1153ebf2d83abfa01e164b2e342e3ea33 100644 (file)
@@ -94,7 +94,8 @@ BASE_PACKAGE_ARCH = "${HOST_ARCH}"
 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))]}"
 MACHINE_ARCH_qemux86-64 = "qemux86_64"
-PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
+PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}"
+PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
 # MACHINE shouldn't be included here as a variable dependency since machine specific 
 # packages are handled using multimachine
 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
index a7717510e60b09857c8928058df3af9079889482..2ea3c9d7926325d273ccf05c236cd6b50d3710b1 100644 (file)
@@ -4,6 +4,6 @@ FEED_ARCH = "armv6"
 BASE_PACKAGE_ARCH = "armv6"
 
 ARM_INSTRUCTION_SET = "${@['thumb','arm'][bb.data.getVar('CPU_FEATURES', d, 1).find('thumb') == -1]}"
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6"
+PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6"
 
 require conf/machine/include/tune-thumb.inc
index fee5c586c9ee56a17ae06f5b68507baea1f92444..564b5572aaa2ff514d2eb5a5796bae3b852f0eb4 100644 (file)
@@ -1,4 +1,4 @@
 FEED_ARCH = "armv4t"
 BASE_PACKAGE_ARCH = "armv4t" 
 TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t"
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t"
+PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
index f41e460999eec0b482901bfec5f135c60f2e1497..9d546c9fda713719f5501bf91667fad9e750122a 100644 (file)
@@ -1,5 +1,5 @@
 FEED_ARCH = "armv5te"
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t 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:
index d788b5304f869a420d570111337859c88ba6e3fd..5446ce8eccf26f001563c6955f6ae71226f78ff4 100644 (file)
@@ -1,4 +1,4 @@
 FEED_ARCH = "armv4t"
 BASE_PACKAGE_ARCH = "armv4t"
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t"
+PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
 TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi"
index 379a3eb011dfcb50373746611c5aebf51beda226..979d6fedb720968f573799d122ea1de3e1bf64a9 100644 (file)
@@ -3,5 +3,5 @@
 # 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"
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6 armv7"
+PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7"
 BASE_PACKAGE_ARCH = "armv7"
index 2b4907fa3c8e1b4a1c72f4da00a8c7b17cd11f38..668d0280bd3301e834ae864867d47c4e0e696dd5 100644 (file)
@@ -2,7 +2,7 @@ BASE_PACKAGE_ARCH = "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"
 
-PACKAGE_EXTRA_ARCHS += "x86 i386 i486 core2"
+PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586 i686 core2"
 
 # Work around a gcc bug for core2 which caused matchbox-panel to segfault
 # and possibly others.
index 1d636e89c60a549db061df18ee2eea1a1588e633..d33df5f1e32224fd49c4c745ee813ae76fd608df 100644 (file)
@@ -1,4 +1,4 @@
 TARGET_CC_ARCH = "-march=c3 -mtune=c3"
-PACKAGE_EXTRA_ARCHS += "i386 i486 i586"
+PACKAGE_EXTRA_ARCHS = "i386 i486 i586"
 BASE_PACKAGE_ARCH = "i586"
 FEED_ARCH = "i586"
index 3ec1c03500bfe91f4b8223eb6152dbb8a516d4a7..a5b982ab78ff0c55fd6c60f2f6b9ec3cd9be6100 100644 (file)
@@ -10,4 +10,4 @@ TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
 
 FEED_ARCH = "armv7a"
 BASE_PACKAGE_ARCH = "armv7a"
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6 armv7 armv7a"
+PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7 armv7a"
index d0c5bb2e989166af3569c35b93104b8bfd910bd7..e1515a01a86ae7d6b3cb16e97d280d723248c028 100644 (file)
@@ -2,7 +2,7 @@ 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 += "armv4t ep9312"
+PACKAGE_EXTRA_ARCHS = "arm armv4t ep9312"
 BASE_PACKAGE_ARCH = "ep9312"
 FEED_ARCH = "ep9312"
 
index f7291be805203e03f139e335243025071d502e6d..7191ab0b3638c1c565a7568b1964b9633305b1e2 100644 (file)
@@ -2,6 +2,6 @@
 # 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 += "armv4 armv4t armv5te iwmmxt"
+PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te iwmmxt"
 FEED_ARCH = "iwmmxt"
 
index 15a72d10a187a1b153d6d11bdb62ab25c092ecec..dc95d0d77d7d29a849850dd5f87857b4f74b04f4 100644 (file)
@@ -1,4 +1,4 @@
 TARGET_CC_ARCH = "-mcpu=603e  -mhard-float"
 BASE_PACKAGE_ARCH = "ppc603e"
 FEED_ARCH = "ppc603e"
-PACKAGE_EXTRA_ARCHS += "ppc603e"
+PACKAGE_EXTRA_ARCHS = "powerpc ppc603e"
index 2956875186092f74c542b33260a2f715578c286d..3e552e60d600dcee4054172cd4b10e3583b1a19f 100644 (file)
@@ -1,3 +1,3 @@
 TARGET_CC_ARCH = "-mcpu=e300c2 -msoft-float"
 BASE_PACKAGE_ARCH = "ppce300"
-PACKAGE_EXTRA_ARCHS += "ppce300"
+PACKAGE_EXTRA_ARCHS = "powerpc ppce300"
index 44f8742f9ff8b6593adb2be954b1ffb56f600cf6..45e1f0d494ffe9b02f676c6991561b957434961f 100644 (file)
@@ -1,4 +1,4 @@
 TARGET_CC_ARCH = "-mcpu=8540"
 BASE_PACKAGE_ARCH = "ppce500"
 FEED_ARCH = "ppce500"
-PACKAGE_EXTRA_ARCHS += "ppce500"
+PACKAGE_EXTRA_ARCHS = "powerpc ppce500"
index f1ef3d46afa607bde4ad9a98ac499a6ea0fa591e..cfdcc99434f56b794d065c9c3def647ea28dac8c 100644 (file)
@@ -5,7 +5,7 @@ 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']}"
-PACKAGE_EXTRA_ARCHS += "${@['armv4b armv4tb armv5teb', 'armv4 armv4t 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