diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-04-22 15:20:05 +0100 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-04-27 18:29:57 +0100 |
commit | c22ab5fc9fd0f18153e73f941f050539d415ff56 (patch) | |
tree | 0af352c233ff4524595e924ebb32f72c7a8828db | |
parent | 00c5c9744220ed8a019ede55cdf2809b1d3b72a5 (diff) | |
download | poky-c22ab5fc9fd0f18153e73f941f050539d415ff56.tar.gz |
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>
-rw-r--r-- | meta/classes/cross.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/glibc-package.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/icecc.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/nativesdk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/packaged-staging.bbclass | 5 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-configure-runtime.inc | 2 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-initial_4.3.3.bb | 2 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb | 2 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-package-cross.inc | 4 |
10 files changed, 14 insertions, 23 deletions
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass index d5f6300777..487ec60f7f 100644 --- a/meta/classes/cross.bbclass +++ b/meta/classes/cross.bbclass | |||
@@ -40,9 +40,9 @@ target_base_libdir := "${base_libdir}" | |||
40 | target_prefix := "${prefix}" | 40 | target_prefix := "${prefix}" |
41 | 41 | ||
42 | # Overrides for paths | 42 | # Overrides for paths |
43 | prefix = "${CROSS_DIR}" | 43 | prefix = "${STAGING_DIR_NATIVE}${prefix_native}" |
44 | base_prefix = "${prefix}" | 44 | base_prefix = "${STAGING_DIR_NATIVE}" |
45 | exec_prefix = "${prefix}" | 45 | exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}" |
46 | base_sbindir = "${base_prefix}/bin" | 46 | base_sbindir = "${base_prefix}/bin" |
47 | sbindir = "${exec_prefix}/bin" | 47 | sbindir = "${exec_prefix}/bin" |
48 | 48 | ||
diff --git a/meta/classes/glibc-package.bbclass b/meta/classes/glibc-package.bbclass index cef888c54e..56bf8ba40a 100644 --- a/meta/classes/glibc-package.bbclass +++ b/meta/classes/glibc-package.bbclass | |||
@@ -96,8 +96,8 @@ do_prep_locale_tree() { | |||
96 | gunzip $i | 96 | gunzip $i |
97 | done | 97 | done |
98 | cp -pPR ${PKGD}${base_libdir}/* $treedir/lib | 98 | cp -pPR ${PKGD}${base_libdir}/* $treedir/lib |
99 | if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then | 99 | if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then |
100 | cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib | 100 | cp -pPR ${STAGING_DIR_NATIVE}/${prefix_native}/lib/libgcc_s.* $treedir/lib |
101 | fi | 101 | fi |
102 | install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin | 102 | install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin |
103 | } | 103 | } |
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index be37318d91..715f870773 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
@@ -46,8 +46,8 @@ def create_cross_env(bb,d): | |||
46 | return "" | 46 | return "" |
47 | 47 | ||
48 | import tarfile, socket, time | 48 | import tarfile, socket, time |
49 | ice_dir = bb.data.expand('${CROSS_DIR}', d) | ||
50 | prefix = bb.data.expand('${HOST_PREFIX}' , d) | 49 | prefix = bb.data.expand('${HOST_PREFIX}' , d) |
50 | ice_dir = bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}") | ||
51 | distro = bb.data.expand('${DISTRO}', d) | 51 | distro = bb.data.expand('${DISTRO}', d) |
52 | target_sys = bb.data.expand('${TARGET_SYS}', d) | 52 | target_sys = bb.data.expand('${TARGET_SYS}', d) |
53 | target_prefix = bb.data.expand('${TARGET_PREFIX}', d) | 53 | target_prefix = bb.data.expand('${TARGET_PREFIX}', d) |
@@ -93,7 +93,7 @@ def create_cross_env(bb,d): | |||
93 | 93 | ||
94 | def create_native_env(bb,d): | 94 | def create_native_env(bb,d): |
95 | import tarfile, socket, time | 95 | import tarfile, socket, time |
96 | ice_dir = bb.data.expand('${CROSS_DIR}', d) | 96 | ice_dir = bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}") |
97 | prefix = bb.data.expand('${HOST_PREFIX}' , d) | 97 | prefix = bb.data.expand('${HOST_PREFIX}' , d) |
98 | distro = bb.data.expand('${DISTRO}', d) | 98 | distro = bb.data.expand('${DISTRO}', d) |
99 | target_sys = bb.data.expand('${TARGET_SYS}', d) | 99 | target_sys = bb.data.expand('${TARGET_SYS}', d) |
@@ -131,7 +131,7 @@ def create_native_env(bb,d): | |||
131 | 131 | ||
132 | def create_cross_kernel_env(bb,d): | 132 | def create_cross_kernel_env(bb,d): |
133 | import tarfile, socket, time | 133 | import tarfile, socket, time |
134 | ice_dir = bb.data.expand('${CROSS_DIR}', d) | 134 | ice_dir = bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}") |
135 | prefix = bb.data.expand('${HOST_PREFIX}' , d) | 135 | prefix = bb.data.expand('${HOST_PREFIX}' , d) |
136 | distro = bb.data.expand('${DISTRO}', d) | 136 | distro = bb.data.expand('${DISTRO}', d) |
137 | target_sys = bb.data.expand('${TARGET_SYS}', d) | 137 | target_sys = bb.data.expand('${TARGET_SYS}', d) |
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index 95ffc064af..2c897c6076 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass | |||
@@ -18,8 +18,6 @@ python () { | |||
18 | #STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" | 18 | #STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" |
19 | #STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk" | 19 | #STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk" |
20 | 20 | ||
21 | CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}" | ||
22 | |||
23 | HOST_ARCH = "${SDK_ARCH}" | 21 | HOST_ARCH = "${SDK_ARCH}" |
24 | HOST_VENDOR = "${SDK_VENDOR}" | 22 | HOST_VENDOR = "${SDK_VENDOR}" |
25 | HOST_OS = "${SDK_OS}" | 23 | HOST_OS = "${SDK_OS}" |
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass index a04c956c80..cda16d1cc5 100644 --- a/meta/classes/packaged-staging.bbclass +++ b/meta/classes/packaged-staging.bbclass | |||
@@ -128,7 +128,6 @@ def pstage_cleanpackage(pkgname, d): | |||
128 | else: | 128 | else: |
129 | bb.note("No. Manually removing any installed files") | 129 | bb.note("No. Manually removing any installed files") |
130 | pstage_manualclean("sysroots", "STAGING_DIR", d) | 130 | pstage_manualclean("sysroots", "STAGING_DIR", d) |
131 | pstage_manualclean("cross", "CROSS_DIR", d) | ||
132 | pstage_manualclean("deploy", "DEPLOY_DIR", d) | 131 | pstage_manualclean("deploy", "DEPLOY_DIR", d) |
133 | 132 | ||
134 | bb.utils.unlockfile(lf) | 133 | bb.utils.unlockfile(lf) |
@@ -297,7 +296,6 @@ python packagedstage_stampfixing_eventhandler() { | |||
297 | populate_sysroot_preamble () { | 296 | populate_sysroot_preamble () { |
298 | if [ "$PSTAGING_ACTIVE" = "1" ]; then | 297 | if [ "$PSTAGING_ACTIVE" = "1" ]; then |
299 | stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true | 298 | stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true |
300 | stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u || true | ||
301 | fi | 299 | fi |
302 | } | 300 | } |
303 | 301 | ||
@@ -313,7 +311,6 @@ populate_sysroot_postamble () { | |||
313 | if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then | 311 | if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then |
314 | exit $exitcode | 312 | exit $exitcode |
315 | fi | 313 | fi |
316 | stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u -d ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH} | ||
317 | if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then | 314 | if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then |
318 | exit $exitcode | 315 | exit $exitcode |
319 | fi | 316 | fi |
@@ -324,9 +321,7 @@ populate_sysroot_postamble () { | |||
324 | packagedstaging_fastpath () { | 321 | packagedstaging_fastpath () { |
325 | if [ "$PSTAGING_ACTIVE" = "1" ]; then | 322 | if [ "$PSTAGING_ACTIVE" = "1" ]; then |
326 | mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/ | 323 | mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/ |
327 | mkdir -p ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/ | ||
328 | cp -fpPR ${SYSROOT_DESTDIR}/${STAGING_DIR}/* ${PSTAGE_TMPDIR_STAGE}/sysroots/ || /bin/true | 324 | cp -fpPR ${SYSROOT_DESTDIR}/${STAGING_DIR}/* ${PSTAGE_TMPDIR_STAGE}/sysroots/ || /bin/true |
329 | cp -fpPR ${SYSROOT_DESTDIR}/${CROSS_DIR}/* ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/ || /bin/true | ||
330 | fi | 325 | fi |
331 | } | 326 | } |
332 | 327 | ||
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index ee652e79e1..528eef97ff 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -355,9 +355,7 @@ EXTRA_IMAGEDEPENDS = "" | |||
355 | # Toolchain info. | 355 | # Toolchain info. |
356 | ################################################################## | 356 | ################################################################## |
357 | 357 | ||
358 | CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}" | 358 | 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}:" |
359 | CROSS_DATADIR = "${CROSS_DIR}/share" | ||
360 | 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}:" | ||
361 | export PATH | 359 | export PATH |
362 | 360 | ||
363 | ################################################################## | 361 | ################################################################## |
diff --git a/meta/packages/gcc/gcc-configure-runtime.inc b/meta/packages/gcc/gcc-configure-runtime.inc index e20c72fa05..175e08ad14 100644 --- a/meta/packages/gcc/gcc-configure-runtime.inc +++ b/meta/packages/gcc/gcc-configure-runtime.inc | |||
@@ -11,7 +11,7 @@ RUNTIMETARGET = "libgcc libssp libstdc++-v3" | |||
11 | # libgfortran | 11 | # libgfortran |
12 | 12 | ||
13 | do_configure () { | 13 | do_configure () { |
14 | cp ${CROSS_DIR}/include/gcc-build-internal/* ${S}/gcc | 14 | cp ${STAGING_DIR_NATIVE}${prefix_native}/include/gcc-build-internal/* ${S}/gcc |
15 | for d in ${RUNTIMETARGET}; do | 15 | for d in ${RUNTIMETARGET}; do |
16 | echo "Configuring $d" | 16 | echo "Configuring $d" |
17 | mkdir -p ${B}/$d/ | 17 | mkdir -p ${B}/$d/ |
diff --git a/meta/packages/gcc/gcc-cross-initial_4.3.3.bb b/meta/packages/gcc/gcc-cross-initial_4.3.3.bb index 8a429d54fe..2aae639fbc 100644 --- a/meta/packages/gcc/gcc-cross-initial_4.3.3.bb +++ b/meta/packages/gcc/gcc-cross-initial_4.3.3.bb | |||
@@ -5,6 +5,6 @@ PR = "r1" | |||
5 | 5 | ||
6 | # Hack till we fix *libc properly | 6 | # Hack till we fix *libc properly |
7 | do_install_append() { | 7 | do_install_append() { |
8 | ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ | 8 | 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/ |
9 | } | 9 | } |
10 | 10 | ||
diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb b/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb index 6de46f7e27..eda678ef2f 100644 --- a/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb +++ b/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb | |||
@@ -4,6 +4,6 @@ PR = "r1" | |||
4 | 4 | ||
5 | # Hack till we fix *libc properly | 5 | # Hack till we fix *libc properly |
6 | do_install_append() { | 6 | do_install_append() { |
7 | ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ | 7 | 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/ |
8 | } | 8 | } |
9 | 9 | ||
diff --git a/meta/packages/gcc/gcc-package-cross.inc b/meta/packages/gcc/gcc-package-cross.inc index 396631edd6..04ae78a88b 100644 --- a/meta/packages/gcc/gcc-package-cross.inc +++ b/meta/packages/gcc/gcc-package-cross.inc | |||
@@ -8,8 +8,8 @@ do_install () { | |||
8 | 8 | ||
9 | # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 | 9 | # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 |
10 | # gfortran is fully backwards compatible. This is a safe and practical solution. | 10 | # gfortran is fully backwards compatible. This is a safe and practical solution. |
11 | ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true | 11 | ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true |
12 | ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true | 12 | ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/gfortran ${STAGING_DIR_NATIVE}/${prefix_native}/${TARGET_SYS}/bin/g77 || true |
13 | 13 | ||
14 | # Remove things we don't need but keep share/java | 14 | # Remove things we don't need but keep share/java |
15 | for d in info man share/doc share/locale share/man share/info; do | 15 | for d in info man share/doc share/locale share/man share/info; do |