scripts/build/cc/gcc.sh
changeset 1122 796d1143a1dc
parent 1112 c72aecd1a9ef
child 1126 1ab3d2e08c8b
     1.1 --- a/scripts/build/cc/gcc.sh	Sat Jan 03 21:11:41 2009 +0000
     1.2 +++ b/scripts/build/cc/gcc.sh	Sun Jan 04 14:39:39 2009 +0000
     1.3 @@ -10,13 +10,13 @@
     1.4      # Arrgghh! Some of those versions does not follow this convention:
     1.5      # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
     1.6      # subdirectory! You bastard!
     1.7 -    CT_GetFile "${CT_CC_FILE}"  \
     1.8 -               {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/${CT_CC_FILE}}
     1.9 +    CT_GetFile "gcc-${CT_CC_VERSION}"   \
    1.10 +               {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}}
    1.11  }
    1.12  
    1.13  # Extract gcc
    1.14  do_cc_extract() {
    1.15 -    CT_ExtractAndPatch "${CT_CC_FILE}"
    1.16 +    CT_ExtractAndPatch "gcc-${CT_CC_VERSION}"
    1.17  }
    1.18  
    1.19  #------------------------------------------------------------------------------
    1.20 @@ -126,7 +126,7 @@
    1.21      CC_FOR_BUILD="${CT_BUILD}-gcc"                  \
    1.22      CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    1.23      CT_DoExecLog ALL                                \
    1.24 -    "${CT_SRC_DIR}/${CT_CC_FILE}/configure"         \
    1.25 +    "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure"  \
    1.26          --build=${CT_BUILD}                         \
    1.27          --host=${CT_HOST}                           \
    1.28          --target=${CT_TARGET}                       \
    1.29 @@ -158,7 +158,7 @@
    1.30          # so we configure then build it.
    1.31          # Next we have to configure gcc, create libgcc.mk then edit it...
    1.32          # So much easier if we just edit the source tree, but hey...
    1.33 -        if [ ! -f "${CT_SRC_DIR}/${CT_CC_FILE}/gcc/BASE-VER" ]; then
    1.34 +        if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then
    1.35              CT_DoExecLog ALL make configure-libiberty
    1.36              CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libiberty libiberty.a
    1.37              CT_DoExecLog ALL make configure-gcc configure-libcpp
    1.38 @@ -168,7 +168,7 @@
    1.39              CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp all-build-libiberty
    1.40          fi
    1.41          # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here.
    1.42 -        if [ -d "${CT_SRC_DIR}/${CT_CC_FILE}/libdecnumber" ]; then
    1.43 +        if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/libdecnumber" ]; then
    1.44              CT_DoExecLog ALL make configure-libdecnumber
    1.45              CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libdecnumber libdecnumber.a
    1.46          fi
    1.47 @@ -260,26 +260,26 @@
    1.48      # detection problem only matters for gcc-3.2.x and later, I think.
    1.49      # --disable-nls to work around crash bug on ppc405, but also because
    1.50      # embedded systems don't really need message catalogs...
    1.51 -    CC_FOR_BUILD="${CT_BUILD}-gcc"              \
    1.52 -    CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
    1.53 -    CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}"     \
    1.54 -    CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}"   \
    1.55 -    LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}"   \
    1.56 -    CT_DoExecLog ALL                            \
    1.57 -    "${CT_SRC_DIR}/${CT_CC_FILE}/configure"     \
    1.58 -        --build=${CT_BUILD}                     \
    1.59 -        --host=${CT_HOST}                       \
    1.60 -        --target=${CT_TARGET}                   \
    1.61 -        --prefix="${CT_PREFIX_DIR}"             \
    1.62 -        ${CC_SYSROOT_ARG}                       \
    1.63 -        ${extra_config}                         \
    1.64 -        --with-local-prefix="${CT_SYSROOT_DIR}" \
    1.65 -        --disable-nls                           \
    1.66 -        --enable-threads=posix                  \
    1.67 -        --enable-symvers=gnu                    \
    1.68 -        --enable-c99                            \
    1.69 -        --enable-long-long                      \
    1.70 -        --enable-target-optspace                \
    1.71 +    CC_FOR_BUILD="${CT_BUILD}-gcc"                  \
    1.72 +    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    1.73 +    CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}"         \
    1.74 +    CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}"       \
    1.75 +    LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}"       \
    1.76 +    CT_DoExecLog ALL                                \
    1.77 +    "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure"  \
    1.78 +        --build=${CT_BUILD}                         \
    1.79 +        --host=${CT_HOST}                           \
    1.80 +        --target=${CT_TARGET}                       \
    1.81 +        --prefix="${CT_PREFIX_DIR}"                 \
    1.82 +        ${CC_SYSROOT_ARG}                           \
    1.83 +        ${extra_config}                             \
    1.84 +        --with-local-prefix="${CT_SYSROOT_DIR}"     \
    1.85 +        --disable-nls                               \
    1.86 +        --enable-threads=posix                      \
    1.87 +        --enable-symvers=gnu                        \
    1.88 +        --enable-c99                                \
    1.89 +        --enable-long-long                          \
    1.90 +        --enable-target-optspace                    \
    1.91          ${CT_CC_EXTRA_CONFIG}
    1.92  
    1.93      if [ "${CT_CANADIAN}" = "y" ]; then