Upgraded to gcc-4.5.1
[hvlinux.git] / stage0 / cis-gcc-pass1
index 4e665f8..961f61e 100755 (executable)
@@ -6,43 +6,12 @@ source ../sysinfos
 source ../functions
 source ../packages-list
 
-# Manually applying patches
-apply_patch ${1}-branch_update-1.patch ${1}
-
-case "${HVL_TARGET}" in
-    *)
-        TARGET_CONFIGURE_OPTS="--with-ppl=/cross-tools \
-            --with-cloog=/cross-tools \
-            --with-local-prefix=/tools \
-            --disable-multilib"
-        ;;
-esac
-
-
-case "${HVL_TARGET}" in
-    "x86")
-        apply_patch ${1}-specs-1.patch ${1}
-        ;;
-    "x86_64")
-        apply_patch ${1}-pure64_specs-1.patch ${1}
-       ;;
-esac
-
-cd ${LFS_TMP}/${1}
-
-# Change the StartFile Spec to point to the correct library location:
-echo -en '#undef STANDARD_INCLUDE_DIR\n#define STANDARD_INCLUDE_DIR "/tools/include/"\n\n' >> gcc/config/linux.h
-echo -en '\n#undef STANDARD_STARTFILE_PREFIX_1\n#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"\n' >> gcc/config/linux.h
-echo -en '\n#undef STANDARD_STARTFILE_PREFIX_2\n#define STANDARD_STARTFILE_PREFIX_2 ""\n' >> gcc/config/linux.h
-
-# Alter gcc's C preprocessor's default include search path to use /tools only:
-cp -v gcc/Makefile.in{,.orig}
-sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \
-    gcc/Makefile.in.orig > gcc/Makefile.in
+source ./cis-gcc-common
 
 # We will create a dummy limits.h so the build will not use the one provided by the host distro:
 touch /tools/include/limits.h
 
+# Configure options:
 # --with-local-prefix=/tools
 #     Remove /usr/local/include from gcc's include search path. This is not
 #     absolutely essential, however, it helps to minimize the influence of the
@@ -63,6 +32,7 @@ AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
     --host=${CLFS_HOST} \
     --target=${CLFS_TARGET} \
     --with-sysroot=${CLFS} \
+    --with-local-prefix=/tools \
     --disable-nls \
     --disable-shared \
     --with-mpfr=/cross-tools \