4 renice +19 -p $$; ionice -c3 -p $$
10 customss="--enable-static --disable-shared"
14 configure="./configure"
22 if [ "$1" = "--origss" ];then
27 if [ "$1" = "--fast" ];then
32 if [ "$1" = "--shared" ];then
33 customss="--disable-static --enable-shared"
38 if [ "$1" = "-m" ];then
43 if [ "$1" = "-m32" ];then
46 i?86|x86_64|ia64) target=i386-unknown-linux-gnu ;;
47 ppc*) target=powerpc64-unknown-linux-gnu ;;
48 s390*) target=s390-unknown-linux-gnu ;;
54 if [ "${1#*/configure}" != "$1" ];then
60 if [ "$1" = "-s" ];then
61 # -O0 is important to override GCC -O2.
74 find -name config.cache|xargs rm -f
77 if test -f `dirname $configure`/bfd/elf64-x86-64.c \
78 -o -f `dirname $configure`/gcc/reload.c;then
82 # maintainer="--enable-maintainer-mode"
84 if test -f `dirname $configure`/bfd/elf64-x86-64.c;then
85 test -f g77 || (test -f /usr/bin/gfortran && ln -s /usr/bin/gfortran g77)
88 targets="$targets --enable-64-bit-bfd"
90 if ! $fast && test -f `dirname $configure`/bfd/elf64-x86-64.c -a '(' -d CVS -o -d .git ')';then
91 targets="$targets --enable-targets=all"
94 if test -f `dirname $configure`/gcc/reload.c;then
95 werror="--disable-werror"
97 # --disable-static would fail on finding built libstdc++ due to -static-libstdc++.
103 if test -d readline/doc && ! test -e readline/readline.c;then
104 # Fedora gdb.spec prep.
105 readline="--with-system-readline"
108 test -z "$CC" && CC=gcc
111 "$debug -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4" \
112 "$debug -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions" \
115 if [ -z "$flags" ];then
117 echo >&2 "flags error"
120 "$CC" $flags -c errs1.c -o /dev/null && break
122 if test -n "$customm" && "$CC" $customm -c errs1.c -o /dev/null;then
123 flags="$customm $flags"
126 export CFLAGS="$flags"
127 export CXXFLAGS="$flags"
128 export GCJFLAGS="$flags"
129 export CFLAGS_FOR_TARGET="$flags"
130 export CXXFLAGS_FOR_TARGET="$flags"
131 export LDFLAGS="$ldflags"
133 time nice "$configure" $target $targets $customss $readline --enable-debug --disable-sim --enable-gold --enable-plugins $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"
135 (ctags; test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)) &