summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc-cross_3.3.1.oe52
-rw-r--r--gcc/gcc-initial-cross_3.3.1.oe15
-rw-r--r--gcc/gcc-initial-uclibc-cross_3.3.1.oe16
-rw-r--r--gcc/gcc-uclibc-cross_3.3.1.oe54
-rw-r--r--gcc/gcc-uclibc_3.3.1.oe46
5 files changed, 183 insertions, 0 deletions
diff --git a/gcc/gcc-cross_3.3.1.oe b/gcc/gcc-cross_3.3.1.oe
index e69de29bb2..bb6c572bd2 100644
--- a/gcc/gcc-cross_3.3.1.oe
+++ b/gcc/gcc-cross_3.3.1.oe
@@ -0,0 +1,52 @@
+inherit cross
+include gcc_${PV}.oe
+
+DEPENDS := virtual/${TARGET_SYS}-binutils \
+ virtual/glibc virtual/glibc-headers patcher
+PROVIDES := virtual/${TARGET_SYS}-gcc \
+ virtual/${TARGET_SYS}-g++
+
+PACKAGES =
+
+EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/usr/local \
+ --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++ \
+ --enable-target-optspace \
+ --with-gnu-ld \
+ --enable-languages=c,c++ \
+ --enable-shared \
+ --enable-multilib \
+ --program-prefix=${TARGET_SYS}-
+
+export CPPFLAGS =
+export CXXFLAGS =
+export CFLAGS =
+export LDFLAGS =
+
+do_configure_prepend () {
+ export CC="${BUILD_CC}"
+ export AR="${TARGET_SYS}-ar"
+ export RANLIB="${TARGET_SYS}-ranlib"
+ export LD="${TARGET_SYS}-ld"
+ export NM="${TARGET_SYS}-nm"
+}
+
+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 () {
+# # Cleanup after gcc's --program-prefix failing..
+# ( cd ${CROSS_DIR}/bin ; for p in ${TARGET_SYS}-* ; do
+# mv $p `echo $p | sed -e s,${TARGET_SYS},${TARGET_ARCH}-uclibc,`
+# done )
+
+ rm -f ${CROSS_DIR}/bin/gccbug ${CROSS_DIR}/bin/gcov
+ for d in info man share/doc share/locale ; do
+ rm -rf ${CROSS_DIR}/$d
+ done
+}
diff --git a/gcc/gcc-initial-cross_3.3.1.oe b/gcc/gcc-initial-cross_3.3.1.oe
index e69de29bb2..54c1004ad8 100644
--- a/gcc/gcc-initial-cross_3.3.1.oe
+++ b/gcc/gcc-initial-cross_3.3.1.oe
@@ -0,0 +1,15 @@
+include gcc-cross_${PV}.oe
+
+DEPENDS := virtual/${TARGET_SYS}-binutils \
+ virtual/glibc-headers patcher
+PROVIDES := virtual/${TARGET_SYS}-gcc-initial
+
+EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/usr/local \
+ --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++ \
+ --enable-target-optspace \
+ --disable-nls \
+ --with-gnu-ld \
+ --enable-languages=c \
+ --disable-shared \
+ --enable-multilib \
+ --program-prefix=${TARGET_SYS}-
diff --git a/gcc/gcc-initial-uclibc-cross_3.3.1.oe b/gcc/gcc-initial-uclibc-cross_3.3.1.oe
index e69de29bb2..8ed3f74870 100644
--- a/gcc/gcc-initial-uclibc-cross_3.3.1.oe
+++ b/gcc/gcc-initial-uclibc-cross_3.3.1.oe
@@ -0,0 +1,16 @@
+include gcc-uclibc-cross_${PV}.oe
+
+DEPENDS := virtual/${TARGET_SYS}-binutils \
+ virtual/uclibc-headers patcher
+PROVIDES := virtual/${TARGET_SYS}-gcc-initial
+
+EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/usr/local \
+ --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++ \
+ --enable-target-optspace \
+ --disable-nls \
+ --with-gnu-ld \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ --disable-shared \
+ --enable-multilib \
+ --program-prefix=${TARGET_SYS}-
diff --git a/gcc/gcc-uclibc-cross_3.3.1.oe b/gcc/gcc-uclibc-cross_3.3.1.oe
index e69de29bb2..703c1b994d 100644
--- a/gcc/gcc-uclibc-cross_3.3.1.oe
+++ b/gcc/gcc-uclibc-cross_3.3.1.oe
@@ -0,0 +1,54 @@
+inherit cross
+include gcc-uclibc_${PV}.oe
+
+DEPENDS := virtual/${TARGET_SYS}-binutils \
+ virtual/uclibc virtual/uclibc-headers patcher
+PROVIDES := virtual/${TARGET_SYS}-gcc \
+ virtual/${TARGET_SYS}-g++
+
+PACKAGES =
+
+EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/usr/local \
+ --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++ \
+ --enable-target-optspace \
+ --disable-nls \
+ --with-gnu-ld \
+ --disable-__cxa_atexit \
+ --enable-languages=c,c++ \
+ --enable-shared \
+ --enable-multilib \
+ --program-prefix=${TARGET_SYS}-
+
+export CPPFLAGS =
+export CXXFLAGS =
+export CFLAGS =
+export LDFLAGS =
+
+do_configure_prepend () {
+ export CC="${BUILD_CC}"
+ export AR="${TARGET_SYS}-ar"
+ export RANLIB="${TARGET_SYS}-ranlib"
+ export LD="${TARGET_SYS}-ld"
+ export NM="${TARGET_SYS}-nm"
+}
+
+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 () {
+# # Cleanup after gcc's --program-prefix failing..
+# ( cd ${CROSS_DIR}/bin ; for p in ${TARGET_SYS}-* ; do
+# mv $p `echo $p | sed -e s,${TARGET_SYS},${TARGET_ARCH}-uclibc,`
+# done )
+
+ rm -f ${CROSS_DIR}/bin/gccbug ${CROSS_DIR}/bin/gcov
+ for d in info man share/doc share/locale ; do
+ rm -rf ${CROSS_DIR}/$d
+ done
+}
diff --git a/gcc/gcc-uclibc_3.3.1.oe b/gcc/gcc-uclibc_3.3.1.oe
index e69de29bb2..20ecd86de0 100644
--- a/gcc/gcc-uclibc_3.3.1.oe
+++ b/gcc/gcc-uclibc_3.3.1.oe
@@ -0,0 +1,46 @@
+include gcc_${PV}.oe
+FILESDIR=${TOPDIR}/gcc/gcc-${PV}
+
+gccbuild_do_patch () {
+ #
+ # Hack things to use the correct shared lib loader
+ #
+ LIST=`grep -lr -- "-dynamic-linker.*\.so[\.0-9]*" .`
+ if [ -n "$LIST" ] ; then
+ perl -i -p -e "s,-dynamic-linker.*\.so[\.0-9]*},-dynamic-linker /lib/ld-uClibc.so.0},;" $LIST
+ fi
+
+ #
+ # Prevent system glibc start files from leaking in uninvited...
+ #
+ perl -i -p -e "s,standard_startfile_prefix_1 = \".*,standard_startfile_prefix_1 = \"${CROSS_DIR}/${TARGET_SYS}/lib/\";,;" gcc/gcc.c
+ perl -i -p -e "s,standard_startfile_prefix_2 = \".*,standard_startfile_prefix_2 = \"${CROSS_DIR}/${TARGET_SYS}/usr/lib/\";,;" gcc/gcc.c
+
+ #
+ # Prevent system glibc include files from leaking in uninvited...
+ #
+ perl -i -p -e "s,^NATIVE_SYSTEM_HEADER_DIR.*,NATIVE_SYSTEM_HEADER_DIR=${CROSS_DIR}/${TARGET_SYS}/include,;" gcc/Makefile.in
+ perl -i -p -e "s,^CROSS_SYSTEM_HEADER_DIR.*,CROSS_SYSTEM_HEADER_DIR=${CROSS_DIR}/${TARGET_SYS}/include,;" gcc/Makefile.in
+ perl -i -p -e "s,^#define.*STANDARD_INCLUDE_DIR.*,#define STANDARD_INCLUDE_DIR \"${CROSS_DIR}/${TARGET_SYS}/include\",;" gcc/cppdefault.h
+
+ #
+ # Prevent system glibc libraries from being found by collect2
+ # when it calls locatelib() and rummages about the system looking
+ # for libraries with the correct name...
+ #
+ perl -i -p -e "s,\"/lib,\"${CROSS_DIR}/${TARGET_SYS}/lib,g;" \
+ gcc/collect2.c
+ perl -i -p -e "s,\"/usr/,\"${CROSS_DIR}/${TARGET_SYS}/usr/,g;" \
+ gcc/collect2.c
+
+ #
+ # Prevent gcc from using the unwind-dw2-fde-glibc code
+ #
+ perl -i -p -e "s,^#ifndef inhibit_libc,#define inhibit_libc\n#ifndef inhibit_libc,g;" gcc/unwind-dw2-fde-glibc.c
+}
+
+python do_patch () {
+ oe.build.exec_func('base_do_patch', d)
+ oe.build.exec_func('gccbuild_do_patch', d)
+}
+