-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
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")
--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