summaryrefslogtreecommitdiff
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-02 14:35:08 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 14:35:08 +0100
commit061df5abaf727741b11c05db2c47e2778f96d96e (patch)
treea79062441b0bd9564320c951cc330a268b28994e /meta/packages
parent4e0ee648b4c18b770aba11921370258f3e2aaeef (diff)
downloadopenembedded-core-061df5abaf727741b11c05db2c47e2778f96d96e.tar.gz
openembedded-core-061df5abaf727741b11c05db2c47e2778f96d96e.tar.bz2
openembedded-core-061df5abaf727741b11c05db2c47e2778f96d96e.zip
meta-toolchain: Improve layout
* Switch from /usr/local/poky to /opt/poky * Use a sysroots directory for both the "native" sdk binaries and the target * Drop the meta-toolchain extras packages. These are replaced with packaged-staging. * Change the nativesdk layout to match our usual filesystem layout * Clean up various hardcoded prefix references Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/gcc/gcc-crosssdk-initial.inc4
-rw-r--r--meta/packages/gcc/gcc-crosssdk-intermediate.inc4
-rw-r--r--meta/packages/gcc/gcc-crosssdk.inc4
-rw-r--r--meta/packages/meta/meta-toolchain.bb92
4 files changed, 38 insertions, 66 deletions
diff --git a/meta/packages/gcc/gcc-crosssdk-initial.inc b/meta/packages/gcc/gcc-crosssdk-initial.inc
index 4b8346b004..794a953472 100644
--- a/meta/packages/gcc/gcc-crosssdk-initial.inc
+++ b/meta/packages/gcc/gcc-crosssdk-initial.inc
@@ -1,7 +1,7 @@
inherit crosssdk
-SYSTEMHEADERS = "${SDKPATH}/include"
-SYSTEMLIBS1 = "${SDKPATH}/lib/"
+SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
+SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native"
PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial-crosssdk"
diff --git a/meta/packages/gcc/gcc-crosssdk-intermediate.inc b/meta/packages/gcc/gcc-crosssdk-intermediate.inc
index 6034360050..5b88d33139 100644
--- a/meta/packages/gcc/gcc-crosssdk-intermediate.inc
+++ b/meta/packages/gcc/gcc-crosssdk-intermediate.inc
@@ -1,7 +1,7 @@
inherit crosssdk
-SYSTEMHEADERS = "${SDKPATH}/include"
-SYSTEMLIBS1 = "${SDKPATH}/lib/"
+SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
+SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native"
DEPENDS += "virtual/${TARGET_PREFIX}libc-initial-nativesdk"
diff --git a/meta/packages/gcc/gcc-crosssdk.inc b/meta/packages/gcc/gcc-crosssdk.inc
index e2252bbfce..be2d0b0a28 100644
--- a/meta/packages/gcc/gcc-crosssdk.inc
+++ b/meta/packages/gcc/gcc-crosssdk.inc
@@ -1,7 +1,7 @@
inherit crosssdk
-SYSTEMHEADERS = "${SDKPATH}/include"
-SYSTEMLIBS1 = "${SDKPATH}/lib/"
+SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
+SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
GCCMULTILIB = "--disable-multilib"
diff --git a/meta/packages/meta/meta-toolchain.bb b/meta/packages/meta/meta-toolchain.bb
index 9ae5554eaa..43b4f027c4 100644
--- a/meta/packages/meta/meta-toolchain.bb
+++ b/meta/packages/meta/meta-toolchain.bb
@@ -6,11 +6,12 @@ inherit meta
SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
-SDK_OUTPUT2 = "${SDK_DIR}/image-extras"
SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
+SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
+
IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
-IPKG_TARGET = "opkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}"
+IPKG_TARGET = "opkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
TOOLCHAIN_TARGET_TASK ?= "task-poky-standalone-sdk-target task-poky-standalone-sdk-target-dbg"
@@ -22,10 +23,9 @@ EXCLUDE_FROM_WORLD = "1"
do_populate_sdk() {
rm -rf ${SDK_OUTPUT}
- rm -rf ${SDK_OUTPUT2}
mkdir -p ${SDK_OUTPUT}
mkdir -p ${SDK_OUTPUT}${libdir}/opkg/
- mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}${libdir}/opkg/
+ mkdir -p ${SDK_OUTPUT}/${SDKTARGETSYSROOT}${libdir}/opkg/
rm -f ${IPKGCONF_TARGET}
touch ${IPKGCONF_TARGET}
@@ -45,58 +45,32 @@ do_populate_sdk() {
${IPKG_TARGET} update
${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
- install -d ${SDK_OUTPUT}/${SDKPATH}/usr/lib/opkg
- mv ${SDK_OUTPUT}/usr/lib/opkg/* ${SDK_OUTPUT}/${SDKPATH}/usr/lib/opkg/
- rm -Rf ${SDK_OUTPUT}/usr/lib
+ install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/opkg
+ mv ${SDK_OUTPUT}/usr/lib/opkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/opkg/
+ rm -Rf ${SDK_OUTPUT}/usr
# Don't ship any libGL in the SDK
- rm -rf ${SDK_OUTPUT}/${SDKPATH}/usr/lib/libGL*
-
- install -d ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}
- install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/
-
- install -d ${SDK_OUTPUT}/${SDKPATH}/${sysconfdir}
- install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${sysconfdir}/
-
- # extract and store ipks, pkgdata and shlibs data
- target_pkgs=`cat ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/usr/lib/opkg/status | grep Package: | cut -f 2 -d ' '`
- mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/ipk/
- mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/pkgdata/runtime/
- mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/${TARGET_SYS}/shlibs/
- for pkg in $target_pkgs ; do
- for arch in $revipkgarchs; do
- pkgnames=${DEPLOY_DIR_IPK}/$arch/${pkg}_*_$arch.ipk
- if [ -e $pkgnames ]; then
- echo "Found $pkgnames"
- cp $pkgnames ${SDK_OUTPUT2}/${SDKPATH}/ipk/
- orig_pkg=`opkg-list-fields $pkgnames | grep OE: | cut -d ' ' -f2`
- pkg_subdir=$arch${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}
- mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/pkgdata/$pkg_subdir/runtime
- cp ${TMPDIR}/pkgdata/$pkg_subdir/$orig_pkg ${SDK_OUTPUT2}/${SDKPATH}/pkgdata/$pkg_subdir/
- subpkgs=`cat ${TMPDIR}/pkgdata/$pkg_subdir/$orig_pkg | grep PACKAGES: | cut -b 10-`
- for subpkg in $subpkgs; do
- cp ${TMPDIR}/pkgdata/$pkg_subdir/runtime/$subpkg ${SDK_OUTPUT2}/${SDKPATH}/pkgdata/$pkg_subdir/runtime/
- if [ -e ${TMPDIR}/pkgdata/$pkg_subdir/runtime/$subpkg.packaged ];then
- cp ${TMPDIR}/pkgdata/$pkg_subdir/runtime/$subpkg.packaged ${SDK_OUTPUT2}/${SDKPATH}/pkgdata/$pkg_subdir/runtime/
- fi
- if [ -e ${STAGING_DIR_TARGET}/shlibs/$subpkg.list ]; then
- cp ${STAGING_DIR_TARGET}/shlibs/$subpkg.* ${SDK_OUTPUT2}/${SDKPATH}/${TARGET_SYS}/shlibs/
- fi
- done
- break
- fi
- done
- done
+ rm -rf ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/libGL*
+
+ install -d ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/${sysconfdir}
+ install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/${sysconfdir}/
+
+ install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}
+ install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}/
+
+ # Can copy pstage files here
+ # target_pkgs=`cat ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/usr/lib/opkg/status | grep Package: | cut -f 2 -d ' '`
# Fix or remove broken .la files
- for i in `find ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS} -name \*.la`; do
- sed -i -e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1${SDKPATH}/${TARGET_SYS}${base_libdir},g" \
- -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${SDKPATH}/${TARGET_SYS}${libdir},g" \
- -e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1${SDKPATH}/${TARGET_SYS}${base_libdir},g" \
- -e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1${SDKPATH}/${TARGET_SYS}${libdir},g" \
+ for i in `find ${SDK_OUTPUT}/${SDKTARGETSYSROOT} -name \*.la`; do
+ sed -i -e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1${SDKTARGETSYSROOT}${base_libdir},g" \
+ -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${SDKTARGETSYSROOT}${libdir},g" \
+ -e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1${SDKTARGETSYSROOT}${base_libdir},g" \
+ -e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1${SDKTARGETSYSROOT}${libdir},g" \
-e 's/^installed=yes$/installed=no/' $i
done
- rm -f ${SDK_OUTPUT}/${SDKPATH}/lib/*.la
+ #rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}/lib/*.la
+ rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
# Setup site file for external use
siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${TARGET_SYS}
@@ -108,21 +82,21 @@ do_populate_sdk() {
# Create environment setup script
script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${TARGET_SYS}
touch $script
- echo 'export PATH=${SDKPATH}/bin:$PATH' >> $script
- echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKPATH}/${TARGET_SYS}' >> $script
- echo 'export PKG_CONFIG_PATH=${SDKPATH}/${TARGET_SYS}${libdir}/pkgconfig' >> $script
+ echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
+ echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
+ echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-${TARGET_SYS}' >> $script
echo 'export CC=${TARGET_PREFIX}gcc' >> $script
echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux"' >> $script
if [ "${TARGET_OS}" = "darwin8" ]; then
- echo 'export TARGET_CFLAGS="-I${SDKPATH}/${TARGET_SYS}${includedir}"' >> $script
- echo 'export TARGET_LDFLAGS="-L${SDKPATH}/${TARGET_SYS}${libdir}"' >> $script
+ echo 'export TARGET_CFLAGS="-I${SDKTARGETSYSROOT}${includedir}"' >> $script
+ echo 'export TARGET_LDFLAGS="-L${SDKTARGETSYSROOT}${libdir}"' >> $script
# Workaround darwin toolchain sysroot path problems
- cd ${SDK_OUTPUT}${SDKPATH}/${TARGET_SYS}/usr
+ cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
ln -s /usr/local local
fi
- echo "alias opkg='LD_LIBRARY_PATH=${SDKPATH}/lib ${SDKPATH}/bin/opkg-cl -f ${SDKPATH}/${sysconfdir}/opkg-sdk.conf -o ${SDKPATH}'" >> $script
- echo "alias opkg-target='LD_LIBRARY_PATH=${SDKPATH}/lib ${SDKPATH}/bin/opkg-cl -f ${SDKPATH}/${TARGET_SYS}${sysconfdir}/opkg.conf -o ${SDKPATH}/${TARGET_SYS}'" >> $script
+ echo "alias opkg='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKPATHNATIVE}/${sysconfdir}/opkg-sdk.conf -o ${SDKPATHNATIVE}'" >> $script
+ echo "alias opkg-target='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKTARGETSYSROOT}${sysconfdir}/opkg.conf -o ${SDKTARGETSYSROOT}'" >> $script
# Add version information
versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${TARGET_SYS}
@@ -136,8 +110,6 @@ do_populate_sdk() {
mkdir -p ${SDK_DEPLOY}
cd ${SDK_OUTPUT}
fakeroot tar cfj ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
- cd ${SDK_OUTPUT2}
- fakeroot tar cfj ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}-extras.tar.bz2 .
}
do_populate_sdk[nostamp] = "1"