Skip to contentSkip to conversation

meta-toolchain: use MULTIMACH_TARGET_SYS instead of TARGET_SYS

RFC PATCH In review Koen Kooi 4 participants 14 messages Apr 21, 2010 – Apr 30, 2010

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

RFC PATCH 1/1 meta-toolchain: use MULTIMACH_TARGET_SYS instead of TARGET_SYS

From: Koen Kooi <[email protected]>

This is the first step to be able to mix multiple arm archs (and ABIs) when installing multiple SDKs on one buildhost (e.g. armv4 and armv7a).

---
 recipes/meta/meta-toolchain.bb |   50 ++++++++++++++++++++--------------------
 1 files changed, 25 insertions(+), 25 deletions(-)
recipes/meta/meta-toolchain.bb +25 -25
index adc057a..2e2196a 100644
@@ -10,7 +10,7 @@ SDK_OUTPUT2 = "${SDK_DIR}/image-extras"
 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
 
 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}/${SDKPATH}/${MULTIMACH_TARGET_SYS}"
 
 TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
 TOOLCHAIN_TARGET_TASK ?= "task-sdk-bare"
@@ -26,14 +26,14 @@ RDEPENDS = "${DISTRO_FEED_CONFIGS} ${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TAS
 TOOLCHAIN_FEED_URI ?= "${DISTRO_FEED_URI}"
 
 modify_opkg_conf () {
-        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg.conf"
-        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
+        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg.conf"
+        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
         OUTPUT_OPKGCONF_SDK="${SDK_OUTPUT}/${sysconfdir}/opkg-sdk.conf"
         rm -f ${OUTPUT_OPKGCONF_TARGET}
         rm -f ${OUTPUT_OPKGCONF_HOST}
         rm -f ${OUTPUT_OPKGCONF_SDK}
 
-        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
+        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
             echo "Creating empty opkg.conf since arch.conf is already present"
             echo > ${OUTPUT_OPKGCONF_TARGET} 
         else
@@ -53,7 +53,7 @@ do_populate_sdk() {
 	rm -rf ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}${libdir}/opkg/
-	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}${libdir}/opkg/
+	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}${libdir}/opkg/
 
 	package_generate_ipkg_conf
 
@@ -79,17 +79,17 @@ do_populate_sdk() {
 	# Clean up empty directories from excluded packages
 	find ${SDK_OUTPUT} -depth -type d -empty -print0 | xargs -r0 /bin/rmdir
 
-	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}/${MULTIMACH_TARGET_SYS}/${sysconfdir}
+	install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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 ' '`
+	target_pkgs=`cat ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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/
+	mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 	for pkg in $target_pkgs ; do
 		for arch in $revipkgarchs; do
 			pkgnames=${DEPLOY_DIR_IPK}/$arch/${pkg}_*_$arch.ipk
@@ -107,7 +107,7 @@ do_populate_sdk() {
 						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/
+						cp ${STAGING_DIR_TARGET}/shlibs/$subpkg.* ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 					fi
 				done
 				break
@@ -119,20 +119,20 @@ do_populate_sdk() {
 	# libgcc-dev should be responsible for that, but it's not getting built
 	# RP: it gets smashed up depending on the order that gcc, gcc-cross and 
 	# gcc-cross-sdk get built :( (30/11/07)
-	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/lib/libgcc_s.so
+	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/lib/libgcc_s.so
 
 	# With sysroot support, gcc expects the default C++ headers to be
 	# in a specific place.
-	install -d ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include
-	mv ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/usr/include/c++ \
-		${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include/
+	install -d ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include/
 
 	# 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\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
+	for i in `find ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS} -name \*.la`; do
+		sed -i 	-e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
 			-e 's/^installed=yes$/installed=no/' $i
 	done
 	rm -f ${SDK_OUTPUT}/${SDKPATH}/lib/*.la
@@ -148,15 +148,15 @@ do_populate_sdk() {
 	script=${SDK_OUTPUT}/${SDKPATH}/environment-setup
 	touch $script
 	echo 'export SDK_PATH=${SDKPATH}' >> $script
-	echo 'export TARGET_SYS=${TARGET_SYS}' >> $script
+	echo 'export MULTIMACH_TARGET_SYS=${MULTIMACH_TARGET_SYS}' >> $script
 	echo 'export PATH=$SDK_PATH/bin:$PATH' >> $script
-	echo 'export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH' >> $script
-	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS${libdir}/pkgconfig' >> $script
+	echo 'export CPATH=$SDK_PATH/$MULTIMACH_TARGET_SYS/usr/include:$CPATH' >> $script
+	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS${libdir}/pkgconfig' >> $script
 	echo 'export CONFIG_SITE=$SDK_PATH/site-config' >> $script
 	echo 'alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/${sysconfdir}/opkg-sdk.conf -o $SDK_PATH"' >> $script
-	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$TARGET_SYS"' >> $script
+	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$MULTIMACH_TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$MULTIMACH_TARGET_SYS"' >> $script
 
 	# Add version information
 	versionfile=${SDK_OUTPUT}/${SDKPATH}/version
Signature · 1 line
1.6.6.1
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ping

Quoted 121 lines · Koen Kooi

From: Koen Kooi <[email protected]>

This is the first step to be able to mix multiple arm archs (and ABIs) when installing multiple SDKs on one buildhost (e.g. armv4 and armv7a).

---
 recipes/meta/meta-toolchain.bb |   50 ++++++++++++++++++++--------------------
 1 files changed, 25 insertions(+), 25 deletions(-)
recipes/meta/meta-toolchain.bb +21 -24
index adc057a..2e2196a 100644
@@ -10,7 +10,7 @@ SDK_OUTPUT2 = "${SDK_DIR}/image-extras"
 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
 
 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}/${SDKPATH}/${MULTIMACH_TARGET_SYS}"
 
 TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
 TOOLCHAIN_TARGET_TASK ?= "task-sdk-bare"
@@ -26,14 +26,14 @@ RDEPENDS = "${DISTRO_FEED_CONFIGS} ${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TAS
 TOOLCHAIN_FEED_URI ?= "${DISTRO_FEED_URI}"
 
 modify_opkg_conf () {
-        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg.conf"
-        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
+        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg.conf"
+        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
         OUTPUT_OPKGCONF_SDK="${SDK_OUTPUT}/${sysconfdir}/opkg-sdk.conf"
         rm -f ${OUTPUT_OPKGCONF_TARGET}
         rm -f ${OUTPUT_OPKGCONF_HOST}
         rm -f ${OUTPUT_OPKGCONF_SDK}
 
-        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
+        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
             echo "Creating empty opkg.conf since arch.conf is already present"
             echo > ${OUTPUT_OPKGCONF_TARGET} 
         else
@@ -53,7 +53,7 @@ do_populate_sdk() {
 	rm -rf ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}${libdir}/opkg/
-	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}${libdir}/opkg/
+	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}${libdir}/opkg/
 
 	package_generate_ipkg_conf
 
@@ -79,17 +79,17 @@ do_populate_sdk() {
 	# Clean up empty directories from excluded packages
 	find ${SDK_OUTPUT} -depth -type d -empty -print0 | xargs -r0 /bin/rmdir
 
-	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}/${MULTIMACH_TARGET_SYS}/${sysconfdir}
+	install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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 ' '`
+	target_pkgs=`cat ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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/
+	mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 	for pkg in $target_pkgs ; do
 		for arch in $revipkgarchs; do
 			pkgnames=${DEPLOY_DIR_IPK}/$arch/${pkg}_*_$arch.ipk
@@ -107,7 +107,7 @@ do_populate_sdk() {
 						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/
+						cp ${STAGING_DIR_TARGET}/shlibs/$subpkg.* ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 					fi
 				done
 				break
@@ -119,20 +119,20 @@ do_populate_sdk() {
 	# libgcc-dev should be responsible for that, but it's not getting built
 	# RP: it gets smashed up depending on the order that gcc, gcc-cross and 
 	# gcc-cross-sdk get built :( (30/11/07)
-	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/lib/libgcc_s.so
+	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/lib/libgcc_s.so
 
 	# With sysroot support, gcc expects the default C++ headers to be
 	# in a specific place.
-	install -d ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include
-	mv ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/usr/include/c++ \
-		${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include/
+	install -d ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include/
 
 	# 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\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
+	for i in `find ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS} -name \*.la`; do
+		sed -i 	-e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
 			-e 's/^installed=yes$/installed=no/' $i
 	done
 	rm -f ${SDK_OUTPUT}/${SDKPATH}/lib/*.la
@@ -148,15 +148,15 @@ do_populate_sdk() {
 	script=${SDK_OUTPUT}/${SDKPATH}/environment-setup
 	touch $script
 	echo 'export SDK_PATH=${SDKPATH}' >> $script
-	echo 'export TARGET_SYS=${TARGET_SYS}' >> $script
+	echo 'export MULTIMACH_TARGET_SYS=${MULTIMACH_TARGET_SYS}' >> $script
 	echo 'export PATH=$SDK_PATH/bin:$PATH' >> $script
-	echo 'export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH' >> $script
-	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS${libdir}/pkgconfig' >> $script
+	echo 'export CPATH=$SDK_PATH/$MULTIMACH_TARGET_SYS/usr/include:$CPATH' >> $script

recipes/meta/meta-toolchain.bb do_populate_sdk() { · line 162

Quoted 10 lines
recipes/meta/meta-toolchain.bb +4 -1
+	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS${libdir}/pkgconfig' >> $script
 	echo 'export CONFIG_SITE=$SDK_PATH/site-config' >> $script
 	echo 'alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/${sysconfdir}/opkg-sdk.conf -o $SDK_PATH"' >> $script
-	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$TARGET_SYS"' >> $script
+	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$MULTIMACH_TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$MULTIMACH_TARGET_SYS"' >> $script
 
 	# Add version information
 	versionfile=${SDK_OUTPUT}/${SDKPATH}/version

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFL0X+LMkyGM64RGpERAjk7AJ44eTjMVw7SD+Qapa1LdwJO5tiEXQCcCw2S EHftzrdtZOChyR9eIKhJ0aw=
=AHEQ
-----END PGP SIGNATURE-----

Acked-by
#2 lore raw
Quoted 4 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ping

It's better than what we have today, true. And SDKPATH already contains DISTRO, which is the likely changer of TOOLCHAIN_*_TASK. So...

Quoted 147 lines · Koen Kooi
Quoted 121 lines

From: Koen Kooi <[email protected]>

This is the first step to be able to mix multiple arm archs (and ABIs) when installing multiple SDKs on one buildhost (e.g. armv4 and armv7a).

---
 recipes/meta/meta-toolchain.bb |   50 ++++++++++++++++++++--------------------
 1 files changed, 25 insertions(+), 25 deletions(-)
recipes/meta/meta-toolchain.bb +21 -24
index adc057a..2e2196a 100644
@@ -10,7 +10,7 @@ SDK_OUTPUT2 = "${SDK_DIR}/image-extras"
 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
 
 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}/${SDKPATH}/${MULTIMACH_TARGET_SYS}"
 
 TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
 TOOLCHAIN_TARGET_TASK ?= "task-sdk-bare"
@@ -26,14 +26,14 @@ RDEPENDS = "${DISTRO_FEED_CONFIGS} ${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TAS
 TOOLCHAIN_FEED_URI ?= "${DISTRO_FEED_URI}"
 
 modify_opkg_conf () {
-        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg.conf"
-        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
+        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg.conf"
+        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
         OUTPUT_OPKGCONF_SDK="${SDK_OUTPUT}/${sysconfdir}/opkg-sdk.conf"
         rm -f ${OUTPUT_OPKGCONF_TARGET}
         rm -f ${OUTPUT_OPKGCONF_HOST}
         rm -f ${OUTPUT_OPKGCONF_SDK}
 
-        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
+        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
             echo "Creating empty opkg.conf since arch.conf is already present"
             echo > ${OUTPUT_OPKGCONF_TARGET} 
         else
@@ -53,7 +53,7 @@ do_populate_sdk() {
 	rm -rf ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}${libdir}/opkg/
-	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}${libdir}/opkg/
+	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}${libdir}/opkg/
 
 	package_generate_ipkg_conf
 
@@ -79,17 +79,17 @@ do_populate_sdk() {
 	# Clean up empty directories from excluded packages
 	find ${SDK_OUTPUT} -depth -type d -empty -print0 | xargs -r0 /bin/rmdir
 
-	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}/${MULTIMACH_TARGET_SYS}/${sysconfdir}
+	install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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 ' '`
+	target_pkgs=`cat ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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/
+	mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 	for pkg in $target_pkgs ; do
 		for arch in $revipkgarchs; do
 			pkgnames=${DEPLOY_DIR_IPK}/$arch/${pkg}_*_$arch.ipk
@@ -107,7 +107,7 @@ do_populate_sdk() {
 						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/
+						cp ${STAGING_DIR_TARGET}/shlibs/$subpkg.* ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 					fi
 				done
 				break
@@ -119,20 +119,20 @@ do_populate_sdk() {
 	# libgcc-dev should be responsible for that, but it's not getting built
 	# RP: it gets smashed up depending on the order that gcc, gcc-cross and 
 	# gcc-cross-sdk get built :( (30/11/07)
-	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/lib/libgcc_s.so
+	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/lib/libgcc_s.so
 
 	# With sysroot support, gcc expects the default C++ headers to be
 	# in a specific place.
-	install -d ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include
-	mv ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/usr/include/c++ \
-		${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include/
+	install -d ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include/
 
 	# 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\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
+	for i in `find ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS} -name \*.la`; do
+		sed -i 	-e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
 			-e 's/^installed=yes$/installed=no/' $i
 	done
 	rm -f ${SDK_OUTPUT}/${SDKPATH}/lib/*.la
@@ -148,15 +148,15 @@ do_populate_sdk() {
 	script=${SDK_OUTPUT}/${SDKPATH}/environment-setup
 	touch $script
 	echo 'export SDK_PATH=${SDKPATH}' >> $script
-	echo 'export TARGET_SYS=${TARGET_SYS}' >> $script
+	echo 'export MULTIMACH_TARGET_SYS=${MULTIMACH_TARGET_SYS}' >> $script
 	echo 'export PATH=$SDK_PATH/bin:$PATH' >> $script
-	echo 'export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH' >> $script
-	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS${libdir}/pkgconfig' >> $script
+	echo 'export CPATH=$SDK_PATH/$MULTIMACH_TARGET_SYS/usr/include:$CPATH' >> $script

recipes/meta/meta-toolchain.bb do_populate_sdk() { · line 162

Quoted 10 lines
recipes/meta/meta-toolchain.bb +4 -1
+	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS${libdir}/pkgconfig' >> $script
 	echo 'export CONFIG_SITE=$SDK_PATH/site-config' >> $script
 	echo 'alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/${sysconfdir}/opkg-sdk.conf -o $SDK_PATH"' >> $script
-	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$TARGET_SYS"' >> $script
+	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$MULTIMACH_TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$MULTIMACH_TARGET_SYS"' >> $script
 
 	# Add version information
 	versionfile=${SDK_OUTPUT}/${SDKPATH}/version

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFL0X+LMkyGM64RGpERAjk7AJ44eTjMVw7SD+Qapa1LdwJO5tiEXQCcCw2S EHftzrdtZOChyR9eIKhJ0aw=
=AHEQ
-----END PGP SIGNATURE-----

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 2 lines
Tom Rini <[email protected]>
Mentor Graphics Corporation
#3 lore raw
Quoted 10 lines · Tom Rini
Quoted 4 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ping

It's better than what we have today, true. And SDKPATH already contains DISTRO, which is the likely changer of TOOLCHAIN_*_TASK. So...

In general:

But, should we then create an arch-specific environment-setup scripts (e.g. one for armv4 and another for armv7a, as per your example below)?

Quoted 157 lines
Quoted 147 lines · Koen Kooi
Quoted 122 lines

From: Koen Kooi <[email protected]>

This is the first step to be able to mix multiple arm archs (and ABIs) when installing multiple SDKs on one buildhost (e.g. armv4 and armv7a).

---
 recipes/meta/meta-toolchain.bb |   50 ++++++++++++++++++++--------------------
 1 files changed, 25 insertions(+), 25 deletions(-)
recipes/meta/meta-toolchain.bb +21 -24
index adc057a..2e2196a 100644
@@ -10,7 +10,7 @@ SDK_OUTPUT2 = "${SDK_DIR}/image-extras"
 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
 
 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}/${SDKPATH}/${MULTIMACH_TARGET_SYS}"
 
 TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
 TOOLCHAIN_TARGET_TASK ?= "task-sdk-bare"
@@ -26,14 +26,14 @@ RDEPENDS = "${DISTRO_FEED_CONFIGS} ${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TAS
 TOOLCHAIN_FEED_URI ?= "${DISTRO_FEED_URI}"
 
 modify_opkg_conf () {
-        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg.conf"
-        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
+        OUTPUT_OPKGCONF_TARGET="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg.conf"
+        OUTPUT_OPKGCONF_HOST="${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg-sdk.conf"
         OUTPUT_OPKGCONF_SDK="${SDK_OUTPUT}/${sysconfdir}/opkg-sdk.conf"
         rm -f ${OUTPUT_OPKGCONF_TARGET}
         rm -f ${OUTPUT_OPKGCONF_HOST}
         rm -f ${OUTPUT_OPKGCONF_SDK}
 
-        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
+        if [ -e ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/${sysconfdir}/opkg/arch.conf ] ; then
             echo "Creating empty opkg.conf since arch.conf is already present"
             echo > ${OUTPUT_OPKGCONF_TARGET} 
         else
@@ -53,7 +53,7 @@ do_populate_sdk() {
 	rm -rf ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}
 	mkdir -p ${SDK_OUTPUT}${libdir}/opkg/
-	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}${libdir}/opkg/
+	mkdir -p ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}${libdir}/opkg/
 
 	package_generate_ipkg_conf
 
@@ -79,17 +79,17 @@ do_populate_sdk() {
 	# Clean up empty directories from excluded packages
 	find ${SDK_OUTPUT} -depth -type d -empty -print0 | xargs -r0 /bin/rmdir
 
-	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}/${MULTIMACH_TARGET_SYS}/${sysconfdir}
+	install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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 ' '`
+	target_pkgs=`cat ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_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/
+	mkdir -p ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 	for pkg in $target_pkgs ; do
 		for arch in $revipkgarchs; do
 			pkgnames=${DEPLOY_DIR_IPK}/$arch/${pkg}_*_$arch.ipk
@@ -107,7 +107,7 @@ do_populate_sdk() {
 						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/
+						cp ${STAGING_DIR_TARGET}/shlibs/$subpkg.* ${SDK_OUTPUT2}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/shlibs/
 					fi
 				done
 				break
@@ -119,20 +119,20 @@ do_populate_sdk() {
 	# libgcc-dev should be responsible for that, but it's not getting built
 	# RP: it gets smashed up depending on the order that gcc, gcc-cross and 
 	# gcc-cross-sdk get built :( (30/11/07)
-	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/lib/libgcc_s.so
+	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/lib/libgcc_s.so
 
 	# With sysroot support, gcc expects the default C++ headers to be
 	# in a specific place.
-	install -d ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include
-	mv ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/usr/include/c++ \
-		${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/include/
+	install -d ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS}/include/
 
 	# 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\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$TARGET_SYS${base_libdir},g" \
-			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$TARGET_SYS${libdir},g" \
+	for i in `find ${SDK_OUTPUT}/${SDKPATH}/${MULTIMACH_TARGET_SYS} -name \*.la`; do
+		sed -i 	-e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${base_libdir},g" \
+			-e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1\$SDK_PATH/\$MULTIMACH_TARGET_SYS${libdir},g" \
 			-e 's/^installed=yes$/installed=no/' $i
 	done
 	rm -f ${SDK_OUTPUT}/${SDKPATH}/lib/*.la
@@ -148,15 +148,15 @@ do_populate_sdk() {
 	script=${SDK_OUTPUT}/${SDKPATH}/environment-setup
 	touch $script
 	echo 'export SDK_PATH=${SDKPATH}' >> $script
-	echo 'export TARGET_SYS=${TARGET_SYS}' >> $script
+	echo 'export MULTIMACH_TARGET_SYS=${MULTIMACH_TARGET_SYS}' >> $script
 	echo 'export PATH=$SDK_PATH/bin:$PATH' >> $script
-	echo 'export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH' >> $script
-	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS' >> $script
-	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS${libdir}/pkgconfig' >> $script
+	echo 'export CPATH=$SDK_PATH/$MULTIMACH_TARGET_SYS/usr/include:$CPATH' >> $script

recipes/meta/meta-toolchain.bb do_populate_sdk() { · line 162

Quoted 10 lines
recipes/meta/meta-toolchain.bb +4 -1
+	echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$MULTIMACH_TARGET_SYS' >> $script
+	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$MULTIMACH_TARGET_SYS${libdir}/pkgconfig' >> $script
 	echo 'export CONFIG_SITE=$SDK_PATH/site-config' >> $script
 	echo 'alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/${sysconfdir}/opkg-sdk.conf -o $SDK_PATH"' >> $script
-	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$TARGET_SYS"' >> $script
+	echo 'alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$MULTIMACH_TARGET_SYS${sysconfdir}/opkg.conf -o $SDK_PATH/$MULTIMACH_TARGET_SYS"' >> $script
 
 	# Add version information
 	versionfile=${SDK_OUTPUT}/${SDKPATH}/version

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFL0X+LMkyGM64RGpERAjk7AJ44eTjMVw7SD+Qapa1LdwJO5tiEXQCcCw2S EHftzrdtZOChyR9eIKhJ0aw=
=AHEQ
-----END PGP SIGNATURE-----

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 7 lines
Tom Rini <[email protected]>
Mentor Graphics Corporation

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 15 lines · Denys Dmytriyenko
Quoted 1 line · Tom Rini

On Fri, 2010-04-23 at 13:07 +0200, Koen Kooi wrote:

Ping

Quoted 12 lines
Quoted 5 lines

It's better than what we have today, true. And SDKPATH already contains DISTRO, which is the likely changer of TOOLCHAIN_*_TASK. So...

In general:

But, should we then create an arch-specific environment-setup scripts (e.g. one for armv4 and another for armv7a, as per your example below)?

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFL0eqsMkyGM64RGpERAlyIAJwPerUHqUl3hWoaGGKXT4yFR24DRgCfR9r4 Y/qi89JGvuo93albm+jv1nc=
=bP/Y
-----END PGP SIGNATURE-----

#5 lore raw
Quoted 17 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 13 lines · Denys Dmytriyenko
Quoted 1 line · Tom Rini

On Fri, 2010-04-23 at 13:07 +0200, Koen Kooi wrote:

Ping

Quoted 9 lines
Quoted 5 lines

It's better than what we have today, true. And SDKPATH already contains DISTRO, which is the likely changer of TOOLCHAIN_*_TASK. So...

In general:

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

But, should we then create an arch-specific environment-setup scripts (e.g. one for armv4 and another for armv7a, as per your example below)?

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

And we can talk about if "universal" is really a good goal either. Taking a bit of a guess in the dark, an SDK with support for all the fun stuff found on Beagleboard might not be done easily with also having support for all the fun stuff found on some other ref board too.

I tend to think of these exports as being very board specific, but that doesn't quite flow with how others think of this stuff, today.

Signature · 2 lines
Tom Rini <[email protected]>
Mentor Graphics Corporation
#6 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 21 lines · Tom Rini
Quoted 20 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 15 lines · Denys Dmytriyenko
Quoted 1 line · Tom Rini

On Fri, 2010-04-23 at 13:07 +0200, Koen Kooi wrote:

Ping

Quoted 12 lines
Quoted 5 lines

It's better than what we have today, true. And SDKPATH already contains DISTRO, which is the likely changer of TOOLCHAIN_*_TASK. So...

In general:

But, should we then create an arch-specific environment-setup scripts (e.g. one for armv4 and another for armv7a, as per your example below)?

Quoted 7 lines
Quoted 5 lines

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

And we can talk about if "universal" is really a good goal either.

I don't think we can make it "universal" without sacrificing key benefits.

Quoted 3 lines

Taking a bit of a guess in the dark, an SDK with support for all the fun stuff found on Beagleboard might not be done easily with also having support for all the fun stuff found on some other ref board too.

The immediate problem I'm trying to address now is that having both an armv5te and armv7a toolchain installed is breaking horribly. Ideally they would coexist peacefully, but I don't know if we can manage that, without impacting the ease of use.

Quoted 2 lines

I tend to think of these exports as being very board specific, but that doesn't quite flow with how others think of this stuff, today.

The current output is highly machine specific, since it will include MACHINE_ARCH in the opkg configuration. For gcc/libc/binutils that is usually OK (except when using an ep93xx sdk to target e.g. om-gta01), but for things like clutter or mesa where the machine directly impacts the shared lib it gets ugly real fast.
Luckily at work I currently have a fairly nice situation: all arm9 targets are arm926 without any form of VFP/FPA and no 3d accell and all cortex-a8 targets have the same VFP and NEON blocks and the 3D accel is the same. Of course with my angstrom hat on, the situation is different...

I'm eagerly awaiting Richards branch to get merged so I can work on the nicer areas of meta-toolchain-qte :)

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFL0gNCMkyGM64RGpERAiVuAJ4jIidQWTLhphBZl1sK5gxdZ6gM1gCguxNG kEfwpxZtU3TJg6cC/XCSSeI=
=HXKJ
-----END PGP SIGNATURE-----

#7 lore raw
Quoted 10 lines · Koen Kooi
Quoted 7 lines
Quoted 5 lines

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

And we can talk about if "universal" is really a good goal either.

I don't think we can make it "universal" without sacrificing key benefits.

Quoted 8 lines
Quoted 3 lines

Taking a bit of a guess in the dark, an SDK with support for all the fun stuff found on Beagleboard might not be done easily with also having support for all the fun stuff found on some other ref board too.

The immediate problem I'm trying to address now is that having both an armv5te and armv7a toolchain installed is breaking horribly. Ideally they would coexist peacefully, but I don't know if we can manage that, without impacting the ease of use.

I know it's not what you are looking for, but easier workaround would be to install different toolchains in different paths... :)

Signature · 1 line
Denys
#8 lore raw
Quoted 15 lines · Denys Dmytriyenko
Quoted 14 lines · Koen Kooi
Quoted 7 lines
Quoted 5 lines

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

And we can talk about if "universal" is really a good goal either.

I don't think we can make it "universal" without sacrificing key benefits.

Quoted 3 lines

Taking a bit of a guess in the dark, an SDK with support for all the fun stuff found on Beagleboard might not be done easily with also having support for all the fun stuff found on some other ref board too.

Quoted 7 lines
Quoted 4 lines

The immediate problem I'm trying to address now is that having both an armv5te and armv7a toolchain installed is breaking horribly. Ideally they would coexist peacefully, but I don't know if we can manage that, without impacting the ease of use.

I know it's not what you are looking for, but easier workaround would be to install different toolchains in different paths... :)

Or, noting all of the very machine specific stuff Koen mentions elsewhere, we don't pretend it's an SDK for armv7a but just call it an SDK for ${MACHINE} and encode that into the PATH.

Signature · 2 lines
Tom Rini <[email protected]>
Mentor Graphics Corporation
#9 lore raw
Quoted 21 lines · Tom Rini
Quoted 20 lines · Denys Dmytriyenko
Quoted 18 lines · Koen Kooi
Quoted 7 lines
Quoted 5 lines

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

And we can talk about if "universal" is really a good goal either.

I don't think we can make it "universal" without sacrificing key benefits.

Quoted 3 lines

Taking a bit of a guess in the dark, an SDK with support for all the fun stuff found on Beagleboard might not be done easily with also having support for all the fun stuff found on some other ref board too.

The immediate problem I'm trying to address now is that having both an armv5te and armv7a toolchain installed is breaking horribly. Ideally they would coexist peacefully, but I don't know if we can manage that, without impacting the ease of use.

Quoted 6 lines
Quoted 2 lines

I know it's not what you are looking for, but easier workaround would be to install different toolchains in different paths... :)

Or, noting all of the very machine specific stuff Koen mentions elsewhere, we don't pretend it's an SDK for armv7a but just call it an SDK for ${MACHINE} and encode that into the PATH.

The thing is, while SDKPATH is the same by default for both of the incompatile toolchains (e.g. for Angstrom it is /usr/local/angstrom), the resulting tarballs are named with the specific architecture in the name taken from the FEED_ARCH:

TOOLCHAIN_OUTPUTNAME ?= "${DISTRO}-${DISTRO_VERSION}-${SDK_SYS}-${FEED_ARCH}-${TARGET_OS}-${SDK_SUFFIX}"

While not machine-specific, when installed in separate locations, can safely separate armv5te from armv7a. That way even the host cross tools are separated.

Signature · 1 line
Denys
#10 lore raw
Quoted 34 lines · Denys Dmytriyenko
Quoted 21 lines · Tom Rini
Quoted 20 lines · Denys Dmytriyenko
Quoted 18 lines · Koen Kooi
Quoted 7 lines
Quoted 5 lines

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

And we can talk about if "universal" is really a good goal either.

I don't think we can make it "universal" without sacrificing key benefits.

Quoted 3 lines

Taking a bit of a guess in the dark, an SDK with support for all the fun stuff found on Beagleboard might not be done easily with also having support for all the fun stuff found on some other ref board too.

The immediate problem I'm trying to address now is that having both an armv5te and armv7a toolchain installed is breaking horribly. Ideally they would coexist peacefully, but I don't know if we can manage that, without impacting the ease of use.

Quoted 6 lines
Quoted 2 lines

I know it's not what you are looking for, but easier workaround would be to install different toolchains in different paths... :)

Or, noting all of the very machine specific stuff Koen mentions elsewhere, we don't pretend it's an SDK for armv7a but just call it an SDK for ${MACHINE} and encode that into the PATH.

The thing is, while SDKPATH is the same by default for both of the incompatile toolchains (e.g. for Angstrom it is /usr/local/angstrom), the resulting tarballs are named with the specific architecture in the name taken from the FEED_ARCH:

Quoted 4 lines

TOOLCHAIN_OUTPUTNAME ?= "${DISTRO}-${DISTRO_VERSION}-${SDK_SYS}-${FEED_ARCH}-${TARGET_OS}-${SDK_SUFFIX}"

While not machine-specific, when installed in separate locations, can safely separate armv5te from armv7a. That way even the host cross tools are separated.

Right. I'm saying that SDKPATH should be more than /usr/local/${DISTRO} but /usr/local/${DISTRO}/${MACHINE} by default, toss a comment above about why (output is very MACHINE specific in certain cases) and maybe update the default TOOLCHAIN_OUTPUTNAME too.

Signature · 2 lines
Tom Rini <[email protected]>
Mentor Graphics Corporation
#11 lore raw
Quoted 37 lines · Tom Rini
Quoted 36 lines · Denys Dmytriyenko
Quoted 21 lines · Tom Rini
Quoted 20 lines · Denys Dmytriyenko
Quoted 18 lines · Koen Kooi
Quoted 7 lines
Quoted 5 lines

Yes, that needs to be done, as well as seperating the cross tools in case different archs need different versions (as is the case with angstrom, v5te and v7a need different binutils). This change largely to to cosmetically highlight that the toolchain is not really "universal" (yet).

And we can talk about if "universal" is really a good goal either.

I don't think we can make it "universal" without sacrificing key benefits.

Quoted 3 lines

Taking a bit of a guess in the dark, an SDK with support for all the fun stuff found on Beagleboard might not be done easily with also having support for all the fun stuff found on some other ref board too.

The immediate problem I'm trying to address now is that having both an armv5te and armv7a toolchain installed is breaking horribly. Ideally they would coexist peacefully, but I don't know if we can manage that, without impacting the ease of use.

Quoted 6 lines
Quoted 2 lines

I know it's not what you are looking for, but easier workaround would be to install different toolchains in different paths... :)

Or, noting all of the very machine specific stuff Koen mentions elsewhere, we don't pretend it's an SDK for armv7a but just call it an SDK for ${MACHINE} and encode that into the PATH.

The thing is, while SDKPATH is the same by default for both of the incompatile toolchains (e.g. for Angstrom it is /usr/local/angstrom), the resulting tarballs are named with the specific architecture in the name taken from the FEED_ARCH:

TOOLCHAIN_OUTPUTNAME ?= "${DISTRO}-${DISTRO_VERSION}-${SDK_SYS}-${FEED_ARCH}-${TARGET_OS}-${SDK_SUFFIX}"

Quoted 7 lines
Quoted 2 lines

While not machine-specific, when installed in separate locations, can safely separate armv5te from armv7a. That way even the host cross tools are separated.

Right. I'm saying that SDKPATH should be more than /usr/local/${DISTRO} but /usr/local/${DISTRO}/${MACHINE} by default, toss a comment above about why (output is very MACHINE specific in certain cases) and maybe update the default TOOLCHAIN_OUTPUTNAME too.

Ok, you asked for a comment, I'll give you two :)

1. In Arago I have a way to overwrite SDKPATH from the command line when building a specific SDK/toolchain. So, I can do what you suggest, but...

2. My SDKs are currently not machine-specific, moreover, they don't have the cross-compile tools in them (i.e. no toolchain part), as Arago uses external CodeSourcery toolchain for that. The only cross-tools I have in my SDKs are those, which are missing from CS - i.e. libtool, pkgconfig, opkg, qt4e-tools etc. But I still build 2 versions of SDK - armv5te and armv7a.

Signature · 1 line
Denys
#12 lore raw
Quoted 1 line · Denys Dmytriyenko

On Sat, Apr 24, 2010 at 11:51:09AM -0700, Tom Rini wrote:

[snip]

Quoted 7 lines
Quoted 4 lines

Right. I'm saying that SDKPATH should be more than /usr/local/${DISTRO} but /usr/local/${DISTRO}/${MACHINE} by default, toss a comment above about why (output is very MACHINE specific in certain cases) and maybe update the default TOOLCHAIN_OUTPUTNAME too.

Ok, you asked for a comment, I'll give you two :)

Quoted 8 lines

1. In Arago I have a way to overwrite SDKPATH from the command line when building a specific SDK/toolchain. So, I can do what you suggest, but...

2. My SDKs are currently not machine-specific, moreover, they don't have the cross-compile tools in them (i.e. no toolchain part), as Arago uses external CodeSourcery toolchain for that. The only cross-tools I have in my SDKs are those, which are missing from CS - i.e. libtool, pkgconfig, opkg, qt4e-tools etc. But I still build 2 versions of SDK - armv5te and armv7a.

I'd make a very small wager that you're unknowningly wrong about #2 or a someone adding an RRECOMMENDS/RDEPENDS_mach somewhere (or using another machine you haven't tried yet) from machine specific stuff leaking in and being wrong :)

It's not the gcc & co that you get from CodeSourcery or our -sdk recipes or whatever that makes this machine-specific but the conditional inclusion of some userland bits (be it "small" "regular" Linux stuff or "small" stuff for FPGAs or whatever on a particular ref board). Or even PACKAGE_ARCH=MACHINE stuff already being in there, again without you knowning (some of which can be rather easily pulled out with that removal hook you added).

Signature · 2 lines
Tom Rini <[email protected]>
Mentor Graphics Corporation
#13 lore raw
Quoted 24 lines · Tom Rini
Quoted 1 line · Denys Dmytriyenko

On Sat, Apr 24, 2010 at 11:51:09AM -0700, Tom Rini wrote:

[snip]

Quoted 7 lines
Quoted 4 lines

Right. I'm saying that SDKPATH should be more than /usr/local/${DISTRO} but /usr/local/${DISTRO}/${MACHINE} by default, toss a comment above about why (output is very MACHINE specific in certain cases) and maybe update the default TOOLCHAIN_OUTPUTNAME too.

Ok, you asked for a comment, I'll give you two :)

Quoted 8 lines

1. In Arago I have a way to overwrite SDKPATH from the command line when building a specific SDK/toolchain. So, I can do what you suggest, but...

2. My SDKs are currently not machine-specific, moreover, they don't have the cross-compile tools in them (i.e. no toolchain part), as Arago uses external CodeSourcery toolchain for that. The only cross-tools I have in my SDKs are those, which are missing from CS - i.e. libtool, pkgconfig, opkg, qt4e-tools etc. But I still build 2 versions of SDK - armv5te and armv7a.

I'd make a very small wager that you're unknowningly wrong about #2 or a someone adding an RRECOMMENDS/RDEPENDS_mach somewhere (or using another machine you haven't tried yet) from machine specific stuff leaking in and being wrong :)

Quoted 7 lines

It's not the gcc & co that you get from CodeSourcery or our -sdk recipes or whatever that makes this machine-specific but the conditional inclusion of some userland bits (be it "small" "regular" Linux stuff or "small" stuff for FPGAs or whatever on a particular ref board). Or even PACKAGE_ARCH=MACHINE stuff already being in there, again without you knowning (some of which can be rather easily pulled out with that removal hook you added).

In general, you are correct, but:

$ grep 'Architecture:' $SDK_PATH/$TARGET_SYS/usr/lib/opkg/status | uniq
armv7a

So, I'm being carefull and use the EXCLUDE removal hook extensively :)

Signature · 1 line
Denys