4 renice +19 -p $$; ionice -c3 -p $$
10 customss="--enable-static --disable-shared"
14 configure="./configure"
21 if [ "$1" = "--origss" ];then
26 if [ "$1" = "--fast" ];then
31 if [ "$1" = "--shared" ];then
32 customss="--disable-static --enable-shared"
37 if [ "$1" = "-m" ];then
42 if [ "$1" = "-m32" ];then
45 i?86|x86_64|ia64) target=i386-unknown-linux-gnu ;;
46 ppc*) target=powerpc64-unknown-linux-gnu ;;
47 s390*) target=s390-unknown-linux-gnu ;;
53 if [ "${1#*/configure}" != "$1" ];then
59 if [ "$1" = "-s" ];then
60 # -O0 is important to override GCC -O2.
73 find -name config.cache|xargs rm -f
76 if test -f `dirname $configure`/bfd/elf64-x86-64.c \
77 -o -f `dirname $configure`/gcc/reload.c;then
81 # maintainer="--enable-maintainer-mode"
83 if test -f `dirname $configure`/bfd/elf64-x86-64.c;then
84 test -f g77 || (test -f /usr/bin/gfortran && ln -s /usr/bin/gfortran g77)
87 targets="$targets --enable-64-bit-bfd"
89 if ! $fast && test -f `dirname $configure`/bfd/elf64-x86-64.c -a '(' -d CVS -o -d .git ')';then
90 targets="$targets --enable-targets=all"
93 if test -f `dirname $configure`/gcc/reload.c;then
94 werror="--disable-werror"
96 customss="--disable-static --enable-shared"
101 test -z "$CC" && CC=gcc
104 "$debug -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4" \
105 "$debug -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions" \
108 if [ -z "$flags" ];then
110 echo >&2 "flags error"
113 "$CC" $flags -c errs1.c -o /dev/null && break
115 if test -n "$customm" && "$CC" $customm -c errs1.c -o /dev/null;then
116 flags="$customm $flags"
119 export CFLAGS="$flags"
120 export CXXFLAGS="$flags"
121 export GCJFLAGS="$flags"
122 export CFLAGS_FOR_TARGET="$flags"
123 export CXXFLAGS_FOR_TARGET="$flags"
124 export LDFLAGS="$ldflags"
126 time nice "$configure" $target $targets $customss --enable-debug --disable-sim --enable-gold=both $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"
128 (ctags; test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)) &