This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi All This patch for crosstool-4.3 can build gcc-4.3.2 and glibc-2.7 for arm iwmmxt eabi. you must apply Khem Raj's patch first to use this one. the previous patch can be found at http://sources.redhat.com/ml/crossgcc/2006-12/msg00076.html Tested on centos 5.0 Regards.
diff -uNr crosstool-0.43-orig/arm-iwmmxt-eabi.dat crosstool-0.43/arm-iwmmxt-eabi.dat --- crosstool-0.43-orig/arm-iwmmxt-eabi.dat 1970-01-01 08:00:00.000000000 +0800 +++ crosstool-0.43/arm-iwmmxt-eabi.dat 2008-11-20 14:27:29.000000000 +0800 @@ -0,0 +1,9 @@ +TARBALLS_DIR=/shvol/media/toolchains +KERNELCONFIG=`pwd`/arm.config +TARGET=arm-iwmmxt-linux-gnueabi +TARGET_CFLAGS="-O " +GCC_LANGUAGE="c,c++" +GCC_EXTRA_CONFIG='--with-cpu=iwmmxt --with-float=soft --enable-cxx-flags=-msoft-float' +GLIBC_EXTRA_CONFIG="--enable-kernel=2.6.14 --with-tls --with-__thread" +GLIBC_EXTRA_CC_ARGS="-finline-limit=10000 -mabi=aapcs-linux" + diff -uNr crosstool-0.43-orig/crosstool.sh crosstool-0.43/crosstool.sh --- crosstool-0.43-orig/crosstool.sh 2008-11-20 09:27:46.000000000 +0800 +++ crosstool-0.43/crosstool.sh 2008-11-20 09:31:25.000000000 +0800 @@ -410,8 +410,9 @@ mkdir -p build-gcc-core-static; cd build-gcc-core-static echo Copy headers to install area of bootstrap gcc, so it can build libgcc2 -mkdir -p $CORE_PREFIX/$TARGET/include -cp -r $HEADERDIR/* $CORE_PREFIX/$TARGET/include +#mkdir -p $CORE_PREFIX/$TARGET/include +#cp -a $HEADERDIR/* $CORE_PREFIX/$TARGET/include +ln -sf $HEADERDIR $CORE_PREFIX/$TARGET/include # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) # Use funky prefix so it doesn't contaminate real prefix, in case GCC_DIR != GCC_CORE_DIR @@ -424,7 +425,7 @@ ${GCC_EXTRA_CONFIG} \ ${GCC_SYSROOT_ARG_CORE} \ --disable-nls \ - --enable-threads=no \ + --enable-threads=posix \ --enable-symvers=gnu \ --enable-__cxa_atexit \ --enable-languages=c \ @@ -550,6 +551,8 @@ cd .. fi + + if test '!' -z ${GLIBC_ADDON_LINUXTHREADS}; then #--------------------------------------------------------- echo "Build gcc-core w/o shared libgcc (just enough to build glibc starfiles)" @@ -626,7 +629,7 @@ --enable-kernel=${GLIBC_MIN_KERNEL} \ --without-cvs --disable-profile --disable-debug --without-gd \ $SHARED_MODE \ - --enable-add-ons${GLIBC_ADDON_OPTIONS} --with-headers=$HEADERDIR \ + --enable-add-ons${GLIBC_ADDON_OPTIONS} \ --cache-file=config.cache fi @@ -681,23 +684,31 @@ make -C libiberty libiberty.a make configure-gcc make configure-libcpp + make configure-libdecnumber make all-libcpp + make all-libdecnumber else make configure-gcc make configure-libcpp make configure-build-libiberty + make configure-libdecnumber make all-libcpp make all-build-libiberty + make all-libdecnumber fi - make -C gcc libgcc.mk + make -C gcc libgcc.mvars - if test '!' -f gcc/libgcc.mk-ORIG ; then cp -p gcc/libgcc.mk gcc/libgcc.mk-ORIG; fi - sed 's@-lc@@g' < gcc/libgcc.mk-ORIG > gcc/libgcc.mk + if test '!' -f gcc/libgcc.mvars-ORIG ; then cp -p gcc/libgcc.mvars gcc/libgcc.mvars-ORIG; fi + sed 's/-lc//g' < gcc/libgcc.mvars-ORIG > gcc/libgcc.mvars test "$CANADIAN_BUILD" = "" || make $PARALLELMFLAGS all-build-libiberty || true make $PARALLELMFLAGS all-gcc make install-gcc +#cxzhao=>make libgcc, glibc need it + make all-target-libgcc + make install-target-libgcc + cd .. test -x ${PREFIX}/bin/${TARGET}-gcc || abort Build failed during gcc-core @@ -749,7 +760,7 @@ --enable-kernel=${GLIBC_MIN_KERNEL} \ --without-cvs --disable-profile --disable-debug --without-gd \ $SHARED_MODE \ - --enable-add-ons${GLIBC_ADDON_OPTIONS} --with-headers=$HEADERDIR \ + --enable-add-ons${GLIBC_ADDON_OPTIONS} \ --cache-file=config.cache fi @@ -857,6 +868,18 @@ ;; esac +#cxzhao=>install gcc first + +make all-gcc +make install-gcc + +# cxzhao=>FIXME: libtool link libstdc++ when linking libstdc++ +make configure-target-libstdc++-v3 +cp ${TARGET}/libstdc++-v3/libtool ${TARGET}/libstdc++-v3/libtool-orig +sed -i "s/-lstdc++//g" ${TARGET}/libstdc++-v3/libtool +make all-target-libstdc++-v3 +cp -f ${TARGET}/libstdc++-v3/libtool-orig ${TARGET}/libstdc++-v3/libtool + make $PARALLELMFLAGS all make install diff -uNr crosstool-0.43-orig/gcc-4.3.2-glibc-2.7.dat crosstool-0.43/gcc-4.3.2-glibc-2.7.dat --- crosstool-0.43-orig/gcc-4.3.2-glibc-2.7.dat 1970-01-01 08:00:00.000000000 +0800 +++ crosstool-0.43/gcc-4.3.2-glibc-2.7.dat 2008-11-20 10:38:14.000000000 +0800 @@ -0,0 +1,8 @@ +BINUTILS_DIR=binutils-2.19.50.0.1 +GCC_DIR=gcc-4.3.2 +GLIBC_DIR=glibc-2.7 +LINUX_DIR=linux-2.6.21 +GLIBCPORTS_FILENAME=glibc-ports-2.7 +GLIBC_ADDON_OPTIONS="=ports,nptl" +GLIBC_ADDON_NPTL=1 +GLIBCLIBIDN_FILENAME=glibc-libidn-2.7 \ No newline at end of file diff -uNr crosstool-0.43-orig/getandpatch.sh crosstool-0.43/getandpatch.sh --- crosstool-0.43-orig/getandpatch.sh 2008-11-20 09:27:46.000000000 +0800 +++ crosstool-0.43/getandpatch.sh 2008-11-20 10:12:18.000000000 +0800 @@ -32,9 +32,6 @@ test -z "${GLIBC_DIR}" && abort "Please set GLIBC_DIR to the bare filename of the glibc tarball or directory" test -z "${LINUX_SANITIZED_HEADER_DIR}" && echo "Not downloading linux-libc-headers. Set LINUX_SANITIZED_HEADER_DIR to do so" test -z "${LINUX_DIR}" && echo "Not downloading kernel sources. Set LINUX_DIR if you want to do so" - # And one is derived if not set explicitly. - test -z "${GLIBCTHREADS_FILENAME}" && - GLIBCTHREADS_FILENAME=`echo $GLIBC_DIR | sed 's/glibc-/glibc-linuxthreads-/'` fi test -z "${TARBALLS_DIR}" && abort "Please set TARBALLS_DIR to the directory to download tarballs to." @@ -161,9 +158,11 @@ if [ -n "`echo $ARCHIVE_NAME | grep glibc-ports-`" ]; then mv glibc-ports-2* ports + cd ports fi if [ -n "`echo $ARCHIVE_NAME | grep glibc-libidn-`" ]; then mv glibc-libidn-2* libidn + cd libidn fi # Apply any patches for this component diff -uNr crosstool-0.43-orig/patches/gcc-4.3.2/gcc-4.3.2-Makefile.in.patch crosstool-0.43/patches/gcc-4.3.2/gcc-4.3.2-Makefile.in.patch --- crosstool-0.43-orig/patches/gcc-4.3.2/gcc-4.3.2-Makefile.in.patch 1970-01-01 08:00:00.000000000 +0800 +++ crosstool-0.43/patches/gcc-4.3.2/gcc-4.3.2-Makefile.in.patch 2008-11-18 13:16:20.000000000 +0800 @@ -0,0 +1,10 @@ +--- gcc-4.3.2/Makefile.in 2008-08-16 15:28:01.000000000 +0800 ++++ /src/toolchains/toolchain/build/arm-iwmmxt-linux-gnueabi/gcc-4.3.2-glibc-2.7/gcc-4.3.2/Makefile.in 2008-11-18 13:13:47.000000000 +0800 +@@ -620,7 +620,6 @@ + # The BUILD_* variables are a special case, which are used for the gcc + # cross-building scheme. + EXTRA_GCC_FLAGS = \ +- "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |