Install cross-packages into the native sysroot

Cross is no longer required so can go away, we now install cross packages into
the native sysroot and use them from there.

This patch includes updates to classes and some recipes which reference
CROSS_DIR. Others still need fixing an image can be built and run with this
patch applied.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
This commit is contained in:
Joshua Lock 2010-04-22 15:20:05 +01:00
parent 00c5c97442
commit c22ab5fc9f
10 changed files with 14 additions and 23 deletions

View File

@ -40,9 +40,9 @@ target_base_libdir := "${base_libdir}"
target_prefix := "${prefix}" target_prefix := "${prefix}"
# Overrides for paths # Overrides for paths
prefix = "${CROSS_DIR}" prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
base_prefix = "${prefix}" base_prefix = "${STAGING_DIR_NATIVE}"
exec_prefix = "${prefix}" exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
base_sbindir = "${base_prefix}/bin" base_sbindir = "${base_prefix}/bin"
sbindir = "${exec_prefix}/bin" sbindir = "${exec_prefix}/bin"

View File

@ -96,8 +96,8 @@ do_prep_locale_tree() {
gunzip $i gunzip $i
done done
cp -pPR ${PKGD}${base_libdir}/* $treedir/lib cp -pPR ${PKGD}${base_libdir}/* $treedir/lib
if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then
cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib cp -pPR ${STAGING_DIR_NATIVE}/${prefix_native}/lib/libgcc_s.* $treedir/lib
fi fi
install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin
} }

View File

@ -46,8 +46,8 @@ def create_cross_env(bb,d):
return "" return ""
import tarfile, socket, time import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d)
prefix = bb.data.expand('${HOST_PREFIX}' , d) prefix = bb.data.expand('${HOST_PREFIX}' , d)
ice_dir = bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}")
distro = bb.data.expand('${DISTRO}', d) distro = bb.data.expand('${DISTRO}', d)
target_sys = bb.data.expand('${TARGET_SYS}', d) target_sys = bb.data.expand('${TARGET_SYS}', d)
target_prefix = bb.data.expand('${TARGET_PREFIX}', d) target_prefix = bb.data.expand('${TARGET_PREFIX}', d)
@ -93,7 +93,7 @@ def create_cross_env(bb,d):
def create_native_env(bb,d): def create_native_env(bb,d):
import tarfile, socket, time import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d) ice_dir = bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}")
prefix = bb.data.expand('${HOST_PREFIX}' , d) prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d) distro = bb.data.expand('${DISTRO}', d)
target_sys = bb.data.expand('${TARGET_SYS}', d) target_sys = bb.data.expand('${TARGET_SYS}', d)
@ -131,7 +131,7 @@ def create_native_env(bb,d):
def create_cross_kernel_env(bb,d): def create_cross_kernel_env(bb,d):
import tarfile, socket, time import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d) ice_dir = bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}")
prefix = bb.data.expand('${HOST_PREFIX}' , d) prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d) distro = bb.data.expand('${DISTRO}', d)
target_sys = bb.data.expand('${TARGET_SYS}', d) target_sys = bb.data.expand('${TARGET_SYS}', d)

View File

@ -18,8 +18,6 @@ python () {
#STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" #STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
#STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk" #STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}"
HOST_ARCH = "${SDK_ARCH}" HOST_ARCH = "${SDK_ARCH}"
HOST_VENDOR = "${SDK_VENDOR}" HOST_VENDOR = "${SDK_VENDOR}"
HOST_OS = "${SDK_OS}" HOST_OS = "${SDK_OS}"

View File

@ -128,7 +128,6 @@ def pstage_cleanpackage(pkgname, d):
else: else:
bb.note("No. Manually removing any installed files") bb.note("No. Manually removing any installed files")
pstage_manualclean("sysroots", "STAGING_DIR", d) pstage_manualclean("sysroots", "STAGING_DIR", d)
pstage_manualclean("cross", "CROSS_DIR", d)
pstage_manualclean("deploy", "DEPLOY_DIR", d) pstage_manualclean("deploy", "DEPLOY_DIR", d)
bb.utils.unlockfile(lf) bb.utils.unlockfile(lf)
@ -297,7 +296,6 @@ python packagedstage_stampfixing_eventhandler() {
populate_sysroot_preamble () { populate_sysroot_preamble () {
if [ "$PSTAGING_ACTIVE" = "1" ]; then if [ "$PSTAGING_ACTIVE" = "1" ]; then
stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true
stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u || true
fi fi
} }
@ -313,7 +311,6 @@ populate_sysroot_postamble () {
if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
exit $exitcode exit $exitcode
fi fi
stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u -d ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}
if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
exit $exitcode exit $exitcode
fi fi
@ -324,9 +321,7 @@ populate_sysroot_postamble () {
packagedstaging_fastpath () { packagedstaging_fastpath () {
if [ "$PSTAGING_ACTIVE" = "1" ]; then if [ "$PSTAGING_ACTIVE" = "1" ]; then
mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/ mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/
mkdir -p ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/
cp -fpPR ${SYSROOT_DESTDIR}/${STAGING_DIR}/* ${PSTAGE_TMPDIR_STAGE}/sysroots/ || /bin/true cp -fpPR ${SYSROOT_DESTDIR}/${STAGING_DIR}/* ${PSTAGE_TMPDIR_STAGE}/sysroots/ || /bin/true
cp -fpPR ${SYSROOT_DESTDIR}/${CROSS_DIR}/* ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/ || /bin/true
fi fi
} }

View File

@ -355,9 +355,7 @@ EXTRA_IMAGEDEPENDS = ""
# Toolchain info. # Toolchain info.
################################################################## ##################################################################
CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}" PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:"
CROSS_DATADIR = "${CROSS_DIR}/share"
PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/${bindir_cross}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:"
export PATH export PATH
################################################################## ##################################################################

View File

@ -11,7 +11,7 @@ RUNTIMETARGET = "libgcc libssp libstdc++-v3"
# libgfortran # libgfortran
do_configure () { do_configure () {
cp ${CROSS_DIR}/include/gcc-build-internal/* ${S}/gcc cp ${STAGING_DIR_NATIVE}${prefix_native}/include/gcc-build-internal/* ${S}/gcc
for d in ${RUNTIMETARGET}; do for d in ${RUNTIMETARGET}; do
echo "Configuring $d" echo "Configuring $d"
mkdir -p ${B}/$d/ mkdir -p ${B}/$d/

View File

@ -5,6 +5,6 @@ PR = "r1"
# Hack till we fix *libc properly # Hack till we fix *libc properly
do_install_append() { do_install_append() {
ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
} }

View File

@ -4,6 +4,6 @@ PR = "r1"
# Hack till we fix *libc properly # Hack till we fix *libc properly
do_install_append() { do_install_append() {
ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
} }

View File

@ -8,8 +8,8 @@ do_install () {
# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
# gfortran is fully backwards compatible. This is a safe and practical solution. # gfortran is fully backwards compatible. This is a safe and practical solution.
ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/gfortran ${STAGING_DIR_NATIVE}/${prefix_native}/${TARGET_SYS}/bin/g77 || true
# Remove things we don't need but keep share/java # Remove things we don't need but keep share/java
for d in info man share/doc share/locale share/man share/info; do for d in info man share/doc share/locale share/man share/info; do