gcc: Enable sysroot options, hacking around path layout issues for now. This fixes...
authorRichard Purdie <rpurdie@rpsys.net>
Thu, 28 Feb 2008 00:04:07 +0000 (00:04 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Thu, 28 Feb 2008 00:04:07 +0000 (00:04 +0000)
19 files changed:
packages/gcc/gcc-cross-initial.inc
packages/gcc/gcc-cross-sdk_3.4.3.bb
packages/gcc/gcc-cross-sdk_3.4.4.bb
packages/gcc/gcc-cross-sdk_4.1.0.bb
packages/gcc/gcc-cross-sdk_4.1.1.bb
packages/gcc/gcc-cross-sdk_4.1.2.bb
packages/gcc/gcc-cross-sdk_4.2.2.bb
packages/gcc/gcc-cross_3.4.3.bb
packages/gcc/gcc-cross_3.4.4.bb
packages/gcc/gcc-cross_4.0.0.bb
packages/gcc/gcc-cross_4.0.2.bb
packages/gcc/gcc-cross_4.1.0.bb
packages/gcc/gcc-cross_4.1.1.bb
packages/gcc/gcc-cross_4.1.2.bb
packages/gcc/gcc-cross_4.2.1.bb
packages/gcc/gcc-cross_4.2.2.bb
packages/gcc/gcc3-build-cross.inc
packages/gcc/gcc3-build-sdk.inc
packages/gcc/gcc4-build-sdk.inc

index 7c56afe..2165bf2 100644 (file)
@@ -4,7 +4,7 @@ PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
 PACKAGES = ""
 
 # This is intended to be a -very- basic config
-EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR}/${TARGET_SYS} \
+EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
                --with-newlib \
                --disable-shared \
                --disable-threads \
index e6907de..a8e9a67 100644 (file)
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/gcc/"
 SECTION = "devel"
 LICENSE = "GPL"
 require gcc_${PV}.bb
-PR = "r0"
+PR = "r1"
 
 inherit sdk
 
index 038d390..4b2c583 100644 (file)
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/gcc/"
 SECTION = "devel"
 LICENSE = "GPL"
 require gcc_${PV}.bb
-PR = "r2"
+PR = "r3"
 
 inherit sdk
 
index 2308f2f..cd9fe9e 100644 (file)
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/gcc/"
 SECTION = "devel"
 LICENSE = "GPL"
 require gcc_${PV}.bb
-PR = "r1"
+PR = "r2"
 
 inherit sdk
 
index e2efde1..1b5ad5e 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "The GNU cc and gcc C compilers."
 HOMEPAGE = "http://www.gnu.org/software/gcc/"
 SECTION = "devel"
 LICENSE = "GPL"
-PR = "r2"
+PR = "r3"
 
 inherit sdk
 
index 2fdaa7d..ba36069 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "The GNU cc and gcc C compilers."
 HOMEPAGE = "http://www.gnu.org/software/gcc/"
 SECTION = "devel"
 LICENSE = "GPL"
-PR = "r2"
+PR = "r3"
 
 inherit sdk
 
index cec0505..7ba0296 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r12"
+PR = "r13"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 83c0055..3248e8d 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r7"
+PR = "r8"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 63d0f70..716f54b 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r3"
+PR = "r4"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 44ceb4f..5b1ff0b 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r9"
+PR = "r10"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 5719afb..6dddb45 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r4"
+PR = "r5"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 02912f2..4d79d2d 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r17"
+PR = "r18"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 306cf95..c5b1d81 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .bb changes something that affects its *build*
 # remember to increment this one too.
-PR = "r13"
+PR = "r14"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 27816e7..3ee8fba 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r10"
+PR = "r11"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index daf0e65..d63d055 100644 (file)
@@ -5,7 +5,7 @@ inherit cross
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 # NOTE: split PR.  If the main .oe changes something that affects its *build*
 # remember to increment this one too.
-PR = "r3"
+PR = "r4"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
index 0d7f323..1d744c1 100644 (file)
@@ -1,7 +1,9 @@
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
 
-EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR}/${TARGET_SYS} \
-                     --with-gxx-include-dir=${STAGING_DIR}/${TARGET_SYS}/include/c++"
+EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
+                     --with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
+                      --with-sysroot=${STAGING_DIR_TARGET} \
+                      --with-build-sysroot=${STAGING_DIR_TARGET}"
 
 do_configure_prepend () {
        rm -f ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a
@@ -21,6 +23,11 @@ do_stage_append () {
                rm -rf ${CROSS_DIR}/$d
        done
 
+    # Hack to be removed when staging layout matches the target layout
+    if [ ! -e ${STAGING_DIR_TARGET}/usr ]; then
+        ln -s ${STAGING_DIR_TARGET} ${STAGING_DIR_TARGET}/usr
+    fi
+
        # Fix a few include links so cross builds are happier
        if [ ! -e ${STAGING_INCDIR}/c++ ]; then
                mkdir -p ${STAGING_INCDIR}
index e2ec956..aa54021 100644 (file)
@@ -2,8 +2,8 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
 
 SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
 
-STAGING_TARGET_INCDIR = "${STAGING_DIR}/${TARGET_SYS}/include"
-STAGING_TARGET_LIBDIR = "${STAGING_DIR}/${TARGET_SYS}/lib"
+STAGING_TARGET_INCDIR = "${STAGING_DIR_TARGET}${layout_includedir}"
+STAGING_TARGET_LIBDIR = "${STAGING_DIR_TARGET}${layout_libdir}"
 
 do_configure () {
        (cd ${S} && gnu-configize) || die "failure running gnu-configize"
index 77d326b..1052645 100644 (file)
@@ -1,14 +1,13 @@
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
 
-SYSROOT = "${WORKDIR}/sysroot"
-EXTRA_OECONF += "--with-sysroot=${SYSROOT}"
+EXTRA_OECONF += "--with-sysroot=${prefix}/${TARGET_SYS} --with-build-sysroot=${STAGING_DIR_TARGET}"
 
 do_configure () {
-       # Work around Hardcoded path assumptions in gcc
-       mkdir -p ${SYSROOT}/usr/
-       ln -s ${STAGING_DIR}/${TARGET_SYS}/include ${SYSROOT}/usr/include
-       ln -s ${STAGING_DIR}/${TARGET_SYS}/lib ${SYSROOT}/usr/lib
+       # Hack to be removed when staging layout matches the target layout
+       if [ ! -e ${STAGING_DIR_TARGET}/usr ]; then
+           ln -s ${STAGING_DIR_TARGET} ${STAGING_DIR_TARGET}/usr
+       fi
        (cd ${S} && gnu-configize) || die "failure running gnu-configize"
        (cd ${S}/libstdc++-v3 && autoreconf)
        oe_runconf