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>
This commit is contained in:
Richard Purdie 2010-08-03 20:04:33 +01:00
parent b3e41b5d1e
commit ec8f5299d9
6 changed files with 21 additions and 23 deletions

View File

@ -49,6 +49,12 @@ target_exec_prefix := "${exec_prefix}"
base_prefix = "${SDKPATHNATIVE}" base_prefix = "${SDKPATHNATIVE}"
prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
bindir = "${exec_prefix}/bin/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
sbindir = "${bindir}"
base_bindir = "${bindir}"
base_sbindir = "${bindir}"
libdir = "${exec_prefix}/lib/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
libexecdir = "${exec_prefix}/libexec/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
FILES_${PN} = "${prefix}" FILES_${PN} = "${prefix}"
FILES_${PN}-dbg += "${prefix}/.debug \ FILES_${PN}-dbg += "${prefix}/.debug \

View File

@ -6,15 +6,9 @@ EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
do_install () { do_install () {
autotools_do_install autotools_do_install
# Fix the ${prefix}/${TARGET_SYS}/bin/* files to be symlinks
rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
rm ${D}${prefix}/${TARGET_SYS}/bin/*
for l in ${D}${bindir}/*; do
ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
done
# We're not interested in the libs or headers, these would come from the # We're not interested in the libs or headers, these would come from the
# nativesdk or target version of the binutils recipe # nativesdk or target version of the binutils recipe
rm -rf ${D}${prefix}/${TARGET_SYS}
rm -f ${D}${libdir}/libbfd* rm -f ${D}${libdir}/libbfd*
rm -f ${D}${libdir}/libiberty* rm -f ${D}${libdir}/libiberty*
rm -f ${D}${libdir}/libopcodes* rm -f ${D}${libdir}/libopcodes*

View File

@ -1,3 +1,3 @@
require binutils_${PV}.bb require binutils_${PV}.bb
require binutils-cross-canadian.inc require binutils-cross-canadian.inc
PR = "r3" PR = "r4"

View File

@ -5,7 +5,7 @@ require gcc-cross-canadian.inc
require gcc-configure-sdk.inc require gcc-configure-sdk.inc
require gcc-package-sdk.inc require gcc-package-sdk.inc
PR = "r16" PR = "r17"
DEPENDS += "gmp-nativesdk mpfr-nativesdk" DEPENDS += "gmp-nativesdk mpfr-nativesdk"
RDEPENDS_${PN} += "mpfr-nativesdk" RDEPENDS_${PN} += "mpfr-nativesdk"

View File

@ -7,10 +7,7 @@ PACKAGES = "${PN} ${PN}-doc"
FILES_${PN} = "\ FILES_${PN} = "\
${bindir}/* \ ${bindir}/* \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1 \ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
@ -44,11 +41,12 @@ do_install () {
rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
rm -f ${D}${libdir}/libiberty.a rm -f ${D}${libdir}/libiberty.a
# Create the ${prefix}/${TARGET_SYS}/bin/* symlinks # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
install -d ${D}${prefix}/${TARGET_SYS}/bin/ # found.
for l in ${D}${bindir}/*; do dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`" install -d $dest
for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
ln -sf ${bindir}/${TARGET_PREFIX}$t $dest$t
done done
ln -sf "${bindir}/${TARGET_PREFIX}gcc" "${D}${prefix}/${TARGET_SYS}/bin/cc"
} }

View File

@ -73,19 +73,19 @@ do_populate_sdk() {
rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
# Setup site file for external use # Setup site file for external use
siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${TARGET_SYS} siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}
touch $siteconfig touch $siteconfig
for sitefile in ${CONFIG_SITE} ; do for sitefile in ${CONFIG_SITE} ; do
cat $sitefile >> $siteconfig cat $sitefile >> $siteconfig
done done
# Create environment setup script # Create environment setup script
script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${TARGET_SYS} script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${MULTIMACH_TARGET_SYS}
touch $script touch $script
echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${MULTIMACH_TARGET_SYS}:$PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-${TARGET_SYS}' >> $script echo 'export CONFIG_SITE=${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}' >> $script
echo 'export CC=${TARGET_PREFIX}gcc' >> $script echo 'export CC=${TARGET_PREFIX}gcc' >> $script
echo 'export CXX=${TARGET_PREFIX}g++' >> $script echo 'export CXX=${TARGET_PREFIX}g++' >> $script
echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux"' >> $script echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux"' >> $script
@ -102,7 +102,7 @@ do_populate_sdk() {
echo "alias opkg-target='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKTARGETSYSROOT}${sysconfdir}/opkg.conf -o ${SDKTARGETSYSROOT}'" >> $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 # Add version information
versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${TARGET_SYS} versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${MULTIMACH_TARGET_SYS}
touch $versionfile touch $versionfile
echo 'Distro: ${DISTRO}' >> $versionfile echo 'Distro: ${DISTRO}' >> $versionfile
echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile