diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-22 09:12:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-23 16:20:12 +0100 |
commit | 50170617c632e62aa68e9bbb700fd8290fa4b90e (patch) | |
tree | 9d8456a926566080693eda3ffec4a8c64b8c8238 | |
parent | b64d6af3ec80d2f4040378c785ffcac415c0827a (diff) | |
download | poky-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.bbclass | 16 | ||||
-rw-r--r-- | meta/classes/crosssdk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/nativesdk.bbclass | 2 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 3 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-runtime.inc | 8 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/libgcc_4.7.bb | 6 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/libgcc_4.8.bb | 6 |
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 | # |
17 | PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" | 17 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" |
18 | python () { | 18 | python () { |
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 | } |
25 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" | 25 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" |
26 | 26 | ||
27 | INHIBIT_DEFAULT_DEPS = "1" | 27 | INHIBIT_DEFAULT_DEPS = "1" |
28 | 28 | ||
29 | STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" | 29 | STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}" |
30 | 30 | ||
31 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" | 31 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}" |
32 | 32 | ||
33 | PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}" | 33 | PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}" |
34 | PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" | 34 | PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}" |
35 | PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/" | 35 | PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/" |
36 | 36 | ||
37 | HOST_ARCH = "${SDK_ARCH}" | 37 | HOST_ARCH = "${SDK_ARCH}" |
38 | HOST_VENDOR = "${SDK_VENDOR}" | 38 | HOST_VENDOR = "${SDK_VENDOR}" |
@@ -90,8 +90,8 @@ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig" | |||
90 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" | 90 | export 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 |
93 | SHLIBSDIRS = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/ ${TMPDIR}/pkgdata/all-${HOST_VENDOR}-${HOST_OS}/shlibs/" | 93 | SHLIBSDIRS = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/shlibs/ ${TMPDIR}/pkgdata/all-${HOST_VENDOR}-${HOST_OS}/shlibs/" |
94 | SHLIBSDIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/" | 94 | SHLIBSDIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/shlibs/" |
95 | 95 | ||
96 | do_populate_sysroot[stamp-extra-info] = "" | 96 | do_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 | ||
10 | STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" | 10 | STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}" |
11 | STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" | 11 | STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" |
12 | 12 | ||
13 | TARGET_ARCH = "${SDK_ARCH}" | 13 | TARGET_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 | # |
14 | PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" | 14 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" |
15 | PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}" | 15 | PACKAGE_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" | |||
127 | SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}" | 127 | SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}" |
128 | SDK_PREFIX = "${SDK_SYS}-" | 128 | SDK_PREFIX = "${SDK_SYS}-" |
129 | SDK_CC_ARCH = "${BUILD_CC_ARCH}" | 129 | SDK_CC_ARCH = "${BUILD_CC_ARCH}" |
130 | SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-nativesdk" | 130 | SDKPKGSUFFIX = "nativesdk" |
131 | SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-${SDKPKGSUFFIX}" | ||
131 | SDK_LD_ARCH = "${BUILD_LD_ARCH}" | 132 | SDK_LD_ARCH = "${BUILD_LD_ARCH}" |
132 | SDK_AS_ARCH = "${BUILD_AS_ARCH}" | 133 | SDK_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 | ||
16 | do_configure () { | 16 | do_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 | ||
31 | do_compile () { | 31 | do_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 | ||
39 | do_install () { | 39 | do_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 = " \ | |||
26 | FILES_${PN}-dbg += "${base_libdir}/.debug/" | 26 | FILES_${PN}-dbg += "${base_libdir}/.debug/" |
27 | 27 | ||
28 | do_configure () { | 28 | do_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 | ||
38 | do_compile () { | 38 | do_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 | ||
44 | do_install () { | 44 | do_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 = " \ | |||
26 | FILES_${PN}-dbg += "${base_libdir}/.debug/" | 26 | FILES_${PN}-dbg += "${base_libdir}/.debug/" |
27 | 27 | ||
28 | do_configure () { | 28 | do_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 | ||
38 | do_compile () { | 38 | do_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 | ||
44 | do_install () { | 44 | do_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 | ||