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-22 18:30:06 +0100 |
commit | a2110e86b98d646e136de9ec6b8e668079b0d4f4 (patch) | |
tree | bdcd5466e1fde5e922f20f1e95045a6c2147a125 | |
parent | 9f19d1b90c4fa04439b6267bda0484fd0b350373 (diff) | |
download | openembedded-core-a2110e86b98d646e136de9ec6b8e668079b0d4f4.tar.gz openembedded-core-a2110e86b98d646e136de9ec6b8e668079b0d4f4.tar.bz2 openembedded-core-a2110e86b98d646e136de9ec6b8e668079b0d4f4.zip |
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.
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 # # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS # -PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" +PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" python () { archs = d.getVar('PACKAGE_ARCHS', True).split() sdkarchs = [] for arch in archs: - sdkarchs.append(arch + '-nativesdk') + sdkarchs.append(arch + '-${SDKPKGSUFFIX}') d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) } MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" INHIBIT_DEFAULT_DEPS = "1" -STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" +STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}" -TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}" PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}" -PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}" -PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/" +PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}" +PKGHIST_DIR = "${TMPDIR}/pkghistory/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/" HOST_ARCH = "${SDK_ARCH}" HOST_VENDOR = "${SDK_VENDOR}" @@ -90,8 +90,8 @@ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig" export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" # Cross-canadian packages need to pull in nativesdk dynamic libs -SHLIBSDIRS = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/ ${TMPDIR}/pkgdata/all-${HOST_VENDOR}-${HOST_OS}/shlibs/" -SHLIBSDIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}/shlibs/" +SHLIBSDIRS = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/shlibs/ ${TMPDIR}/pkgdata/all-${HOST_VENDOR}-${HOST_OS}/shlibs/" +SHLIBSDIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}/shlibs/" do_populate_sysroot[stamp-extra-info] = "" 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 () { d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH', True)) } -STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" +STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}" STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" 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" # # Update PACKAGE_ARCH and PACKAGE_ARCHS # -PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" +PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}" # 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" SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}" SDK_PREFIX = "${SDK_SYS}-" SDK_CC_ARCH = "${BUILD_CC_ARCH}" -SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-nativesdk" +SDKPKGSUFFIX = "nativesdk" +SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-${SDKPKGSUFFIX}" SDK_LD_ARCH = "${BUILD_LD_ARCH}" SDK_AS_ARCH = "${BUILD_AS_ARCH}" 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" do_configure () { export CXX="${CXX} -nostdinc++ -nostdlib++" - mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` - target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B} for d in libgcc ${RUNTIMETARGET}; do echo "Configuring $d" @@ -29,7 +29,7 @@ do_configure () { } do_compile () { - target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` for d in libgcc ${RUNTIMETARGET}; do cd ${B}/$target/$d/ oe_runmake MULTIBUILDTOP=${B}/$target/$d/ @@ -37,7 +37,7 @@ do_compile () { } do_install () { - target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` for d in ${RUNTIMETARGET}; do cd ${B}/$target/$d/ 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 = " \ FILES_${PN}-dbg += "${base_libdir}/.debug/" do_configure () { - target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` install -d ${D}${base_libdir} ${D}${libdir} cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B} mkdir -p ${B}/${BPN} @@ -36,13 +36,13 @@ do_configure () { } do_compile () { - target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` cd ${B}/${BPN} oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/ } do_install () { - target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` cd ${B}/${BPN} oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install 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 = " \ FILES_${PN}-dbg += "${base_libdir}/.debug/" do_configure () { - target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` install -d ${D}${base_libdir} ${D}${libdir} cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B} mkdir -p ${B}/${BPN} @@ -36,13 +36,13 @@ do_configure () { } do_compile () { - target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` cd ${B}/${BPN} oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/ } do_install () { - target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` cd ${B}/${BPN} oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install |