summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-03-07 01:00:54 +0000
committerChris Larson <clarson@kergoth.com>2004-03-07 01:00:54 +0000
commit91a5f42c665a6ab31d2963e127c75c615ced04a3 (patch)
treee434969d15abb5cfa44bc022220b32d890612b8f /gcc
parentd7e99e1cb12da3703beb3dd890070213bb7bee4b (diff)
Gcc build fixups - kill a couple patches, and fix the --disable/--enable of threads in the uclibc ones.
BKrev: 404a744678juSNZYyPpYtlUKf2zjaQ
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc-initial-uclibc-cross_3.3.2.oe1
-rw-r--r--gcc/gcc-initial-uclibc-cross_3.3.3.oe16
-rw-r--r--gcc/gcc-uclibc-cross_3.3.2.oe1
-rw-r--r--gcc/gcc-uclibc-cross_3.3.3.oe74
-rw-r--r--gcc/gcc-uclibc_3.3.2.oe5
-rw-r--r--gcc/gcc-uclibc_3.3.3.oe86
-rw-r--r--gcc/gcc_3.3.3.oe4
7 files changed, 181 insertions, 6 deletions
diff --git a/gcc/gcc-initial-uclibc-cross_3.3.2.oe b/gcc/gcc-initial-uclibc-cross_3.3.2.oe
index 34e6c86c41..cfcd8205af 100644
--- a/gcc/gcc-initial-uclibc-cross_3.3.2.oe
+++ b/gcc/gcc-initial-uclibc-cross_3.3.2.oe
@@ -11,5 +11,6 @@ EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/local \
--disable-__cxa_atexit \
--enable-languages=c \
--disable-shared \
+ --disable-threads \
--enable-multilib \
--program-prefix=${TARGET_PREFIX}
diff --git a/gcc/gcc-initial-uclibc-cross_3.3.3.oe b/gcc/gcc-initial-uclibc-cross_3.3.3.oe
index e69de29bb2..cfcd8205af 100644
--- a/gcc/gcc-initial-uclibc-cross_3.3.3.oe
+++ b/gcc/gcc-initial-uclibc-cross_3.3.3.oe
@@ -0,0 +1,16 @@
+include gcc-uclibc-cross_${PV}.oe
+
+DEPENDS := virtual/${TARGET_PREFIX}binutils uclibc-initial patcher-native
+PROVIDES := virtual/${TARGET_PREFIX}gcc-initial
+
+EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/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 \
+ --disable-threads \
+ --enable-multilib \
+ --program-prefix=${TARGET_PREFIX}
diff --git a/gcc/gcc-uclibc-cross_3.3.2.oe b/gcc/gcc-uclibc-cross_3.3.2.oe
index cc05e885a2..f370e24952 100644
--- a/gcc/gcc-uclibc-cross_3.3.2.oe
+++ b/gcc/gcc-uclibc-cross_3.3.2.oe
@@ -15,6 +15,7 @@ EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/local \
--enable-languages=c,c++ \
--enable-shared \
--enable-multilib \
+ --enable-threads=posix \
--program-prefix=${TARGET_PREFIX}
export CPPFLAGS =
diff --git a/gcc/gcc-uclibc-cross_3.3.3.oe b/gcc/gcc-uclibc-cross_3.3.3.oe
index e69de29bb2..e7d8b4c493 100644
--- a/gcc/gcc-uclibc-cross_3.3.3.oe
+++ b/gcc/gcc-uclibc-cross_3.3.3.oe
@@ -0,0 +1,74 @@
+inherit cross
+include gcc-uclibc_${PV}.oe
+
+DEPENDS := virtual/${TARGET_PREFIX}binutils uclibc patcher-native
+PROVIDES := virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++
+
+PACKAGES =
+
+EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/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-threads \
+ --enable-multilib \
+ --program-prefix=${TARGET_PREFIX}
+
+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"
+ 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_DIR}/target/include/c++ ]; then
+ mkdir -p ${STAGING_DIR}/target/include
+ ln -s ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
+ ${STAGING_DIR}/target/include/
+ fi
+
+ # We use libiberty from binutils
+ rm -f ${CROSS_DIR}/lib/libiberty.a
+
+ # We probably don't need this
+ rmdir ${CROSS_DIR}/include || :
+
+ # We don't really need to keep this around
+ rm -rf ${CROSS_DIR}/share
+}
+
+# Kill the install so we get no packages (we're the cross compiler)
+do_install () {
+ :
+}
+
diff --git a/gcc/gcc-uclibc_3.3.2.oe b/gcc/gcc-uclibc_3.3.2.oe
index 0acd355ab0..bcd814fd15 100644
--- a/gcc/gcc-uclibc_3.3.2.oe
+++ b/gcc/gcc-uclibc_3.3.2.oe
@@ -29,10 +29,6 @@ FILES_uclibc-libstdc++-dev = \
${libdir}/libsupc++.la \
${libdir}/libsupc++.a
-SRC_URI_append = " file://${FILESDIR}/gcc-001-disable-mathf.patch;patch=1 \
- file://${FILESDIR}/gcc-006-include-search.patch;patch=1 \
- file://${FILESDIR}/gcc-810-libstd++-locale.patch;patch=1"
-
EXTRA_OECONF := --with-local-prefix=${prefix}/local \
--with-gxx-include-dir=${includedir}/c++/${PV}-uclibc \
--enable-target-optspace \
@@ -42,6 +38,7 @@ EXTRA_OECONF := --with-local-prefix=${prefix}/local \
--enable-languages=c,c++ \
--enable-shared \
--enable-multilib \
+ --enable-threads=posix \
--program-prefix=${TARGET_PREFIX}
gccbuild_do_patch () {
diff --git a/gcc/gcc-uclibc_3.3.3.oe b/gcc/gcc-uclibc_3.3.3.oe
index e69de29bb2..4a53d63b09 100644
--- a/gcc/gcc-uclibc_3.3.3.oe
+++ b/gcc/gcc-uclibc_3.3.3.oe
@@ -0,0 +1,86 @@
+include gcc_${PV}.oe
+FILESDIR = ${@os.path.dirname(oe.data.getVar('FILE',d,1))}/gcc-${PV}
+
+DESCRIPTION := The GNU cc and gcc C compilers (uclibc).
+LICENSE := GPL
+MAINTAINER := Gerald Britton <gbritton@doomcom.org>
+
+# This will ONLY build to this target
+TARGET_VENDOR := -uclibc
+TARGET_SYS := ${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}
+TARGET_PREFIX := ${TARGET_SYS}-
+
+DEPENDS := virtual/${HOST_PREFIX}binutils virtual/${HOST_PREFIX}gcc \
+ uclibc patcher
+
+PACKAGES = ${PN} ${PN}-symlinks \
+ ${PN}-c++ ${PN}-c++-symlinks \
+ uclibc-libgcc uclibc-libstdc++ uclibc-libstdc++-dev \
+ ${PN}-doc
+
+# The rest of these are properly defined in gcc_${PV}.oe
+FILES_uclibc-libgcc = ${FILES_libgcc}
+FILES_uclibc-libstdc++ = ${FILES_libstdc++}
+FILES_uclibc-libstdc++-dev = \
+ ${includedir}/c++/${PV}-uclibc \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++.la \
+ ${libdir}/libstdc++.a \
+ ${libdir}/libsupc++.la \
+ ${libdir}/libsupc++.a
+
+EXTRA_OECONF := --with-local-prefix=${prefix}/local \
+ --with-gxx-include-dir=${includedir}/c++/${PV}-uclibc \
+ --enable-target-optspace \
+ --disable-nls \
+ --with-gnu-ld \
+ --disable-__cxa_atexit \
+ --enable-languages=c,c++ \
+ --enable-shared \
+ --enable-threads \
+ --enable-multilib \
+ --program-prefix=${TARGET_PREFIX}
+
+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)
+}
+
diff --git a/gcc/gcc_3.3.3.oe b/gcc/gcc_3.3.3.oe
index 1859ddb0ea..52a3a789e2 100644
--- a/gcc/gcc_3.3.3.oe
+++ b/gcc/gcc_3.3.3.oe
@@ -63,7 +63,7 @@ FILES_${PN}-doc = \
${mandir} \
${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include/README
-SRC_URI = ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+SRC_URI = ${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://${FILESDIR}/config.sub.patch;patch=1 \
file://${FILESDIR}/empty6.patch;patch=1 \
file://${FILESDIR}/pr10392-1-test.patch;patch=1 \
@@ -82,7 +82,7 @@ SRC_URI = ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://${FILESDIR}/sh-pic-set_fpscr-gcc-3.3.2.patch;patch=1 \
file://${FILESDIR}/thunk3.patch;patch=1
MIRRORS_prepend () {
-${GNU_MIRROR}/gcc/gcc-${PV}/ http://gcc.get-software.com/releases/gcc-${PV}/
+${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
}
S := ${WORKDIR}/gcc-${PV}