summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-12-08 11:02:23 +0000
committerChris Larson <clarson@kergoth.com>2004-12-08 11:02:23 +0000
commit1016c9f974cb6cff0bb82291f3938ded9dcaaf42 (patch)
treeba736ff757051b7d6e275e2c746651ff480748e7 /gcc
parent922acc09ac4c74272b0291a22fb1e466c1689270 (diff)
Updates per the core rename.
BKrev: 41b6df3f1WM7snr9msmSOLS9PzF8Sg
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc-cross-initial_3.3.3.bb28
-rw-r--r--gcc/gcc-cross-initial_3.3.4.bb28
-rw-r--r--gcc/gcc-cross-initial_3.4.1.bb28
-rw-r--r--gcc/gcc-cross-initial_3.4.2.bb28
-rw-r--r--gcc/gcc-cross-initial_3.4.3.bb28
-rw-r--r--gcc/gcc-cross-kernel_3.3.3.bb17
-rw-r--r--gcc/gcc-cross-kernel_3.3.4.bb17
-rw-r--r--gcc/gcc-cross-sdk_3.4.1.bb83
-rw-r--r--gcc/gcc-cross-sdk_3.4.2.bb83
-rw-r--r--gcc/gcc-cross_3.3.3.bb97
-rw-r--r--gcc/gcc-cross_3.3.4.bb100
-rw-r--r--gcc/gcc-cross_3.4.0.bb14
-rw-r--r--gcc/gcc-cross_3.4.1.bb14
-rw-r--r--gcc/gcc-cross_3.4.2.bb14
-rw-r--r--gcc/gcc-cross_3.4.3.bb14
-rw-r--r--gcc/gcc3-build.inc4
-rw-r--r--gcc/gcc_3.3.3.bb197
-rw-r--r--gcc/gcc_3.3.4.bb175
18 files changed, 967 insertions, 2 deletions
diff --git a/gcc/gcc-cross-initial_3.3.3.bb b/gcc/gcc-cross-initial_3.3.3.bb
index e69de29bb2..e3b365da18 100644
--- a/gcc/gcc-cross-initial_3.3.3.bb
+++ b/gcc/gcc-cross-initial_3.3.3.bb
@@ -0,0 +1,28 @@
+SECTION = "devel"
+include gcc-cross_${PV}.bb
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils"
+DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+
+# This is intended to be a -very- basic config
+EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-newlib \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ --enable-target-optspace \
+ --program-prefix=${TARGET_PREFIX} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_stage_prepend () {
+ mkdir -p ${CROSS_DIR}/lib/gcc-lib/${TARGET_SYS}/${PV}
+ ln -sf libgcc.a ${CROSS_DIR}/lib/gcc-lib/${TARGET_SYS}/${PV}/libgcc_eh.a
+}
+
+# Override the method from gcc-cross so we don't try to install libgcc
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/gcc/gcc-cross-initial_3.3.4.bb b/gcc/gcc-cross-initial_3.3.4.bb
index e69de29bb2..e3b365da18 100644
--- a/gcc/gcc-cross-initial_3.3.4.bb
+++ b/gcc/gcc-cross-initial_3.3.4.bb
@@ -0,0 +1,28 @@
+SECTION = "devel"
+include gcc-cross_${PV}.bb
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils"
+DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+
+# This is intended to be a -very- basic config
+EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-newlib \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ --enable-target-optspace \
+ --program-prefix=${TARGET_PREFIX} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_stage_prepend () {
+ mkdir -p ${CROSS_DIR}/lib/gcc-lib/${TARGET_SYS}/${PV}
+ ln -sf libgcc.a ${CROSS_DIR}/lib/gcc-lib/${TARGET_SYS}/${PV}/libgcc_eh.a
+}
+
+# Override the method from gcc-cross so we don't try to install libgcc
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/gcc/gcc-cross-initial_3.4.1.bb b/gcc/gcc-cross-initial_3.4.1.bb
index e69de29bb2..91883d5818 100644
--- a/gcc/gcc-cross-initial_3.4.1.bb
+++ b/gcc/gcc-cross-initial_3.4.1.bb
@@ -0,0 +1,28 @@
+include gcc-cross_${PV}.bb
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils"
+DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+PACKAGES = ""
+
+# This is intended to be a -very- basic config
+EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-newlib \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ --enable-target-optspace \
+ --program-prefix=${TARGET_PREFIX} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_stage_prepend () {
+ mkdir -p ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${PV}
+ ln -sf libgcc.a ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${PV}/libgcc_eh.a
+}
+
+# Override the method from gcc-cross so we don't try to install libgcc
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/gcc/gcc-cross-initial_3.4.2.bb b/gcc/gcc-cross-initial_3.4.2.bb
index e69de29bb2..91883d5818 100644
--- a/gcc/gcc-cross-initial_3.4.2.bb
+++ b/gcc/gcc-cross-initial_3.4.2.bb
@@ -0,0 +1,28 @@
+include gcc-cross_${PV}.bb
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils"
+DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+PACKAGES = ""
+
+# This is intended to be a -very- basic config
+EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-newlib \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ --enable-target-optspace \
+ --program-prefix=${TARGET_PREFIX} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_stage_prepend () {
+ mkdir -p ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${PV}
+ ln -sf libgcc.a ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${PV}/libgcc_eh.a
+}
+
+# Override the method from gcc-cross so we don't try to install libgcc
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/gcc/gcc-cross-initial_3.4.3.bb b/gcc/gcc-cross-initial_3.4.3.bb
index e69de29bb2..91883d5818 100644
--- a/gcc/gcc-cross-initial_3.4.3.bb
+++ b/gcc/gcc-cross-initial_3.4.3.bb
@@ -0,0 +1,28 @@
+include gcc-cross_${PV}.bb
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils"
+DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+PACKAGES = ""
+
+# This is intended to be a -very- basic config
+EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-newlib \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ --enable-target-optspace \
+ --program-prefix=${TARGET_PREFIX} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_stage_prepend () {
+ mkdir -p ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${PV}
+ ln -sf libgcc.a ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${PV}/libgcc_eh.a
+}
+
+# Override the method from gcc-cross so we don't try to install libgcc
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/gcc/gcc-cross-kernel_3.3.3.bb b/gcc/gcc-cross-kernel_3.3.3.bb
index e69de29bb2..7db2409093 100644
--- a/gcc/gcc-cross-kernel_3.3.3.bb
+++ b/gcc/gcc-cross-kernel_3.3.3.bb
@@ -0,0 +1,17 @@
+SECTION = "devel"
+# cut-down gcc for kernel builds
+# only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
+
+include gcc-cross-initial_${PV}.bb
+
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
+
+do_install () {
+ :
+}
+
+do_stage () {
+ cd gcc
+ oe_runmake install-common install-headers install-libgcc
+ install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
+}
diff --git a/gcc/gcc-cross-kernel_3.3.4.bb b/gcc/gcc-cross-kernel_3.3.4.bb
index e69de29bb2..7db2409093 100644
--- a/gcc/gcc-cross-kernel_3.3.4.bb
+++ b/gcc/gcc-cross-kernel_3.3.4.bb
@@ -0,0 +1,17 @@
+SECTION = "devel"
+# cut-down gcc for kernel builds
+# only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
+
+include gcc-cross-initial_${PV}.bb
+
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
+
+do_install () {
+ :
+}
+
+do_stage () {
+ cd gcc
+ oe_runmake install-common install-headers install-libgcc
+ install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
+}
diff --git a/gcc/gcc-cross-sdk_3.4.1.bb b/gcc/gcc-cross-sdk_3.4.1.bb
index e69de29bb2..0668e7fa82 100644
--- a/gcc/gcc-cross-sdk_3.4.1.bb
+++ b/gcc/gcc-cross-sdk_3.4.1.bb
@@ -0,0 +1,83 @@
+SECTION = "devel"
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+LICENSE = "GPL"
+MAINTAINER = "Phil Blundell <pb@handhelds.org>"
+
+inherit autotools sdk
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://gcc34-reverse-compare.patch;patch=1 \
+ file://gcc34-arm-ldm.patch;patch=1 \
+ file://gcc34-arm-ldm-peephole.patch;patch=1 \
+ file://gcc34-arm-tune.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
+ file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
+ file://gcc-3.4.0-arm-nolibfloat.patch;patch=1"
+
+SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
+
+MIRRORS_prepend () {
+${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
+${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
+}
+
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+
+export CPPFLAGS = ""
+export CXXFLAGS = ""
+export CFLAGS = ""
+export LDFLAGS = ""
+
+STAGING_TARGET_INCDIR = "${STAGING_DIR}/${TARGET_SYS}/include"
+STAGING_TARGET_LIBDIR = "${STAGING_DIR}/${TARGET_SYS}/lib"
+
+EXTRA_OECONF = "--with-gnu-ld \
+ --enable-shared \
+ --enable-languages=c,c++,f77 \
+ --enable-threads=posix \
+ --enable-multilib \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --program-prefix=${TARGET_PREFIX} \
+ ${EXTRA_OECONF_PATHS} \
+ ${EXTRA_OECONF_DEP}"
+
+EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
+
+def get_gcc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--with-float=soft"
+ return ""
+
+do_configure () {
+ (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 () {
+ export CC="${BUILD_CC}"
+ export AR_FOR_TARGET="${TARGET_SYS}-ar"
+ export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
+ export LD_FOR_TARGET="${TARGET_SYS}-ld"
+ export NM_FOR_TARGET="${TARGET_SYS}-nm"
+ export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc"
+ oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}"
+}
+
+do_install () {
+ autotools_do_install
+}
diff --git a/gcc/gcc-cross-sdk_3.4.2.bb b/gcc/gcc-cross-sdk_3.4.2.bb
index e69de29bb2..0668e7fa82 100644
--- a/gcc/gcc-cross-sdk_3.4.2.bb
+++ b/gcc/gcc-cross-sdk_3.4.2.bb
@@ -0,0 +1,83 @@
+SECTION = "devel"
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+LICENSE = "GPL"
+MAINTAINER = "Phil Blundell <pb@handhelds.org>"
+
+inherit autotools sdk
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://gcc34-reverse-compare.patch;patch=1 \
+ file://gcc34-arm-ldm.patch;patch=1 \
+ file://gcc34-arm-ldm-peephole.patch;patch=1 \
+ file://gcc34-arm-tune.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
+ file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
+ file://gcc-3.4.0-arm-nolibfloat.patch;patch=1"
+
+SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
+
+MIRRORS_prepend () {
+${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
+${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
+}
+
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+
+export CPPFLAGS = ""
+export CXXFLAGS = ""
+export CFLAGS = ""
+export LDFLAGS = ""
+
+STAGING_TARGET_INCDIR = "${STAGING_DIR}/${TARGET_SYS}/include"
+STAGING_TARGET_LIBDIR = "${STAGING_DIR}/${TARGET_SYS}/lib"
+
+EXTRA_OECONF = "--with-gnu-ld \
+ --enable-shared \
+ --enable-languages=c,c++,f77 \
+ --enable-threads=posix \
+ --enable-multilib \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --program-prefix=${TARGET_PREFIX} \
+ ${EXTRA_OECONF_PATHS} \
+ ${EXTRA_OECONF_DEP}"
+
+EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
+
+def get_gcc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--with-float=soft"
+ return ""
+
+do_configure () {
+ (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 () {
+ export CC="${BUILD_CC}"
+ export AR_FOR_TARGET="${TARGET_SYS}-ar"
+ export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
+ export LD_FOR_TARGET="${TARGET_SYS}-ld"
+ export NM_FOR_TARGET="${TARGET_SYS}-nm"
+ export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc"
+ oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}"
+}
+
+do_install () {
+ autotools_do_install
+}
diff --git a/gcc/gcc-cross_3.3.3.bb b/gcc/gcc-cross_3.3.3.bb
index e69de29bb2..b8492396c0 100644
--- a/gcc/gcc-cross_3.3.3.bb
+++ b/gcc/gcc-cross_3.3.3.bb
@@ -0,0 +1,97 @@
+SECTION = "devel"
+include gcc_${PV}.bb
+inherit cross
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# Files for these are defined in the main gcc.oe
+PACKAGES = "libgcc libstdc++ libg2c"
+INHIBIT_PACKAGE_STRIP = 1
+
+EXTRA_OECONF_PATHS = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++"
+
+export CPPFLAGS = ""
+export CXXFLAGS = ""
+export CFLAGS = ""
+export LDFLAGS = ""
+
+do_configure () {
+ export CC="${BUILD_CC}"
+ export AR="${TARGET_SYS}-ar"
+ export RANLIB="${TARGET_SYS}-ranlib"
+ export LD="${TARGET_SYS}-ld"
+ export NM="${TARGET_SYS}-nm"
+ rm -f ${CROSS_DIR}/lib/gcc-lib/${TARGET_SYS}/${PV}/libgcc_eh.a
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_compile_prepend () {
+ export CC="${BUILD_CC}"
+ export AR_FOR_TARGET="${TARGET_SYS}-ar"
+ export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
+ export LD_FOR_TARGET="${TARGET_SYS}-ld"
+ export NM_FOR_TARGET="${TARGET_SYS}-nm"
+ export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc"
+}
+
+do_stage_append () {
+ for d in info man share/doc share/locale ; do
+ rm -rf ${CROSS_DIR}/$d
+ done
+
+ # These aren't useful on the cross toolchain
+ rm -f ${CROSS_DIR}/bin/*gcov
+ rm -f ${CROSS_DIR}/bin/*gccbug
+
+ # Fix a few include links so cross builds are happier
+ if [ ! -e ${STAGING_INCDIR}/c++ ]; then
+ mkdir -p ${STAGING_INCDIR}
+ rm -f ${STAGING_INCDIR}/c++
+ ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
+ ${STAGING_INCDIR}/
+ fi
+
+ # We use libiberty from binutils
+ rm -f ${CROSS_DIR}/lib/libiberty.a
+
+ # We probably don't need these
+ rmdir ${CROSS_DIR}/include || :
+
+ # We don't really need to keep this around
+ rm -rf ${CROSS_DIR}/share
+}
+
+python do_package() {
+ if bb.data.getVar('DEBIAN_NAMES', d, 1):
+ bb.data.setVar('PKG_libgcc', 'libgcc1', d)
+ bb.build.exec_func('package_do_package', d)
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # Move libgcc_s into /lib
+ mkdir -p ${D}/lib
+ if [ "${BUILD_SYS}" == "${TARGET_SYS}" ]; then
+ # native builds drop one pathname component
+ mv -f ${D}/${prefix}/lib/libgcc_s.so.* ${D}/lib
+ else
+ mv -f ${D}/${prefix}/*/lib/libgcc_s.so.* ${D}/lib
+ fi
+
+ # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
+ TGT_LIBDIR=`echo ${libdir} | sed -e 's,${CROSS_DIR},/usr,'`
+ mkdir -p ${D}/${TGT_LIBDIR}
+ mv -f ${D}/${prefix}/*/lib/libstdc++.so.* ${D}/${TGT_LIBDIR}
+ mv -f ${D}/${prefix}/*/lib/libg2c.so.* ${D}/${TGT_LIBDIR}
+
+ # Manually run the target stripper since we won't get it run by
+ # the packaging.
+ ${TARGET_PREFIX}strip ${D}/${TGT_LIBDIR}/libstdc++.so.*
+ ${TARGET_PREFIX}strip ${D}/${TGT_LIBDIR}/libg2c.so.*
+ ${TARGET_PREFIX}strip ${D}/lib/libgcc_s.so.*
+}
diff --git a/gcc/gcc-cross_3.3.4.bb b/gcc/gcc-cross_3.3.4.bb
index e69de29bb2..ff657b1d8b 100644
--- a/gcc/gcc-cross_3.3.4.bb
+++ b/gcc/gcc-cross_3.3.4.bb
@@ -0,0 +1,100 @@
+SECTION = "devel"
+include gcc_${PV}.bb
+inherit cross
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# Files for these are defined in the main gcc.oe
+PACKAGES = "libgcc libstdc++ libg2c"
+OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
+INHIBIT_PACKAGE_STRIP = 1
+
+EXTRA_OECONF_PATHS = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++"
+
+export CPPFLAGS = ""
+export CXXFLAGS = ""
+export CFLAGS = ""
+export LDFLAGS = ""
+
+do_configure () {
+ export CC="${BUILD_CC}"
+ export AR="${TARGET_SYS}-ar"
+ export RANLIB="${TARGET_SYS}-ranlib"
+ export LD="${TARGET_SYS}-ld"
+ export NM="${TARGET_SYS}-nm"
+ rm -f ${CROSS_DIR}/lib/gcc-lib/${TARGET_SYS}/${PV}/libgcc_eh.a
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_compile_prepend () {
+ export CC="${BUILD_CC}"
+ export AR_FOR_TARGET="${TARGET_SYS}-ar"
+ export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
+ export LD_FOR_TARGET="${TARGET_SYS}-ld"
+ export NM_FOR_TARGET="${TARGET_SYS}-nm"
+ export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc"
+}
+
+do_stage_append () {
+ for d in info man share/doc share/locale ; do
+ rm -rf ${CROSS_DIR}/$d
+ done
+
+ # These aren't useful on the cross toolchain
+ rm -f ${CROSS_DIR}/bin/*gcov
+ rm -f ${CROSS_DIR}/bin/*gccbug
+
+ # Fix a few include links so cross builds are happier
+ if [ ! -e ${STAGING_INCDIR}/c++ ]; then
+ mkdir -p ${STAGING_INCDIR}
+ rm -f ${STAGING_INCDIR}/c++
+ ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
+ ${STAGING_INCDIR}/
+ fi
+
+ # We use libiberty from binutils
+ rm -f ${CROSS_DIR}/lib/libiberty.a
+
+ # We probably don't need these
+ rmdir ${CROSS_DIR}/include || :
+
+ # We don't really need to keep this around
+ rm -rf ${CROSS_DIR}/share
+}
+
+python do_package() {
+ if bb.data.getVar('DEBIAN_NAMES', d, 1):
+ bb.data.setVar('PKG_libgcc', 'libgcc1', d)
+ bb.build.exec_func('package_do_package', d)
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # Move libgcc_s into /lib
+ mkdir -p ${D}/lib
+ if [ "${BUILD_SYS}" == "${TARGET_SYS}" ]; then
+ # native builds drop one pathname component
+ mv -f ${D}/${prefix}/lib/libgcc_s.so.* ${D}/lib
+ else
+ mv -f ${D}/${prefix}/*/lib/libgcc_s.so.* ${D}/lib
+ fi
+
+ # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
+ TGT_LIBDIR=`echo ${libdir} | sed -e 's,${CROSS_DIR},/usr,'`
+ mkdir -p ${D}/${TGT_LIBDIR}
+ mv -f ${D}/${prefix}/*/lib/libstdc++.so.* ${D}/${TGT_LIBDIR}
+ mv -f ${D}/${prefix}/*/lib/libg2c.so.* ${D}/${TGT_LIBDIR}
+
+ # Manually run the target stripper since we won't get it run by
+ # the packaging.
+ if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
+ ${TARGET_PREFIX}strip ${D}/${TGT_LIBDIR}/libstdc++.so.*
+ ${TARGET_PREFIX}strip ${D}/${TGT_LIBDIR}/libg2c.so.*
+ ${TARGET_PREFIX}strip ${D}/lib/libgcc_s.so.*
+ fi
+}
diff --git a/gcc/gcc-cross_3.4.0.bb b/gcc/gcc-cross_3.4.0.bb
index e69de29bb2..87cedefd06 100644
--- a/gcc/gcc-cross_3.4.0.bb
+++ b/gcc/gcc-cross_3.4.0.bb
@@ -0,0 +1,14 @@
+include gcc_${PV}.bb
+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"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# Files for these are defined in the main gcc.oe
+PACKAGES = "libgcc libstdc++ libg2c"
+
+include gcc3-cross-build.inc
diff --git a/gcc/gcc-cross_3.4.1.bb b/gcc/gcc-cross_3.4.1.bb
index e69de29bb2..87cedefd06 100644
--- a/gcc/gcc-cross_3.4.1.bb
+++ b/gcc/gcc-cross_3.4.1.bb
@@ -0,0 +1,14 @@
+include gcc_${PV}.bb
+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"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# Files for these are defined in the main gcc.oe
+PACKAGES = "libgcc libstdc++ libg2c"
+
+include gcc3-cross-build.inc
diff --git a/gcc/gcc-cross_3.4.2.bb b/gcc/gcc-cross_3.4.2.bb
index e69de29bb2..87cedefd06 100644
--- a/gcc/gcc-cross_3.4.2.bb
+++ b/gcc/gcc-cross_3.4.2.bb
@@ -0,0 +1,14 @@
+include gcc_${PV}.bb
+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"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# Files for these are defined in the main gcc.oe
+PACKAGES = "libgcc libstdc++ libg2c"
+
+include gcc3-cross-build.inc
diff --git a/gcc/gcc-cross_3.4.3.bb b/gcc/gcc-cross_3.4.3.bb
index e69de29bb2..c0562e2c25 100644
--- a/gcc/gcc-cross_3.4.3.bb
+++ b/gcc/gcc-cross_3.4.3.bb
@@ -0,0 +1,14 @@
+include gcc_${PV}.bb
+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"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# Files for these are defined in the main gcc.oe
+PACKAGES = "libgcc libstdc++ libg2c"
+
+include gcc3-cross-build.inc
diff --git a/gcc/gcc3-build.inc b/gcc/gcc3-build.inc
index 1e1ad898b3..7d3e0169da 100644
--- a/gcc/gcc3-build.inc
+++ b/gcc/gcc3-build.inc
@@ -29,10 +29,10 @@ EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
EXTRA_OECONF_DEP = ""
EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
-EXTRA_OECONF += "${@get_gcc_fpu_setting(oe, d)}"
+EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
CPPFLAGS = ""
-def get_gcc_fpu_setting(oe, d):
+def get_gcc_fpu_setting(bb, d):
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
return "--with-float=soft"
return ""
diff --git a/gcc/gcc_3.3.3.bb b/gcc/gcc_3.3.3.bb
index e69de29bb2..33a9a3083c 100644
--- a/gcc/gcc_3.3.3.bb
+++ b/gcc/gcc_3.3.3.bb
@@ -0,0 +1,197 @@
+SECTION = "devel"
+PR = "r1"
+inherit autotools gettext
+
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+LICENSE = "GPL"
+MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
+
+# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
+# packaged in the respective cross packages.
+PACKAGES = "${PN} ${PN}-symlinks \
+ ${PN}-c++ ${PN}-c++-symlinks \
+ ${PN}-f77 ${PN}-f77-symlinks \
+ libstdc++-dev libg2c-dev \
+ ${PN}-doc"
+
+FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
+ ${bindir}/${TARGET_PREFIX}cpp \
+ ${bindir}/${TARGET_PREFIX}gcov \
+ ${bindir}/${TARGET_PREFIX}gccbug \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1 \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/collect2 \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/crt* \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/specs \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/lib* \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include"
+
+FILES_${PN}-symlinks = "${bindir}/cc \
+ ${bindir}/gcc \
+ ${bindir}/cpp \
+ ${bindir}/gcov \
+ ${bindir}/gccbug"
+
+FILES_${PN}-c++ = "${bindir}/${TARGET_PREFIX}g++ \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1plus"
+
+FILES_${PN}-c++-symlinks = "${bindir}/c++ \
+ ${bindir}/g++"
+
+PACKAGE_ARCH_libgcc = "${TARGET_ARCH}"
+FILES_libgcc = "/lib/libgcc_s.so.*"
+
+PACKAGE_ARCH_libstdc++ = "${TARGET_ARCH}"
+PACKAGE_ARCH_libstdc++-dev = "${TARGET_ARCH}"
+# Called from within gcc-cross, so libdir is set wrong
+#FILES_libstdc++ = "${libdir}/libstdc++.so.*"
+FILES_libstdc++ = "/usr/lib/libstdc++.so.*"
+
+FILES_libstdc++-dev = "${includedir}/c++/${PV} \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++.la \
+ ${libdir}/libstdc++.a \
+ ${libdir}/libsupc++.la \
+ ${libdir}/libsupc++.a"
+
+FILES_${PN}-doc = "${infodir} \
+ ${mandir} \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include/README"
+
+SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://config.sub.patch;patch=1 \
+ file://empty6.patch;patch=1 \
+ file://pr10392-1-test.patch;patch=1 \
+ file://pr10412-1-test.patch;patch=1 \
+ file://pr10589-1-test.patch;patch=1 \
+ file://pr11162-1-test.patch;patch=1 \
+ file://pr11587-1-test.patch;patch=1 \
+ file://pr11608.patch;patch=1 \
+ file://pr11736-1-test.patch;patch=1 \
+ file://pr11864-1-test.patch;patch=1 \
+ file://pr12009.patch;patch=1 \
+ file://pr12010.patch;patch=1 \
+ file://pr13260-test.patch;patch=1 \
+ file://pr9365-1-test.patch;patch=1 \
+ file://sh-lib1funcs_sizeAndType.patch;patch=1 \
+ file://sh-pic-set_fpscr-gcc-3.3.2.patch;patch=1 \
+ file://thunk3.patch;patch=1 \
+ file://arm-10730.dpatch;patch=1;pnum=0 \
+ file://arm-12527.dpatch;patch=1;pnum=0 \
+ file://arm-14558.dpatch;patch=1;pnum=0 \
+ file://arm-common.dpatch;patch=1;pnum=0 \
+ file://arm-gotoff.dpatch;patch=1;pnum=0 \
+ file://arm-ldm.dpatch;patch=1;pnum=0 \
+ file://arm-tune.patch;patch=1;pnum=0 \
+ file://arm-xscale.patch;patch=1;pnum=0 \
+ file://arm-14302.patch;patch=1;pnum=0 \
+ file://arm-ldm-peephole.patch;patch=1;pnum=0 \
+ file://libibery-crosstool.patch;patch=1;pnum=1 \
+ file://reverse-compare.patch;patch=1 \
+ file://gcc34-15089.patch;patch=1 \
+ file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
+ file://gcc-uclibc-3.3-200-code.patch;patch=1"
+
+MIRRORS_prepend () {
+${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
+}
+
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
+ --with-gnu-ld \
+ --enable-shared \
+ --enable-multilib \
+ --enable-target-optspace \
+ --enable-languages=c,c++,f77 \
+ --enable-threads=posix \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --program-prefix=${TARGET_PREFIX} \
+ ${EXTRA_OECONF_PATHS} \
+ ${EXTRA_OECONF_DEP}"
+
+EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
+ --with-gxx-include-dir=${includedir}/c++/${PV}"
+
+EXTRA_OECONF_DEP = ""
+EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
+EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
+EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
+
+def get_gcc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--with-float=soft"
+ return ""
+
+python __anonymous () {
+ import bb, re
+ if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
+ bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
+ elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
+ bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
+}
+
+do_configure () {
+ # Setup these vars for cross building only
+ if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
+ export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
+ export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
+ export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
+ export AS_FOR_TARGET="${HOST_PREFIX}as"
+ export LD_FOR_TARGET="${HOST_PREFIX}ld"
+ export NM_FOR_TARGET="${HOST_PREFIX}nm"
+ export AR_FOR_TARGET="${HOST_PREFIX}ar"
+ export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
+ fi
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_install () {
+ autotools_do_install
+
+ # Cleanup some of the gcc-lib stuff
+ rm -rf ${D}/${libdir}/gcc-lib/${TARGET_SYS}/${PV}/install-tools
+
+ # Move libgcc_s into /lib
+ mkdir -p ${D}/lib
+ mv -f ${D}/${libdir}/libgcc_s.so.* ${D}/lib
+ rm -f ${D}/${libdir}/libgcc_s.so
+ ln -sf `echo ${libdir}/gcc-lib/${TARGET_SYS}/${PV} | tr -s / |
+ sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.? \
+ ${D}/${libdir}/gcc-lib/${TARGET_SYS}/${PV}/libgcc_s.so
+
+ # Cleanup manpages..
+ rm -rf ${D}/${mandir}/man7
+ mv ${D}/${mandir}/man1/cpp.1 \
+ ${D}/${mandir}/man1/${TARGET_SYS}-cpp.1
+ mv ${D}/${mandir}/man1/gcov.1 \
+ ${D}/${mandir}/man1/${TARGET_SYS}-gcov.1
+
+ # We use libiberty from binutils
+ rm -f ${D}/${libdir}/libiberty.a
+
+ cd ${D}/${bindir}
+
+ # We care about g++ not c++
+ rm -f *c++
+
+ # We don't care about the gcc-<version> ones for this
+ rm -f *gcc-?.?*
+
+ # These sometimes show up, they are strange, we remove them
+ rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
+
+ # Symlinks so we can use these trivially on the target
+ ln -sf ${TARGET_SYS}-g77 g77
+ ln -sf ${TARGET_SYS}-g++ g++
+ ln -sf ${TARGET_SYS}-gcc gcc
+ ln -sf g77 f77
+ ln -sf g++ c++
+ ln -sf gcc cc
+}
diff --git a/gcc/gcc_3.3.4.bb b/gcc/gcc_3.3.4.bb
index e69de29bb2..5468cd630c 100644
--- a/gcc/gcc_3.3.4.bb
+++ b/gcc/gcc_3.3.4.bb
@@ -0,0 +1,175 @@
+SECTION = "devel"
+PR = "r1"
+inherit autotools gettext
+
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+LICENSE = "GPL"
+MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
+
+# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
+# packaged in the respective cross packages.
+PACKAGES = "${PN} ${PN}-symlinks \
+ ${PN}-c++ ${PN}-c++-symlinks \
+ ${PN}-f77 ${PN}-f77-symlinks \
+ libstdc++-dev libg2c-dev \
+ ${PN}-doc"
+
+FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
+ ${bindir}/${TARGET_PREFIX}cpp \
+ ${bindir}/${TARGET_PREFIX}gcov \
+ ${bindir}/${TARGET_PREFIX}gccbug \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1 \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/collect2 \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/crt* \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/specs \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/lib* \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include"
+
+FILES_${PN}-symlinks = "${bindir}/cc \
+ ${bindir}/gcc \
+ ${bindir}/cpp \
+ ${bindir}/gcov \
+ ${bindir}/gccbug"
+
+FILES_${PN}-c++ = "${bindir}/${TARGET_PREFIX}g++ \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1plus"
+
+FILES_${PN}-c++-symlinks = "${bindir}/c++ \
+ ${bindir}/g++"
+
+PACKAGE_ARCH_libgcc = "${TARGET_ARCH}"
+FILES_libgcc = "/lib/libgcc_s.so.*"
+
+PACKAGE_ARCH_libstdc++ = "${TARGET_ARCH}"
+PACKAGE_ARCH_libstdc++-dev = "${TARGET_ARCH}"
+# Called from within gcc-cross, so libdir is set wrong
+#FILES_libstdc++ = "${libdir}/libstdc++.so.*"
+FILES_libstdc++ = "/usr/lib/libstdc++.so.*"
+
+FILES_libstdc++-dev = "${includedir}/c++/${PV} \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++.la \
+ ${libdir}/libstdc++.a \
+ ${libdir}/libsupc++.la \
+ ${libdir}/libsupc++.a"
+
+FILES_${PN}-doc = "${infodir} \
+ ${mandir} \
+ ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include/README"
+
+SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://arm-gotoff.dpatch;patch=1;pnum=0 \
+ file://arm-ldm.dpatch;patch=1;pnum=0 \
+ file://arm-tune.patch;patch=1;pnum=0 \
+ file://arm-ldm-peephole.patch;patch=1;pnum=0 \
+ file://libibery-crosstool.patch;patch=1;pnum=1 \
+ file://reverse-compare.patch;patch=1 \
+ file://gcc34-15089.patch;patch=1 \
+ file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
+ file://gcc-uclibc-3.3-200-code.patch;patch=1"
+
+PREMIRRORS_prepend () {
+${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
+${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
+}
+
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
+ --with-gnu-ld \
+ --enable-shared \
+ --enable-multilib \
+ --enable-target-optspace \
+ --enable-languages=c,c++,f77 \
+ --enable-threads=posix \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --program-prefix=${TARGET_PREFIX} \
+ ${EXTRA_OECONF_PATHS} \
+ ${EXTRA_OECONF_DEP}"
+
+EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
+ --with-gxx-include-dir=${includedir}/c++/${PV}"
+
+EXTRA_OECONF_DEP = ""
+EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
+EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
+EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
+
+def get_gcc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--with-float=soft"
+ return ""
+
+python __anonymous () {
+ import bb, re
+ if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
+ bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
+ elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
+ bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
+}
+
+do_configure () {
+ # Setup these vars for cross building only
+ if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
+ export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
+ export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
+ export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
+ export AS_FOR_TARGET="${HOST_PREFIX}as"
+ export LD_FOR_TARGET="${HOST_PREFIX}ld"
+ export NM_FOR_TARGET="${HOST_PREFIX}nm"
+ export AR_FOR_TARGET="${HOST_PREFIX}ar"
+ export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
+ fi
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_install () {
+ autotools_do_install
+
+ # Cleanup some of the gcc-lib stuff
+ rm -rf ${D}/${libdir}/gcc-lib/${TARGET_SYS}/${PV}/install-tools
+
+ # Move libgcc_s into /lib
+ mkdir -p ${D}/lib
+ mv -f ${D}/${libdir}/libgcc_s.so.* ${D}/lib
+ rm -f ${D}/${libdir}/libgcc_s.so
+ ln -sf `echo ${libdir}/gcc-lib/${TARGET_SYS}/${PV} | tr -s / |
+ sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.? \
+ ${D}/${libdir}/gcc-lib/${TARGET_SYS}/${PV}/libgcc_s.so
+
+ # Cleanup manpages..
+ rm -rf ${D}/${mandir}/man7
+ mv ${D}/${mandir}/man1/cpp.1 \
+ ${D}/${mandir}/man1/${TARGET_SYS}-cpp.1
+ mv ${D}/${mandir}/man1/gcov.1 \
+ ${D}/${mandir}/man1/${TARGET_SYS}-gcov.1
+
+ # We use libiberty from binutils
+ rm -f ${D}/${libdir}/libiberty.a
+
+ cd ${D}/${bindir}
+
+ # We care about g++ not c++
+ rm -f *c++
+
+ # We don't care about the gcc-<version> ones for this
+ rm -f *gcc-?.?*
+
+ # These sometimes show up, they are strange, we remove them
+ rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
+
+ # Symlinks so we can use these trivially on the target
+ ln -sf ${TARGET_SYS}-g77 g77
+ ln -sf ${TARGET_SYS}-g++ g++
+ ln -sf ${TARGET_SYS}-gcc gcc
+ ln -sf g77 f77
+ ln -sf g++ c++
+ ln -sf gcc cc
+}