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] | |
GCC = 4.1.1 binutils = 2.17 glibc = 2.5
1. Adds support for glibc 2.5 and ports 2. Support for linux-kernel-headers using make headers_install (2.6.18 plus) 3. Binutils 2.17 4. ARM EABI build configuration using NPTL
-- Khem Raj MontaVista Software Inc. kraj@mvista.com
diff -Naurp crosstool-0.43.orig/arm-softfloat-eabi.dat crosstool-0.43/arm-softfloat-eabi.dat
--- crosstool-0.43.orig/arm-softfloat-eabi.dat 1969-12-31 16:00:00.000000000 -0800
+++ crosstool-0.43/arm-softfloat-eabi.dat 2006-12-08 02:23:16.000000000 -0800
@@ -0,0 +1,4 @@
+TARGET=arm-softfloat-linux-gnueabi
+TARGET_CFLAGS="-O"
+GCC_EXTRA_CONFIG="--with-float=soft"
+GLIBC_EXTRA_CONFIG="--without-fp"
diff -Naurp crosstool-0.43.orig/crosstool.sh crosstool-0.43/crosstool.sh
--- crosstool-0.43.orig/crosstool.sh 2006-12-06 16:17:40.000000000 -0800
+++ crosstool-0.43/crosstool.sh 2006-12-11 10:54:52.000000000 -0800
@@ -68,17 +68,20 @@ TOP_DIR=${TOP_DIR-`pwd`}
chmod 755 $TOP_DIR/config.guess
BUILD=${GCC_BUILD-`$TOP_DIR/config.guess`}
test -z "$BUILD" && abort "bug: BUILD not set?!"
-
+test -n "`echo $GLIBCTHREADS_FILENAME | grep linuxthreads`" && GLIBC_ADDON_LINUXTHREADS=1
+test -n "`echo $GLIBCTHREADS_FILENAME | grep nptl`" && GLIBC_ADDON_NPTL=1
if test -z "${GLIBC_ADDON_OPTIONS}"; then
- echo "GLIBC_ADDON_OPTIONS not set, so guessing addons from GLIBCTHREADS_FILENAME and GLIBCCRYPT_FILENAME"
- # this is lame, need to fix this for nptl later?
- # (nptl is an addon, but it's shipped in the main tarball)
+ echo "GLIBC_ADDON_OPTIONS not set"
GLIBC_ADDON_OPTIONS="="
- case "${GLIBCTHREADS_FILENAME}" in
- *linuxthreads*) GLIBC_ADDON_OPTIONS="${GLIBC_ADDON_OPTIONS}linuxthreads," ;;
- esac
+ if test '!' -z ${GLIBC_ADDON_LINUXTHREADS}; then
+ GLIBC_ADDON_OPTIONS="${GLIBC_ADDON_OPTIONS}linuxthreads,"
+ test -z "${GLIBCCRYPT_FILENAME}" || GLIBC_ADDON_OPTIONS="${GLIBC_ADDON_OPTIONS}crypt,"
+ elif test '!' -z ${GLIBC_ADDON_NPTL}; then
+ GLIBC_ADDON_OPTIONS="=yes"
+ else
+ GLIBC_ADDON_OPTIONS="=no"
+ fi
# crypt is only an addon for glibc-2.1.x
- test -z "${GLIBCCRYPT_FILENAME}" || GLIBC_ADDON_OPTIONS="${GLIBC_ADDON_OPTIONS}crypt,"
fi
# Add some default glibc config options if not given by user. These used to be hardcoded.
@@ -98,10 +101,14 @@ esac
# One is forbidden
test -z "${LD_LIBRARY_PATH}" || abort "glibc refuses to build if LD_LIBRARY_PATH is set. Please unset it before running this script."
+if test '!' -z "${GLIBC_ADDON_NPTL}"; then
+ GLIBC_EXTRA_CONFIG="--with-tls --with-__thread ${GLIBC_EXTRA_CONFIG}"
+ GLIBC_MIN_KERNEL=2.6.4
+else
+ GLIBC_EXTRA_CONFIG="--without-tls --without-__thread ${GLIBC_EXTRA_CONFIG}"
+ GLIBC_MIN_KERNEL=2.4.3
+fi
-# And one is derived if unset.
-test -z "${GLIBCTHREADS_FILENAME}" &&
-GLIBCTHREADS_FILENAME=`echo $GLIBC_DIR | sed 's/glibc-/glibc-linuxthreads-/'`
# Check for a few prerequisites that have tripped people up.
awk '/x/' < /dev/null || abort "You need awk to build a toolchain."
@@ -311,7 +318,7 @@ fi
cd $LINUX_HEADER_DIR
mkdir -p $HEADERDIR
-
+INSTALL_HEADERS_DIR=`echo $HEADERDIR | sed 's/include//'`
# no indentation for now because indentation levels are rising too high
if test -z "$LINUX_SANITIZED_HEADER_DIR" ; then
@@ -325,11 +332,17 @@ fi
# autodetect kernel version from contents of Makefile
KERNEL_VERSION=`awk '/^VERSION =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
KERNEL_PATCHLEVEL=`awk '/^PATCHLEVEL =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
+KERNEL_SUBLEVEL=`awk '/^SUBLEVEL =/ { print $3 }' $LINUX_HEADER_DIR/Makefile`
+if [[ "$KERNEL_VERSION.$KERNEL_PATCHLEVEL" = "2.6" && KERNEL_SUBLEVEL -ge 18 ]]; then
+ make ARCH=$ARCH INSTALL_HDR_PATH=$INSTALL_HEADERS_DIR headers_check
+ make ARCH=$ARCH INSTALL_HDR_PATH=$INSTALL_HEADERS_DIR headers_install
+else
case "$KERNEL_VERSION.$KERNEL_PATCHLEVEL.x" in
2.2.x|2.4.x) make ARCH=$ARCH symlinks include/linux/version.h
;;
-2.6.x) case $ARCH in
+2.6.x)
+ case $ARCH in
sh*) # sh does secret stuff in 'make prepare' that can't be triggered separately,
# but happily, it doesn't use target gcc, so we can use it.
# Update: this fails on 2.6.11, as it installs elfconfig.h, which requires target compiler :-(
@@ -351,7 +364,7 @@ case "$KERNEL_VERSION.$KERNEL_PATCHLEVEL
*) abort "Unsupported kernel version $KERNEL_VERSION.$KERNEL_PATCHLEVEL"
esac
cp -r include/asm-generic $HEADERDIR/asm-generic
-
+fi # [ KERNEL_SUBLEVEL -gt 17 ]
fi # test -z "$LINUX_SANITIZED_HEADER_DIR"
cp -r include/linux $HEADERDIR
@@ -390,7 +403,42 @@ cd ..
# test to see if this step passed
logresult binutils ${PREFIX}/bin/${TARGET}-ld${EXEEXT}
+if test '!' -z ${GLIBC_ADDON_NPTL}; then
+#---------------------------------------------------------
+echo "Build gcc-core w/o shared libgcc (just enough to build glibc starfiles)"
+
+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
+
+# 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
+
+if test '!' -f Makefile; then
+ ${GCC_CORE_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST --prefix=$CORE_PREFIX \
+ --with-local-prefix=${SYSROOT} \
+ --disable-multilib \
+ --with-newlib \
+ ${GCC_EXTRA_CONFIG} \
+ ${GCC_SYSROOT_ARG_CORE} \
+ --disable-nls \
+ --enable-threads=no \
+ --enable-symvers=gnu \
+ --enable-__cxa_atexit \
+ --enable-languages=c \
+ --disable-shared
+fi
+
+test "$CANADIAN_BUILD" = "" || make $PARALLELMFLAGS all-build-libiberty || true
+make $PARALLELMFLAGS all-gcc
+make install-gcc
+cd ..
+
+logresult gcc-core $CORE_PREFIX/bin/${TARGET}-gcc${EXEEXT}
+fi #test '!' -z ${GLIBC_ADDON_NPTL}; then
#---------------------------------------------------------
echo "Install glibc headers needed to build bootstrap compiler -- but only if gcc-3.x"
@@ -417,7 +465,10 @@ if grep -q 'gcc-[34]' ${GCC_CORE_DIR}/Ch
# Override libc_cv_ppc_machine so glibc-cvs doesn't complain
# 'a version of binutils that supports .machine "altivec" is needed'.
libc_cv_ppc_machine=yes \
- CC=gcc \
+ libc_cv_forced_unwind=yes \
+ libc_cv_c_cleanup=yes \
+ BUILD_CC=gcc \
+ CC=${TARGET}-gcc${EXEEXT} \
${GLIBC_DIR}/configure --prefix=/usr \
--build=$BUILD --host=$TARGET \
--without-cvs --disable-sanity-checks --with-headers=$HEADERDIR \
@@ -463,13 +514,47 @@ if grep -q 'gcc-[34]' ${GCC_CORE_DIR}/Ch
# so uncomment this if you need it
#cp misc/syscall-list.h $HEADERDIR/bits/syscall.h
+ if test '!' -z "${GLIBC_ADDON_NPTL}"; then
+ # To build gcc with thread support requires real pthread headers. These
+ # will have to manually be copied from under the tree of the desired
+ # target pthread implementation.
+ cp ${GLIBC_DIR}/nptl/sysdeps/pthread/pthread.h $HEADERDIR/pthread.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/${ARCH}/bits/pthreadtypes.h
+
+ # On s390, powerpc and sparc we also require bits/wordsize.h.
+ case $TARGET in
+ sparc* | s390* | powerpc* )
+ case $TARGET in
+ sparc64* ) wordsize_h=sysdeps/sparc/sparc64/bits/wordsize.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
+ ;;
+ sparc* ) wordsize_h=sysdeps/sparc/sparc32/bits/wordsize.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
+ ;;
+ s390x* ) wordsize_h=sysdeps/s390/s390x/bits/wordsize.h
+ ;;
+ s390* ) wordsize_h=sysdeps/s390/s390/bits/wordsize.h
+ ;;
+ powerpc64* ) wordsize_h=sysdeps/powerpc/powerpc64/bits/wordsize.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
+ ;;
+ powerpc* ) wordsize_h=sysdeps/powerpc/powerpc32/bits/wordsize.h
+ pthreadtypes_h=nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
+ ;;
+ esac
+ test ! -f $HEADERDIR/bits/wordsize.h && cp ${GLIBC_DIR}/${wordsize_h} $HEADERDIR/bits/wordsize.h
+ cp ${GLIBC_DIR}/${pthreadtypes_h} $HEADERDIR/bits/pthreadtypes.h
+ ;;
+ esac
+ fi # GLIBC_ADDONS_NPTL
+
cd ..
fi
-
+if test '!' -z ${GLIBC_ADDON_LINUXTHREADS}; then
#---------------------------------------------------------
-echo "Build gcc-core (just enough to build glibc)"
+echo "Build gcc-core w/o shared libgcc (just enough to build glibc starfiles)"
-mkdir -p build-gcc-core; cd build-gcc-core
+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
@@ -494,15 +579,132 @@ if test '!' -f Makefile; then
fi
test "$CANADIAN_BUILD" = "" || make $PARALLELMFLAGS all-build-libiberty || true
-make $PARALLELMFLAGS all-gcc
+make $PARALLELMFLAGS all-gcc
make install-gcc
cd ..
logresult gcc-core $CORE_PREFIX/bin/${TARGET}-gcc${EXEEXT}
+fi #test '!' -z ${GLIBC_ADDON_LINUXTHREADS}; then
+
+# Following extra steps required for building an NPTL enabled glibc.
+if test '!' -z "${GLIBC_ADDON_NPTL}"; then
+ #---------------------------------------------------------
+ echo "Build glibc startfiles (required for shared libgcc)"
+
+ mkdir -p build-glibc-startfiles; cd build-glibc-startfiles
+
+ # sh4 really needs to set configparms as of gcc-3.4/glibc-2.3.2
+ # note: this is awkward, doesn't work well if you need more than one line in configparms
+ echo ${GLIBC_CONFIGPARMS} > configparms
+
+ echo "libc_cv_forced_unwind=yes" > config.cache
+ echo "libc_cv_c_cleanup=yes" >> config.cache
+ # this here is moot, currently you cannot build nptl for sparc64
+ case ${TARGET} in
+ sparc64* ) echo "libc_cv_sparc64_tls=yes" >> config.cache ;;
+ esac
+
+ if test '!' -f Makefile; then
+ # Configure with --prefix the way we want it on the target...
+ # There are a whole lot of settings here. You'll probably want
+ # to read up on what they all mean, and customize a bit.
+ # e.g. I picked --enable-kernel=2.4.3 here just because it's the kernel Bill
+ # used in his example gcc2.95.3 script. That means some backwards compatibility
+ # stuff is turned on in glibc that you may not need if you're using a newer kernel.
+ # Compare these options with the ones used when installing the glibc headers above - they're different.
+ # Adding "--without-gd" option to avoid error "memusagestat.c:36:16: gd.h: No such file or directory"
+ # See also http://sources.redhat.com/ml/libc-alpha/2000-07/msg00024.html.
+ # Set BUILD_CC, or you won't be able to build datafiles
+ # Set --build, else glibc-2.3.2 will think you're not cross-compiling, and try to run the test programs
+
+ BUILD_CC=gcc CFLAGS="$TARGET_CFLAGS" CC="${TARGET}-gcc $GLIBC_EXTRA_CC_ARGS" \
+ AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
+ ${GLIBC_DIR}/configure --prefix=/usr \
+ --build=$BUILD --host=$TARGET \
+ ${GLIBC_EXTRA_CONFIG} \
+ --enable-kernel=${GLIBC_MIN_KERNEL} \
+ --without-cvs --disable-profile --disable-debug --without-gd \
+ $SHARED_MODE \
+ --enable-add-ons${GLIBC_ADDON_OPTIONS} --with-headers=$HEADERDIR \
+ --cache-file=config.cache
+ fi
+
+ #TODO: should check whether slibdir has been set in configparms to */lib64
+ # and copy the startfiles into the appropriate libdir.
+ make csu/subdir_lib
+
+ test -z "${USE_SYSROOT}" &&
+ cp -fp csu/crt[1in].o ${SYSROOT}/lib/ ||
+ cp -fp csu/crt[1in].o ${SYSROOT}/usr/lib/
+
+ cd ..
+ #---------------------------------------------------------
+ echo "Build gcc-core w shared libgcc"
+
+ mkdir -p build-gcc-core-shared; cd build-gcc-core-shared
+
+ # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
+
+ if test '!' -f Makefile; then
+ ${GCC_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST --prefix=$PREFIX \
+ --with-local-prefix=${SYSROOT} \
+ --disable-multilib \
+ ${GCC_EXTRA_CONFIG} \
+ ${GCC_SYSROOT_ARG_CORE} \
+ --disable-nls \
+ --enable-symvers=gnu \
+ --enable-__cxa_atexit \
+ --enable-languages=c \
+ --enable-shared
+ fi
+
+ # HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
+ # gcc/config/t-libunwind so -lc is removed from the link for
+ # libgcc_s.so, as we do not have a target -lc yet.
+ # This is not as ugly as it appears to be ;-) All symbols get resolved
+ # during the glibc build, and we provide a proper libgcc_s.so for the
+ # cross toolchain during the final gcc build.
+ #
+ # As we cannot modify the source tree, nor override SHLIB_LC itself
+ # during configure or make, we have to edit the resultant
+ # gcc/libgcc.mk itself to remove -lc from the link.
+ # This causes us to have to jump through some hoops...
+ #
+ # To produce libgcc.mk to edit we firstly require libiberty.a,
+ # so we configure then build it.
+ # Next we have to configure gcc, create libgcc.mk then edit it...
+ # So much easier if we just edit the source tree, but hey...
+ if test '!' -f ${GCC_DIR}/gcc/BASE-VER; then
+ make configure-libiberty
+ make -C libiberty libiberty.a
+ make configure-gcc
+ make configure-libcpp
+ make all-libcpp
+ else
+ make configure-gcc
+ make configure-libcpp
+ make configure-build-libiberty
+ make all-libcpp
+ make all-build-libiberty
+ fi
+ make -C gcc libgcc.mk
+
+ 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
+
+ test "$CANADIAN_BUILD" = "" || make $PARALLELMFLAGS all-build-libiberty || true
+ make $PARALLELMFLAGS all-gcc
+ make install-gcc
+
+ cd ..
+
+ test -x ${PREFIX}/bin/${TARGET}-gcc || abort Build failed during gcc-core
+
+fi # GLIBC_ADDON_NPTL
#---------------------------------------------------------
-echo Build glibc and linuxthreads
+echo Build glibc
mkdir -p build-glibc; cd build-glibc
@@ -510,6 +712,16 @@ mkdir -p build-glibc; cd build-glibc
# note: this is awkward, doesn't work well if you need more than one line in configparms
echo ${GLIBC_CONFIGPARMS} > configparms
+if test '!' -z "${GLIBC_ADDON_NPTL}"; then
+ # Following configure tests fail while cross-compiling
+ echo "libc_cv_forced_unwind=yes" > config.cache
+ echo "libc_cv_c_cleanup=yes" >> config.cache
+ # The following is moot, currently you cannot build nptl for sparc64
+ case ${TARGET} in
+ sparc64* ) echo "libc_cv_sparc64_tls=yes" >> config.cache ;;
+ esac
+fi # GLIBC_ADDON_NPTL
+
if test '!' -f Makefile; then
# Configure with --prefix the way we want it on the target...
# There are a whole lot of settings here. You'll probably want
@@ -534,9 +746,11 @@ if test '!' -f Makefile; then
${GLIBC_DIR}/configure --prefix=/usr \
--build=$BUILD --host=$TARGET \
${GLIBC_EXTRA_CONFIG} ${DEFAULT_GLIBC_EXTRA_CONFIG} \
+ --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} --with-headers=$HEADERDIR \
+ --cache-file=config.cache
fi
if grep -l '^install-lib-all:' ${GLIBC_DIR}/Makerules > /dev/null; then
diff -Naurp crosstool-0.43.orig/demo-arm-softfloat-eabi.sh crosstool-0.43/demo-arm-softfloat-eabi.sh
--- crosstool-0.43.orig/demo-arm-softfloat-eabi.sh 1969-12-31 16:00:00.000000000 -0800
+++ crosstool-0.43/demo-arm-softfloat-eabi.sh 2006-12-09 17:14:06.000000000 -0800
@@ -0,0 +1,33 @@
+#!/bin/sh
+# This script has one line for each known working toolchain
+# for this architecture. Uncomment the one you want.
+# Generated by generate-demo.pl from buildlogs/all.dats.txt
+
+set -ex
+TARBALLS_DIR=$HOME/downloads
+RESULT_TOP=/opt/crosstool
+export TARBALLS_DIR RESULT_TOP
+GCC_LANGUAGES="c,c++"
+export GCC_LANGUAGES
+GLIBC_ADDON_NPTL=1
+export GLIBC_ADDON_NPTL=1
+
+# Really, you should do the mkdir before running this,
+# and chown /opt/crosstool to yourself so you don't need to run as root.
+mkdir -p $RESULT_TOP
+
+#eval `cat arm-softfloat.dat gcc-2.95.3-glibc-2.1.3.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-2.95.3-glibc-2.2.2.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-2.95.3-glibc-2.2.5.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.2.3-glibc-2.2.5.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.2.3-glibc-2.3.2-tls.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.3.6-glibc-2.2.2.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.3.6-glibc-2.2.5.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.3.6-glibc-2.3.2.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.3.6-glibc-2.3.2-tls.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.4.5-glibc-2.2.5.dat` sh all.sh --notest
+#eval `cat arm-softfloat.dat gcc-3.4.5-glibc-2.3.5.dat` sh all.sh --notest
+eval `cat arm-softfloat-eabi.dat gcc-4.1.1-glibc-2.5.dat` sh all.sh -notest -nounpack
+
+echo Done.
diff -Naurp crosstool-0.43.orig/gcc-4.1.1-glibc-2.5.dat crosstool-0.43/gcc-4.1.1-glibc-2.5.dat
--- crosstool-0.43.orig/gcc-4.1.1-glibc-2.5.dat 1969-12-31 16:00:00.000000000 -0800
+++ crosstool-0.43/gcc-4.1.1-glibc-2.5.dat 2006-12-09 17:08:30.000000000 -0800
@@ -0,0 +1,10 @@
+BINUTILS_DIR=binutils-2.17
+GCC_CORE_DIR=gcc-4.1.1
+GCC_DIR=gcc-4.1.1
+GLIBC_DIR=glibc-2.5
+LINUX_DIR=linux-2.6.18.5
+GLIBCTHREADS_FILENAME=
+GLIBCPORTS_FILENAME=glibc-ports-2.5
+GLIBCLIBIDN_FILENAME=glibc-libidn-2.5
+GDB_DIR=gdb-6.5
+GLIBC_EXTRA_CONFIG="$GLIBC_EXTRA_CONFIG --with-tls --with-__thread --enable-kernel=2.6.0"
diff -Naurp crosstool-0.43.orig/getandpatch.sh crosstool-0.43/getandpatch.sh
--- crosstool-0.43.orig/getandpatch.sh 2006-12-06 16:17:40.000000000 -0800
+++ crosstool-0.43/getandpatch.sh 2006-12-09 15:53:28.000000000 -0800
@@ -153,7 +153,19 @@ getUnpackAndPatch() {
if [ -d kernel ]; then
mv kernel $BASENAME
fi
+ # rename glibc-ports-${version} to ports
+ # because there will be patches for ports and they have to be edited
+ # everytime for different version just because ports will have glibc
+ # version in its name. Renaming to ports will let the patch applied to
+ # glibc-ports-2.5 to glibc-ports-2.6 in future.
+ if [ -n "`echo $ARCHIVE_NAME | grep glibc-ports-`" ]; then
+ mv glibc-ports-2* ports
+ fi
+ if [ -n "`echo $ARCHIVE_NAME | grep glibc-libidn-`" ]; then
+ mv glibc-libidn-2* libidn
+ fi
+
# Apply any patches for this component
# -f is required for patches that delete files, like
# patches/glibc-2.2.5/hhl-powerpc-fpu.patch,
@@ -163,7 +175,7 @@ getUnpackAndPatch() {
# Use -g0 else patch-2.5.8 on MacOSX tries to run perforce!
if test -d $TOP_DIR/patches/$BASENAME; then
case $ARCHIVE_NAME in
- glibc-[a-z]*-2*) ;; # glibc addon, so we're already in right directory
+ glibc-[a-z]*-2*) ;; # glibc addon, so we're already in right directory
*) cd $BASENAME ;;
esac
@@ -270,12 +282,13 @@ if test "${CYGWIN_DIR}" = ""; then
http://ep09.pld-linux.org/~mmazur/linux-libc-headers/${LINUX_SANITIZED_HEADER_DIR}.tar.bz2 \
ftp://ftp.lfs-matrix.net/pub/linux-libc-headers/${LINUX_SANITIZED_HEADER_DIR}.tar.bz2
# Glibc addons must come after glibc
- getUnpackAndPatch \
+test -n "${GLIBCTHREADS_FILENAME}" && getUnpackAndPatch \
ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCTHREADS_FILENAME.tar.bz2 \
ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCTHREADS_FILENAME.tar.gz \
ftp://gcc.gnu.org/pub/glibc/releases/$GLIBCTHREADS_FILENAME.tar.bz2 \
- ftp://gcc.gnu.org/pub/glibc/releases/$GLIBCTHREADS_FILENAME.tar.gz
-
+ ftp://gcc.gnu.org/pub/glibc/releases/$GLIBCTHREADS_FILENAME.tar.gz
+ test x$GLIBCPORTS_FILENAME = x || getUnpackAndPatch ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCPORTS_FILENAME.tar.gz ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCPORTS_FILENAME.tar.bz2
+ test x$GLIBCLIBIDN_FILENAME = x || getUnpackAndPatch ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCLIBIDN_FILENAME.tar.gz ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCLIBIDN_FILENAME.tar.bz2
test x$GLIBCCRYPT_FILENAME = x || getUnpackAndPatch ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCCRYPT_FILENAME.tar.gz ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCCRYPT_FILENAME.tar.bz2
fi
diff -Naurp crosstool-0.43.orig/patches/gcc-4.0.1/libiberty.patch crosstool-0.43/patches/gcc-4.0.1/libiberty.patch
--- crosstool-0.43.orig/patches/gcc-4.0.1/libiberty.patch 1969-12-31 16:00:00.000000000 -0800
+++ crosstool-0.43/patches/gcc-4.0.1/libiberty.patch 2006-12-08 01:48:52.000000000 -0800
@@ -0,0 +1,11 @@
+--- gcc-4.0.1.orig/gcc/Makefile.in 2005-04-04 21:45:13.000000000 +0200
++++ gcc-4.0.1/gcc/Makefile.in 2005-08-05 22:12:56.544994408 +0200
+@@ -757,7 +757,7 @@
+
+ # Build and host support libraries.
+ LIBIBERTY = ../libiberty/libiberty.a
+-BUILD_LIBIBERTY = ../$(build_subdir)/libiberty/libiberty.a
++BUILD_LIBIBERTY = ../libiberty/libiberty.a
+
+ # Dependencies on the intl and portability libraries.
+ LIBDEPS= $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP)
diff -Naurp crosstool-0.43.orig/patches/gcc-4.1.1/gcc-arm-softfp.patch crosstool-0.43/patches/gcc-4.1.1/gcc-arm-softfp.patch
--- crosstool-0.43.orig/patches/gcc-4.1.1/gcc-arm-softfp.patch 1969-12-31 16:00:00.000000000 -0800
+++ crosstool-0.43/patches/gcc-4.1.1/gcc-arm-softfp.patch 2006-12-09 12:54:28.000000000 -0800
@@ -0,0 +1,25 @@
+Description:
+ Enable the soft-fp routines for ARM GNU/Linux, so that they can be
+ used for --with-float=soft.
+
+Patch rejected by community, so local to Montavista.
+http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01570.html
+
+Index: gcc-4.1.0/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.1.0.orig/gcc/config/arm/t-linux
++++ gcc-4.1.0/gcc/config/arm/t-linux
+@@ -4,7 +4,12 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _call_via_rX _interwork_call_via_rX \
++ _lshrdi3 _ashrdi3 _ashldi3 \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
diff -Naurp crosstool-0.43.orig/patches/glibc-ports-2.5/glibc-arm-no-procinfo_h.patch crosstool-0.43/patches/glibc-ports-2.5/glibc-arm-no-procinfo_h.patch
--- crosstool-0.43.orig/patches/glibc-ports-2.5/glibc-arm-no-procinfo_h.patch 1969-12-31 16:00:00.000000000 -0800
+++ crosstool-0.43/patches/glibc-ports-2.5/glibc-arm-no-procinfo_h.patch 2006-12-09 12:30:45.000000000 -0800
@@ -0,0 +1,325 @@
+http://sources.redhat.com/ml/libc-ports/2006-10/msg00040.html
+Avoid using asm/procinfo.h
+
+ * From: "Joseph S. Myers" <joseph at codesourcery dot com>
+ * To: libc-ports at sourceware dot org
+ * Date: Tue, 24 Oct 2006 19:25:12 +0000 (UTC)
+ * Subject: Avoid using asm/procinfo.h
+
+I previously noted
+<http://sourceware.org/ml/libc-ports/2006-08/msg00023.html> that the
+use of <asm/procinfo.h>, a Linux-specific kernel header, in
+sysdeps/arm/eabi, is an abstraction violation, and that in principle
+all the files in sysdeps/arm/eabi should use sysdep.h not
+asm/procinfo.h for HWCAP_VFP.
+
+The ARM kernel maintainers have now declared that <asm/procinfo.h>
+should not be used outside the kernel at all (and in particular that
+headers_install is correct in not exporting it), and that these
+definitions will move to a different kernel header. This gives a
+concrete reason for making the change to use glibc's internal
+definitions, which this patch does, thereby allowing glibc to build
+with the exported headers.
+
+2006-10-24 Joseph S. Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/eabi/fclrexcpt.c: Include <sysdep.h> instead of
+ <asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP.
+ * sysdeps/arm/eabi/fedisblxcpt.c: Likewise.
+ * sysdeps/arm/eabi/feenablxcpt.c: Likewise.
+ * sysdeps/arm/eabi/fegetenv.c: Likewise.
+ * sysdeps/arm/eabi/fegetexcept.c: Likewise.
+ * sysdeps/arm/eabi/fegetround.c: Likewise.
+ * sysdeps/arm/eabi/feholdexcpt.c: Likewise.
+ * sysdeps/arm/eabi/fesetenv.c: Likewise.
+ * sysdeps/arm/eabi/fesetround.c: Likewise.
+ * sysdeps/arm/eabi/fraiseexcpt.c: Likewise.
+ * sysdeps/arm/eabi/fsetexcptflg.c: Likewise.
+ * sysdeps/arm/eabi/ftestexcept.c: Likewise.
+ * sysdeps/arm/eabi/setfpucw.c: Likewise.
+
+Index: libc/ports/sysdeps/arm/eabi/fclrexcpt.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fclrexcpt.c,v
+retrieving revision 1.1
+diff -u -r1.1 fclrexcpt.c
+--- libc/ports/sysdeps/arm/eabi/fclrexcpt.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fclrexcpt.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __feclearexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int temp;
+
+Index: libc/ports/sysdeps/arm/eabi/fedisblxcpt.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fedisblxcpt.c,v
+retrieving revision 1.1
+diff -u -r1.1 fedisblxcpt.c
+--- libc/ports/sysdeps/arm/eabi/fedisblxcpt.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fedisblxcpt.c 24 Oct 2006 19:17:51 -0000
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fedisableexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int new_exc, old_exc;
+
+Index: libc/ports/sysdeps/arm/eabi/feenablxcpt.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/feenablxcpt.c,v
+retrieving revision 1.1
+diff -u -r1.1 feenablxcpt.c
+--- libc/ports/sysdeps/arm/eabi/feenablxcpt.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/feenablxcpt.c 24 Oct 2006 19:17:51 -0000
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ feenableexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int new_exc, old_exc;
+
+Index: libc/ports/sysdeps/arm/eabi/fegetenv.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fegetenv.c,v
+retrieving revision 1.1
+diff -u -r1.1 fegetenv.c
+--- libc/ports/sysdeps/arm/eabi/fegetenv.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fegetenv.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __fegetenv (fenv_t *envp)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int temp;
+ _FPU_GETCW (temp);
+Index: libc/ports/sysdeps/arm/eabi/fegetexcept.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fegetexcept.c,v
+retrieving revision 1.1
+diff -u -r1.1 fegetexcept.c
+--- libc/ports/sysdeps/arm/eabi/fegetexcept.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fegetexcept.c 24 Oct 2006 19:17:51 -0000
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fegetexcept (void)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long temp;
+
+Index: libc/ports/sysdeps/arm/eabi/fegetround.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fegetround.c,v
+retrieving revision 1.1
+diff -u -r1.1 fegetround.c
+--- libc/ports/sysdeps/arm/eabi/fegetround.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fegetround.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fegetround (void)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned int temp;
+
+Index: libc/ports/sysdeps/arm/eabi/feholdexcpt.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/feholdexcpt.c,v
+retrieving revision 1.1
+diff -u -r1.1 feholdexcpt.c
+--- libc/ports/sysdeps/arm/eabi/feholdexcpt.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/feholdexcpt.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ feholdexcept (fenv_t *envp)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int temp;
+
+Index: libc/ports/sysdeps/arm/eabi/fesetenv.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fesetenv.c,v
+retrieving revision 1.1
+diff -u -r1.1 fesetenv.c
+--- libc/ports/sysdeps/arm/eabi/fesetenv.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fesetenv.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __fesetenv (const fenv_t *envp)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned int temp;
+
+Index: libc/ports/sysdeps/arm/eabi/fesetround.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fesetround.c,v
+retrieving revision 1.1
+diff -u -r1.1 fesetround.c
+--- libc/ports/sysdeps/arm/eabi/fesetround.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fesetround.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fesetround (int round)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fpu_control_t temp;
+
+Index: libc/ports/sysdeps/arm/eabi/fraiseexcpt.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fraiseexcpt.c,v
+retrieving revision 1.1
+diff -u -r1.1 fraiseexcpt.c
+--- libc/ports/sysdeps/arm/eabi/fraiseexcpt.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fraiseexcpt.c 24 Oct 2006 19:17:51 -0000
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ feraiseexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ int fpscr;
+ const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
+Index: libc/ports/sysdeps/arm/eabi/fsetexcptflg.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fsetexcptflg.c,v
+retrieving revision 1.1
+diff -u -r1.1 fsetexcptflg.c
+--- libc/ports/sysdeps/arm/eabi/fsetexcptflg.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/fsetexcptflg.c 24 Oct 2006 19:17:51 -0000
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __fesetexceptflag (const fexcept_t *flagp, int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fexcept_t temp;
+
+Index: libc/ports/sysdeps/arm/eabi/ftestexcept.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/ftestexcept.c,v
+retrieving revision 1.1
+diff -u -r1.1 ftestexcept.c
+--- libc/ports/sysdeps/arm/eabi/ftestexcept.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/ftestexcept.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fetestexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fexcept_t temp;
+
+Index: libc/ports/sysdeps/arm/eabi/setfpucw.c
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/setfpucw.c,v
+retrieving revision 1.1
+diff -u -r1.1 setfpucw.c
+--- libc/ports/sysdeps/arm/eabi/setfpucw.c 10 Oct 2005 15:29:32 -0000 1.1
++++ libc/ports/sysdeps/arm/eabi/setfpucw.c 24 Oct 2006 19:17:51 -0000
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ void
+ __setfpucw (fpu_control_t set)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fpu_control_t cw;
-- 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] |