From: Jan Kratochvil Date: Sat, 13 Dec 2014 17:23:58 +0000 (+0100) Subject: errs12: X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=6e1a6c699dde9cae786095fec4db890f20ed5319 errs12: renice: 19->10 -lmcheck -> -fsanitize=address +--disable-binutils --disable-gas --disable-gold --disable-gprof --disable-ld +--with-system-readline +-fstack-protector-strong +--without-guile --- diff --git a/bin/errs12 b/bin/errs12 index a1ef035..9148109 100755 --- a/bin/errs12 +++ b/bin/errs12 @@ -1,7 +1,8 @@ #! /bin/bash # $Id$ -renice +19 -p $$; ionice -c3 -p $$ +#renice +19 -p $$; ionice -c3 -p $$ +renice +10 -p $$; ionice -c3 -p $$ # Do not use for ctags - it would override $PATH: # PS1=x; . ~/.bashrc @@ -18,9 +19,13 @@ if gcc --version|perl -ne 'exit(!(/(\d+)\.(\d+)/&&($1>4||($1==4&&$2>=7))));';the else debug="-g2" fi -mcheck="-lmcheck" +#asan="" +asan="-fsanitize=address" +mcheck="" +#mcheck="-lmcheck" fast=false readline="" +disablebinutils="--disable-binutils --disable-gas --disable-gold --disable-gprof --disable-ld" while true do @@ -69,12 +74,30 @@ do continue fi + if [ "$1" = "--asan" ];then + asan="-fsanitize=address" + shift + continue + fi + + if [ "$1" = "--noasan" ];then + asan="" + shift + continue + fi + if [ "$1" = "--nomcheck" ];then mcheck="" shift continue fi + if [ "$1" = "--binutils" ];then + disablebinutils="" + shift + continue + fi + break done @@ -100,6 +123,9 @@ rm -f errs1.ok if ! $fast && test -f `dirname $configure`/bfd/elf64-x86-64.c -a '(' -d CVS -o -d .git ')';then targets="$targets --enable-targets=all" fi + if test ! -d readline;then # $fast || + targets="$targets --with-system-readline" + fi if test -f `dirname $configure`/gcc/reload.c;then werror="--disable-werror" @@ -121,6 +147,8 @@ rm -f errs1.ok : >errs1.c # -Wp,-D_FORTIFY_SOURCE=2: /usr/include/features.h:329:3: error: #warning _FORTIFY_SOURCE requested but disabled [-Werror=cpp] for flags in \ + "$debug -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -ftrack-macro-expansion=0 -fno-diagnostics-show-caret $asan" \ + "$debug -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -ftrack-macro-expansion=0 -fno-diagnostics-show-caret $asan" \ "$debug -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -ftrack-macro-expansion=0 -fno-diagnostics-show-caret" \ "$debug -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4" \ "$debug -pipe -Wall -fexceptions" \ @@ -140,14 +168,18 @@ rm -f errs1.ok flags="$customm $flags" fi rm -f errs1.c + if ! echo "$flags"|grep -q 'fsanitize=address';then + asan="" + fi export CFLAGS="$flags" export CXXFLAGS="$flags" export GCJFLAGS="$flags" export CFLAGS_FOR_TARGET="$flags" export CXXFLAGS_FOR_TARGET="$flags" - export LDFLAGS="$mcheck" + export LDFLAGS="$mcheck $asan" - time nice "$configure" $target $targets $customss $readline --enable-debug --disable-sim --enable-gold --enable-plugins $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@" + time nice "$configure" $target $targets $customss $readline $disablebinutils --enable-debug --disable-sim $maintainer $werror --with-separate-debug-dir=/usr/lib/debug --without-guile "$@" +# --enable-gold --enable-plugins (ctags; test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)) &