summaryrefslogtreecommitdiff
path: root/src/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/stage-0-gcc.TARGETS13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/bootstrap/stage-0-gcc.TARGETS b/src/bootstrap/stage-0-gcc.TARGETS
index 33812ef..5f067a3 100644
--- a/src/bootstrap/stage-0-gcc.TARGETS
+++ b/src/bootstrap/stage-0-gcc.TARGETS
@@ -103,6 +103,9 @@
, "export MAKE=${LOCALBASE}/bin/make"
, "export PATH=$(pwd)/binutils/bin:${LOCALBASE}/bin:$PATH"
, "export BUILD_ROOT_DIR=${ACTION_DIR}"
+ , "export SHELL=${LOCALBASE}/bin/sh"
+ , "export CONFIG_SHELL=${LOCALBASE}/bin/sh"
+ , "export CXX=no"
, "unset LDFLAGS"
, "CONF_ARGS="
, "if [ -n \"$HOST_SYSTEM_HDR_DIR\" ]; then"
@@ -131,8 +134,16 @@
, "cp -r binutils/. ${DESTDIR}/."
, "chmod -R +w ${DESTDIR}/*"
, "cd src"
+ , "for f in $(find . -type f -exec grep -q '#! */bin/sh' {} \\; -print)"
+ , "do"
+ , " cp $f $f.__work"
+ , " rm $f"
+ , " chmod 755 $f.__work"
+ , " sed -i 's|#! */bin/sh|#!'\"${SHELL}\"'|g' $f.__work"
+ , " mv $f.__work $f"
+ , "done"
, "export check_msgfmt=no # do not use system's msgfmt, if available"
- , "./configure --prefix=/ --enable-languages=c,c++ --disable-multilib --disable-shared --disable-lto --disable-gcov --disable-libmudflap --disable-libgomp --disable-libssp --disable-nls --disable-libitm ${CONF_ARGS} >configure.log 2>&1 || (cat configure.log && exit 1)"
+ , "${SHELL} ./configure --prefix=/ --enable-languages=c,c++ --disable-multilib --disable-shared --disable-lto --disable-gcov --disable-libmudflap --disable-libgomp --disable-libssp --disable-nls --disable-libitm ${CONF_ARGS} >configure.log 2>&1 || (cat configure.log && exit 1)"
, "${MAKE} -j${NJOBS} >build.log 2>&1 || (cat configure.log build.log && exit 1)"
, "${MAKE} -j${NJOBS} DESTDIR=${DESTDIR} install-strip >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
, "cd ${DESTDIR}"