Remove workaround for GCC PR 49829.
[nethome.git] / bin / errs12
index 1217a17..a679861 100755 (executable)
@@ -1,11 +1,11 @@
-#! /bin/sh
+#! /bin/bash
 # $Id$
 
 renice +19 -p $$; ionice -c3 -p $$
 
-# For ctags
-PS1=x
-. ~/.bashrc
+# Do not use for ctags - it would override $PATH:
+# PS1=x; . ~/.bashrc
+function ctags {(unset ctags; PS1=x; . ~/.bashrc; ctags; );}
 
 customss="--enable-static --disable-shared"
 customm="-m64"
@@ -15,6 +15,7 @@ configure="./configure"
 debug="-ggdb2"
 ldflags="-lmcheck"
 fast=false
+readline=""
 
 while true
 do
@@ -94,11 +95,18 @@ rm -f errs1.ok
                werror="--disable-werror"
                customm=""
                # --disable-static would fail on finding built libstdc++ due to -static-libstdc++.
-               customss=""
+               # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49829
+               #customss=""
+               customss="--disable-static --enable-shared"
        else
                werror=""
        fi
 
+       if test -d readline/doc && ! test -e readline/readline.c;then
+               # Fedora gdb.spec prep.
+               readline="--with-system-readline"
+       fi
+
        test -z "$CC" && CC=gcc
        : >errs1.c
        for flags in                                                                                                    \
@@ -124,7 +132,7 @@ rm -f errs1.ok
        export CXXFLAGS_FOR_TARGET="$flags"
        export LDFLAGS="$ldflags"
 
-       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 $readline --enable-debug --disable-sim --enable-gold --enable-plugins $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"
 
        (ctags; test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)) &