Removed executable property from certain read-only files
[hvlinux.git] / stage1 / cis-gcc
index 445bc89..ae99b97 100755 (executable)
@@ -6,8 +6,12 @@ source ../sysinfos
 source ../functions
 source ../packages-list
 
-# Manually applying patches
-apply_patch ${1}-branch_update-1.patch ${1}
+# Manually applying patches if specified
+if [ -n "${GCC_PATCHES}" ]; then
+    for p in ${GCC_PATCHES}; do
+        apply_patch ${1}-${p}.patch ${1}
+    done
+fi
 
 case "${HVL_TARGET}" in
     "x86")
@@ -60,9 +64,8 @@ CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
     --enable-__cxa_atexit \
     --enable-languages=c,c++
 # Prevent GCC from looking in the wrong directories for headers and libraries:
-cp Makefile{,.orig}
-sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \
-    Makefile.orig > Makefile
+sed -e "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \
+    -i Makefile
 ${HVMAKE} AS_FOR_TARGET="${AS}" LD_FOR_TARGET="${LD}"
 ${HVMAKE} install