Upgraded to gcc-4.5.1
[hvlinux.git] / stage0 / cis-gcc-pass2
index 4ec8626..2dea487 100755 (executable)
@@ -6,41 +6,9 @@ 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 \
-            --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
 
 # Configure options:
-# --enable-languages=c,c++
-#     This option ensures that only the C and C++ compilers are built.
 # --enable-__cxa_atexit
 #     This option allows use of __cxa_atexit, rather than atexit, to register
 #     C++ destructors for local
@@ -54,6 +22,8 @@ sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \
 #     Enables long long support in the compiler.
 # --enable-threads=posix
 #     This enables C++ exception handling for multi-threaded code.
+# --enable-languages=c,c++
+#     This option ensures that only the C and C++ compilers are built.
 cd ${LFS_TMP}/${1}-build
 AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
     ../${1}/configure \