Changes to crosstool-0.42 by Martin Guy getandpatch.sh: * Add support for GLIBCPORTS_FILENAME to add ports from release or snapshot * Enable glibc-2.3-20060512 style snapshops * Don't automatically add GLIBCTHREADS_FILENAME: glibc_2.4 doesn't want it and all gcc*.dat files already mention it explicitly (except cygwin which doesn't want it anyway) crosstool.sh: * Add support for GLIBCPORTS_FILENAME, adding ",ports" to --enable-add-ons * Allow GLIBCADDON_OPTION=a,b,c as well as GLIBCADDONOPTIONS="=a,b,c" --- crosstool-0.42/getandpatch.sh 2006-02-27 19:22:26.000000000 +0000 +++ crosstool-0.42-mg1/getandpatch.sh 2006-03-15 13:03:58.000000000 +0000 @@ -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." @@ -145,6 +142,18 @@ abort "Unrecognized suffix for tarball $ARCHIVE_NAME" ;; esac + # ports dir contents need to be moved to "ports" + case $BASENAME in + glibc*-ports-*) + # Bomb-proofing in case "ports" dir already exists + if [ -d ports ]; then + abort "ports directory already exists in $GLIBC_DIR" + else + mv $BASENAME ports + fi + ;; + esac + # Fix path of old linux source trees if [ -d linux ]; then mv linux $BASENAME @@ -202,7 +211,7 @@ # No glibc for cygwin. if test "${CYGWIN_DIR}" = ""; then case $GLIBC_DIR in - glibc-200*) + glibc*-200*) getUnpackAndPatch \ ftp://gcc.gnu.org/pub/glibc/snapshots/$GLIBC_DIR.tar.bz2 \ ftp://gcc.gnu.org/pub/glibc/snapshots/$GLIBC_DIR.tar.gz ;; @@ -264,12 +273,25 @@ 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 + 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 - + test -n "${GLIBCPORTS_FILENAME}" && + case $GLIBCPORTS_FILENAME in + glibc*-ports-200*) + getUnpackAndPatch \ + ftp://gcc.gnu.org/pub/glibc/snapshots/$GLIBCPORTS_FILENAME.tar.bz2 \ + ftp://gcc.gnu.org/pub/glibc/snapshots/$GLIBCPORTS_FILENAME.tar.gz ;; + *) + getUnpackAndPatch \ + ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCPORTS_FILENAME.tar.bz2 \ + ftp://ftp.gnu.org/pub/gnu/glibc/$GLIBCPORTS_FILENAME.tar.gz \ + ftp://gcc.gnu.org/pub/glibc/releases/$GLIBCPORTS_FILENAME.tar.bz2 \ + ftp://gcc.gnu.org/pub/glibc/releases/$GLIBCPORTS_FILENAME.tar.gz ;; + esac 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 --- crosstool-0.42/crosstool.sh 2006-02-26 02:14:13.000000000 +0000 +++ crosstool-0.42-mg1/crosstool.sh 2006-03-15 13:48:24.000000000 +0000 @@ -70,15 +70,24 @@ test -z "$BUILD" && abort "bug: BUILD not set?!" if test -z "${GLIBC_ADDON_OPTIONS}"; then - echo "GLIBC_ADDON_OPTIONS not set, so guessing addons from GLIBCTHREADS_FILENAME and GLIBCCRYPT_FILENAME" + echo "GLIBC_ADDON_OPTIONS not set, so guessing addons from GLIBC*_FILENAME" # this is lame, need to fix this for nptl later? # (nptl is an addon, but it's shipped in the main tarball) GLIBC_ADDON_OPTIONS="=" + case "${GLIBCPORTS_FILENAME}" in + *-ports-*) GLIBC_ADDON_OPTIONS="${GLIBC_ADDON_OPTIONS}ports," ;; + esac case "${GLIBCTHREADS_FILENAME}" in *linuxthreads*) GLIBC_ADDON_OPTIONS="${GLIBC_ADDON_OPTIONS}linuxthreads," ;; esac # crypt is only an addon for glibc-2.1.x test -z "${GLIBCCRYPT_FILENAME}" || GLIBC_ADDON_OPTIONS="${GLIBC_ADDON_OPTIONS}crypt," +else + # Allow GLIBC_ADDON_OPTION=nptl as well as the old "GLIBC_ADDON_OPTIONS="=nptl" + case "$GLIBC_ADDON_OPTIONS" in + =*) ;; + *) GLIBC_ADDON_OPTIONS="=$GLIBC_ADDON_OPTIONS" ;; + esac fi # Add some default glibc config options if not given by user. These used to be hardcoded.