summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-03 20:04:33 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-03 20:04:33 +0100
commitec8f5299d96d938b56c68d4ffa701b0c8a061de6 (patch)
treead27e2213266eb3b425a36f5c6f990c78938ba35
parentb3e41b5d1ec003908610a79648528246d467a053 (diff)
downloadpoky-ec8f5299d96d938b56c68d4ffa701b0c8a061de6.tar.gz
cross-canadian: Move binaries into a subdirectory of bin to allow multimachine installs and update users accordingly
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/classes/cross-canadian.bbclass6
-rw-r--r--meta/packages/binutils/binutils-cross-canadian.inc8
-rw-r--r--meta/packages/binutils/binutils-cross-canadian_2.20.1.bb2
-rw-r--r--meta/packages/gcc/gcc-cross-canadian_4.3.3.bb2
-rw-r--r--meta/packages/gcc/gcc-package-sdk.inc16
-rw-r--r--meta/packages/meta/meta-toolchain.bb10
6 files changed, 21 insertions, 23 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 9afdd619ea..72032367ef 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -49,6 +49,12 @@ target_exec_prefix := "${exec_prefix}"
49base_prefix = "${SDKPATHNATIVE}" 49base_prefix = "${SDKPATHNATIVE}"
50prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" 50prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
51exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" 51exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
52bindir = "${exec_prefix}/bin/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
53sbindir = "${bindir}"
54base_bindir = "${bindir}"
55base_sbindir = "${bindir}"
56libdir = "${exec_prefix}/lib/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
57libexecdir = "${exec_prefix}/libexec/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
52 58
53FILES_${PN} = "${prefix}" 59FILES_${PN} = "${prefix}"
54FILES_${PN}-dbg += "${prefix}/.debug \ 60FILES_${PN}-dbg += "${prefix}/.debug \
diff --git a/meta/packages/binutils/binutils-cross-canadian.inc b/meta/packages/binutils/binutils-cross-canadian.inc
index 04fa6e2de0..4953bc2c3b 100644
--- a/meta/packages/binutils/binutils-cross-canadian.inc
+++ b/meta/packages/binutils/binutils-cross-canadian.inc
@@ -6,15 +6,9 @@ EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
6do_install () { 6do_install () {
7 autotools_do_install 7 autotools_do_install
8 8
9 # Fix the ${prefix}/${TARGET_SYS}/bin/* files to be symlinks
10 rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
11 rm ${D}${prefix}/${TARGET_SYS}/bin/*
12 for l in ${D}${bindir}/*; do
13 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
14 done
15
16 # We're not interested in the libs or headers, these would come from the 9 # We're not interested in the libs or headers, these would come from the
17 # nativesdk or target version of the binutils recipe 10 # nativesdk or target version of the binutils recipe
11 rm -rf ${D}${prefix}/${TARGET_SYS}
18 rm -f ${D}${libdir}/libbfd* 12 rm -f ${D}${libdir}/libbfd*
19 rm -f ${D}${libdir}/libiberty* 13 rm -f ${D}${libdir}/libiberty*
20 rm -f ${D}${libdir}/libopcodes* 14 rm -f ${D}${libdir}/libopcodes*
diff --git a/meta/packages/binutils/binutils-cross-canadian_2.20.1.bb b/meta/packages/binutils/binutils-cross-canadian_2.20.1.bb
index 13fc22aa64..f4a7a0e619 100644
--- a/meta/packages/binutils/binutils-cross-canadian_2.20.1.bb
+++ b/meta/packages/binutils/binutils-cross-canadian_2.20.1.bb
@@ -1,3 +1,3 @@
1require binutils_${PV}.bb 1require binutils_${PV}.bb
2require binutils-cross-canadian.inc 2require binutils-cross-canadian.inc
3PR = "r3" 3PR = "r4"
diff --git a/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb b/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb
index 7cc202363e..981452b7a7 100644
--- a/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb
+++ b/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb
@@ -5,7 +5,7 @@ require gcc-cross-canadian.inc
5require gcc-configure-sdk.inc 5require gcc-configure-sdk.inc
6require gcc-package-sdk.inc 6require gcc-package-sdk.inc
7 7
8PR = "r16" 8PR = "r17"
9 9
10DEPENDS += "gmp-nativesdk mpfr-nativesdk" 10DEPENDS += "gmp-nativesdk mpfr-nativesdk"
11RDEPENDS_${PN} += "mpfr-nativesdk" 11RDEPENDS_${PN} += "mpfr-nativesdk"
diff --git a/meta/packages/gcc/gcc-package-sdk.inc b/meta/packages/gcc/gcc-package-sdk.inc
index cdce1da1c7..23b9a48eb3 100644
--- a/meta/packages/gcc/gcc-package-sdk.inc
+++ b/meta/packages/gcc/gcc-package-sdk.inc
@@ -7,10 +7,7 @@ PACKAGES = "${PN} ${PN}-doc"
7 7
8FILES_${PN} = "\ 8FILES_${PN} = "\
9 ${bindir}/* \ 9 ${bindir}/* \
10 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1 \ 10 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \
11 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
12 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
13 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
14 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ 11 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
15 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ 12 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
16 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ 13 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
@@ -44,11 +41,12 @@ do_install () {
44 rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a 41 rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
45 rm -f ${D}${libdir}/libiberty.a 42 rm -f ${D}${libdir}/libiberty.a
46 43
47 # Create the ${prefix}/${TARGET_SYS}/bin/* symlinks 44 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
48 install -d ${D}${prefix}/${TARGET_SYS}/bin/ 45 # found.
49 for l in ${D}${bindir}/*; do 46 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
50 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`" 47 install -d $dest
48 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
49 ln -sf ${bindir}/${TARGET_PREFIX}$t $dest$t
51 done 50 done
52 ln -sf "${bindir}/${TARGET_PREFIX}gcc" "${D}${prefix}/${TARGET_SYS}/bin/cc"
53} 51}
54 52
diff --git a/meta/packages/meta/meta-toolchain.bb b/meta/packages/meta/meta-toolchain.bb
index fad9a3406a..a53569b55b 100644
--- a/meta/packages/meta/meta-toolchain.bb
+++ b/meta/packages/meta/meta-toolchain.bb
@@ -73,19 +73,19 @@ do_populate_sdk() {
73 rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la 73 rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
74 74
75 # Setup site file for external use 75 # Setup site file for external use
76 siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${TARGET_SYS} 76 siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}
77 touch $siteconfig 77 touch $siteconfig
78 for sitefile in ${CONFIG_SITE} ; do 78 for sitefile in ${CONFIG_SITE} ; do
79 cat $sitefile >> $siteconfig 79 cat $sitefile >> $siteconfig
80 done 80 done
81 81
82 # Create environment setup script 82 # Create environment setup script
83 script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${TARGET_SYS} 83 script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${MULTIMACH_TARGET_SYS}
84 touch $script 84 touch $script
85 echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script 85 echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${MULTIMACH_TARGET_SYS}:$PATH' >> $script
86 echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script 86 echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
87 echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script 87 echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
88 echo 'export CONFIG_SITE=${SDKPATH}/site-config-${TARGET_SYS}' >> $script 88 echo 'export CONFIG_SITE=${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}' >> $script
89 echo 'export CC=${TARGET_PREFIX}gcc' >> $script 89 echo 'export CC=${TARGET_PREFIX}gcc' >> $script
90 echo 'export CXX=${TARGET_PREFIX}g++' >> $script 90 echo 'export CXX=${TARGET_PREFIX}g++' >> $script
91 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux"' >> $script 91 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux"' >> $script
@@ -102,7 +102,7 @@ do_populate_sdk() {
102 echo "alias opkg-target='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKTARGETSYSROOT}${sysconfdir}/opkg.conf -o ${SDKTARGETSYSROOT}'" >> $script 102 echo "alias opkg-target='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKTARGETSYSROOT}${sysconfdir}/opkg.conf -o ${SDKTARGETSYSROOT}'" >> $script
103 103
104 # Add version information 104 # Add version information
105 versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${TARGET_SYS} 105 versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${MULTIMACH_TARGET_SYS}
106 touch $versionfile 106 touch $versionfile
107 echo 'Distro: ${DISTRO}' >> $versionfile 107 echo 'Distro: ${DISTRO}' >> $versionfile
108 echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile 108 echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile