Fix F-16 sh<->bash compatibility.
[nethome.git] / bin / errs12
index de5912d..e7c7e07 100755 (executable)
@@ -1,8 +1,12 @@
-#! /bin/sh
+#! /bin/bash
 # $Id$
 
 renice +19 -p $$; ionice -c3 -p $$
 
+# For ctags
+PS1=x
+. ~/.bashrc
+
 customss="--enable-static --disable-shared"
 customm="-m64"
 target=
@@ -55,7 +59,7 @@ do
        if [ "$1" = "-s" ];then
                # -O0 is important to override GCC -O2.
                debug="-O0 -s"
-               ldflags=""
+               #ldflags=""
                shift
                continue
        fi
@@ -89,7 +93,8 @@ rm -f errs1.ok
        if test -f `dirname $configure`/gcc/reload.c;then
                werror="--disable-werror"
                customm=""
-               customss="--disable-static --enable-shared"
+               # --disable-static would fail on finding built libstdc++ due to -static-libstdc++.
+               customss=""
        else
                werror=""
        fi
@@ -119,10 +124,9 @@ rm -f errs1.ok
        export CXXFLAGS_FOR_TARGET="$flags"
        export LDFLAGS="$ldflags"
 
-       ctags
-       test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)
+       time nice "$configure" $target $targets $customss --enable-debug --disable-sim --enable-gold --enable-plugins $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"
 
-       time nice "$configure" $target $targets $customss --enable-debug --disable-sim $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"
+       (ctags; test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)) &
 
        errs2