gdb: LDFLAGS=-lmcheck
[nethome.git] / bin / errs1
index 20fce10..bcd0c76 100755 (executable)
--- a/bin/errs1
+++ b/bin/errs1
@@ -7,6 +7,7 @@ target=
 targets=
 configure="./configure"
 debug="-ggdb2"
+ldflags=""
 
 while true
 do
@@ -63,6 +64,7 @@ done
        if test -f `dirname $configure`/bfd/elf64-x86-64.c;then
                test -f g77 || (test -f /usr/bin/gfortran && ln -s /usr/bin/gfortran g77)
                targets="--enable-targets=all"
+               ldflags="-lmcheck"
        fi
 
        if test -f `dirname $configure`/gcc/reload.c;then
@@ -96,6 +98,7 @@ done
        export GCJFLAGS="$flags"
        export CFLAGS_FOR_TARGET="$flags"
        export CXXFLAGS_FOR_TARGET="$flags"
+       export LDFLAGS="$ldflags"
 
        time nice "$configure" $target $targets $customss --enable-debug $maintainer $werror "$@"
        ) 2>&1|tee errs1