summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-06-17 00:11:00 +0000
committerRichard Purdie <richard@openedhand.com>2007-06-17 00:11:00 +0000
commit18e36b35ebdc5445f40d802bf3e9e4d1c9c0a55d (patch)
tree719ff7f1f50b42865c3b4ea1eaf6e85f3d8b31bb
parent7e30ceeefeeaff6ca7bb4d8a436948345655b103 (diff)
downloadopenembedded-core-18e36b35ebdc5445f40d802bf3e9e4d1c9c0a55d.tar.gz
openembedded-core-18e36b35ebdc5445f40d802bf3e9e4d1c9c0a55d.tar.bz2
openembedded-core-18e36b35ebdc5445f40d802bf3e9e4d1c9c0a55d.zip
gcc-cross-sdk: Use --with-sysroot option to gcc to fix and simplify configuration
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1961 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/gcc/gcc-cross-sdk_4.1.2.bb6
-rw-r--r--meta/packages/gcc/gcc4-build-sdk.inc16
2 files changed, 10 insertions, 12 deletions
diff --git a/meta/packages/gcc/gcc-cross-sdk_4.1.2.bb b/meta/packages/gcc/gcc-cross-sdk_4.1.2.bb
index c42f419766..305365a143 100644
--- a/meta/packages/gcc/gcc-cross-sdk_4.1.2.bb
+++ b/meta/packages/gcc/gcc-cross-sdk_4.1.2.bb
@@ -1,13 +1,13 @@
-PR = "r2"
+PR = "r3"
inherit sdk
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PACKAGES = "${PN}"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
require gcc_${PV}.bb
require gcc4-build-sdk.inc
require gcc-package-sdk.inc
+EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR}/${BUILD_SYS}"
diff --git a/meta/packages/gcc/gcc4-build-sdk.inc b/meta/packages/gcc/gcc4-build-sdk.inc
index b75e8a57c9..77d326b3ee 100644
--- a/meta/packages/gcc/gcc4-build-sdk.inc
+++ b/meta/packages/gcc/gcc4-build-sdk.inc
@@ -1,19 +1,17 @@
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
-
-STAGING_TARGET_INCDIR = "${STAGING_DIR}/${TARGET_SYS}/include"
-STAGING_TARGET_LIBDIR = "${STAGING_DIR}/${TARGET_SYS}/lib"
+SYSROOT = "${WORKDIR}/sysroot"
+EXTRA_OECONF += "--with-sysroot=${SYSROOT}"
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
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
(cd ${S}/libstdc++-v3 && autoreconf)
oe_runconf
- mkdir -p gcc
- ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as
- ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld
- ln -sf ${STAGING_TARGET_INCDIR}/* ${S}/include
- ln -sf ${STAGING_TARGET_LIBDIR}/crt*.o gcc/
}
do_compile () {
@@ -23,5 +21,5 @@ do_compile () {
export LD_FOR_TARGET="${TARGET_SYS}-ld"
export NM_FOR_TARGET="${TARGET_SYS}-nm"
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
- oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}"
+ oe_runmake
}