summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 09:12:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-23 16:20:12 +0100
commit50170617c632e62aa68e9bbb700fd8290fa4b90e (patch)
tree9d8456a926566080693eda3ffec4a8c64b8c8238
parentb64d6af3ec80d2f4040378c785ffcac415c0827a (diff)
downloadpoky-50170617c632e62aa68e9bbb700fd8290fa4b90e.tar.gz
bitbake.conf/classes/gcc: Don't hardcode -nativesdk
Hardcoding -nativesdk as the sdk package architecture is inflexible. We may have multiple different target OS and we need a way to be able to separate them. Turning this into a configurable value allows the flexibility we need to build different SDKMACHINEs with different OS targets. The commit should have no behaviour change, just makes things more configurable. (From OE-Core rev: a2110e86b98d646e136de9ec6b8e668079b0d4f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/cross-canadian.bbclass16
-rw-r--r--meta/classes/crosssdk.bbclass2
-rw-r--r--meta/classes/nativesdk.bbclass2
-rw-r--r--meta/conf/bitbake.conf3
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-runtime.inc8
-rw-r--r--meta/recipes-devtools/gcc/libgcc_4.7.bb6
-rw-r--r--meta/recipes-devtools/gcc/libgcc_4.8.bb6
7 files changed, 22 insertions, 21 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index fa2ab70a34..87dd9948e7 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -14,25 +14,25 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
14# 14#
15# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS 15# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
16# 16#
17PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" 17PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
18python () { 18python () {
19 archs = d.getVar('PACKAGE_ARCHS', True).split() 19 archs = d.getVar('PACKAGE_ARCHS', True).split()
20 sdkarchs = [] 20 sdkarchs = []
21 for arch in archs: 21 for arch in archs:
22 sdkarchs.append(arch + '-nativesdk') 22 sdkarchs.append(arch + '-${SDKPKGSUFFIX}')
23 d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) 23 d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
24} 24}
25MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" 25MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
26 26
27INHIBIT_DEFAULT_DEPS = "1" 27INHIBIT_DEFAULT_DEPS = "1"
28 28
29STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" 29STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}"
30 30
31TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" 31TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}"
32 32
33PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}" 33PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}"
34PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" 34PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}"
35PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/" 35PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/"
36 36
37HOST_ARCH = "${SDK_ARCH}" 37HOST_ARCH = "${SDK_ARCH}"
38HOST_VENDOR = "${SDK_VENDOR}" 38HOST_VENDOR = "${SDK_VENDOR}"
@@ -90,8 +90,8 @@ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
90export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" 90export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
91 91
92# Cross-canadian packages need to pull in nativesdk dynamic libs 92# Cross-canadian packages need to pull in nativesdk dynamic libs
93SHLIBSDIRS = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/ ${TMPDIR}/pkgdata/all-${HOST_VENDOR}-${HOST_OS}/shlibs/" 93SHLIBSDIRS = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/shlibs/ ${TMPDIR}/pkgdata/all-${HOST_VENDOR}-${HOST_OS}/shlibs/"
94SHLIBSDIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/" 94SHLIBSDIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/shlibs/"
95 95
96do_populate_sysroot[stamp-extra-info] = "" 96do_populate_sysroot[stamp-extra-info] = ""
97 97
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 635c0c45cb..bcc285bdbf 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -7,7 +7,7 @@ python () {
7 d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH', True)) 7 d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH', True))
8} 8}
9 9
10STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" 10STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}"
11STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 11STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
12 12
13TARGET_ARCH = "${SDK_ARCH}" 13TARGET_ARCH = "${SDK_ARCH}"
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 0d5cba4755..26d1e4a3e5 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -11,7 +11,7 @@ CLASSOVERRIDE = "class-nativesdk"
11# 11#
12# Update PACKAGE_ARCH and PACKAGE_ARCHS 12# Update PACKAGE_ARCH and PACKAGE_ARCHS
13# 13#
14PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" 14PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
15PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}" 15PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}"
16 16
17# 17#
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d98fde1583..6f3d9bbd21 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -127,7 +127,8 @@ SDK_VENDOR = "-oesdk"
127SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}" 127SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}"
128SDK_PREFIX = "${SDK_SYS}-" 128SDK_PREFIX = "${SDK_SYS}-"
129SDK_CC_ARCH = "${BUILD_CC_ARCH}" 129SDK_CC_ARCH = "${BUILD_CC_ARCH}"
130SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-nativesdk" 130SDKPKGSUFFIX = "nativesdk"
131SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-${SDKPKGSUFFIX}"
131SDK_LD_ARCH = "${BUILD_LD_ARCH}" 132SDK_LD_ARCH = "${BUILD_LD_ARCH}"
132SDK_AS_ARCH = "${BUILD_AS_ARCH}" 133SDK_AS_ARCH = "${BUILD_AS_ARCH}"
133 134
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
index 977a98a377..f89ca6bbad 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -15,8 +15,8 @@ RUNTIMETARGET = "libssp libstdc++-v3 libgomp"
15 15
16do_configure () { 16do_configure () {
17 export CXX="${CXX} -nostdinc++ -nostdlib++" 17 export CXX="${CXX} -nostdinc++ -nostdlib++"
18 mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` 18 mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
19 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` 19 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
20 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B} 20 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
21 for d in libgcc ${RUNTIMETARGET}; do 21 for d in libgcc ${RUNTIMETARGET}; do
22 echo "Configuring $d" 22 echo "Configuring $d"
@@ -29,7 +29,7 @@ do_configure () {
29} 29}
30 30
31do_compile () { 31do_compile () {
32 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` 32 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
33 for d in libgcc ${RUNTIMETARGET}; do 33 for d in libgcc ${RUNTIMETARGET}; do
34 cd ${B}/$target/$d/ 34 cd ${B}/$target/$d/
35 oe_runmake MULTIBUILDTOP=${B}/$target/$d/ 35 oe_runmake MULTIBUILDTOP=${B}/$target/$d/
@@ -37,7 +37,7 @@ do_compile () {
37} 37}
38 38
39do_install () { 39do_install () {
40 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` 40 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
41 for d in ${RUNTIMETARGET}; do 41 for d in ${RUNTIMETARGET}; do
42 cd ${B}/$target/$d/ 42 cd ${B}/$target/$d/
43 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install 43 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
diff --git a/meta/recipes-devtools/gcc/libgcc_4.7.bb b/meta/recipes-devtools/gcc/libgcc_4.7.bb
index 47669a210c..3b5bb43c00 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.7.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.7.bb
@@ -26,7 +26,7 @@ FILES_libgcov-dev = " \
26FILES_${PN}-dbg += "${base_libdir}/.debug/" 26FILES_${PN}-dbg += "${base_libdir}/.debug/"
27 27
28do_configure () { 28do_configure () {
29 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` 29 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
30 install -d ${D}${base_libdir} ${D}${libdir} 30 install -d ${D}${base_libdir} ${D}${libdir}
31 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B} 31 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
32 mkdir -p ${B}/${BPN} 32 mkdir -p ${B}/${BPN}
@@ -36,13 +36,13 @@ do_configure () {
36} 36}
37 37
38do_compile () { 38do_compile () {
39 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` 39 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
40 cd ${B}/${BPN} 40 cd ${B}/${BPN}
41 oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/ 41 oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/
42} 42}
43 43
44do_install () { 44do_install () {
45 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` 45 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
46 cd ${B}/${BPN} 46 cd ${B}/${BPN}
47 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install 47 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install
48 48
diff --git a/meta/recipes-devtools/gcc/libgcc_4.8.bb b/meta/recipes-devtools/gcc/libgcc_4.8.bb
index 47669a210c..3b5bb43c00 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.8.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.8.bb
@@ -26,7 +26,7 @@ FILES_libgcov-dev = " \
26FILES_${PN}-dbg += "${base_libdir}/.debug/" 26FILES_${PN}-dbg += "${base_libdir}/.debug/"
27 27
28do_configure () { 28do_configure () {
29 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` 29 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
30 install -d ${D}${base_libdir} ${D}${libdir} 30 install -d ${D}${base_libdir} ${D}${libdir}
31 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B} 31 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
32 mkdir -p ${B}/${BPN} 32 mkdir -p ${B}/${BPN}
@@ -36,13 +36,13 @@ do_configure () {
36} 36}
37 37
38do_compile () { 38do_compile () {
39 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` 39 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
40 cd ${B}/${BPN} 40 cd ${B}/${BPN}
41 oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/ 41 oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/
42} 42}
43 43
44do_install () { 44do_install () {
45 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` 45 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
46 cd ${B}/${BPN} 46 cd ${B}/${BPN}
47 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install 47 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install
48 48