4 renice +19 -p $$; ionice -c3 -p $$
6 customss="--enable-static --disable-shared"
10 configure="./configure"
17 if [ "$1" = "--origss" ];then
22 if [ "$1" = "--fast" ];then
27 if [ "$1" = "--shared" ];then
28 customss="--disable-static --enable-shared"
33 if [ "$1" = "-m" ];then
38 if [ "$1" = "-m32" ];then
41 i?86|x86_64|ia64) target=i386-unknown-linux-gnu ;;
42 ppc*) target=powerpc64-unknown-linux-gnu ;;
43 s390*) target=s390-unknown-linux-gnu ;;
49 if [ "${1#*/configure}" != "$1" ];then
55 if [ "$1" = "-s" ];then
56 # -O0 is important to override GCC -O2.
69 find -name config.cache|xargs rm -f
72 if test -f `dirname $configure`/bfd/elf64-x86-64.c \
73 -o -f `dirname $configure`/gcc/reload.c;then
77 # maintainer="--enable-maintainer-mode"
79 if test -f `dirname $configure`/bfd/elf64-x86-64.c;then
80 test -f g77 || (test -f /usr/bin/gfortran && ln -s /usr/bin/gfortran g77)
83 targets="$targets --enable-64-bit-bfd"
85 if ! $fast && test -f `dirname $configure`/bfd/elf64-x86-64.c -a '(' -d CVS -o -d .git ')';then
86 targets="$targets --enable-targets=all"
89 if test -f `dirname $configure`/gcc/reload.c;then
90 werror="--disable-werror"
92 customss="--disable-static --enable-shared"
97 test -z "$CC" && CC=gcc
100 "$debug -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4" \
101 "$debug -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions" \
104 if [ -z "$flags" ];then
106 echo >&2 "flags error"
109 "$CC" $flags -c errs1.c -o /dev/null && break
111 if test -n "$customm" && "$CC" $customm -c errs1.c -o /dev/null;then
112 flags="$customm $flags"
115 export CFLAGS="$flags"
116 export CXXFLAGS="$flags"
117 export GCJFLAGS="$flags"
118 export CFLAGS_FOR_TARGET="$flags"
119 export CXXFLAGS_FOR_TARGET="$flags"
120 export LDFLAGS="$ldflags"
122 time nice "$configure" $target $targets $customss --enable-debug --disable-sim $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"