git://git.jankratochvil.net
/
nethome.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
+--nomcheck
[nethome.git]
/
bin
/
errs12
diff --git
a/bin/errs12
b/bin/errs12
index
e7c7e07
..
1f8ac85
100755
(executable)
--- a/
bin/errs12
+++ b/
bin/errs12
@@
-3,18
+3,24
@@
renice +19 -p $$; ionice -c3 -p $$
renice +19 -p $$; ionice -c3 -p $$
-#
For ctags
-PS1=x
-. ~/.bashrc
+#
Do not use for ctags - it would override $PATH:
+# PS1=x; . ~/.bashrc
+function ctags {(unset ctags; PS1=x; . ~/.bashrc; ctags; );}
customss="--enable-static --disable-shared"
customm="-m64"
target=
targets=
configure="./configure"
customss="--enable-static --disable-shared"
customm="-m64"
target=
targets=
configure="./configure"
-debug="-ggdb2"
-ldflags="-lmcheck"
+# >=4.7 has small macros section.
+if gcc --version|perl -ne 'exit(!(/(\d+)\.(\d+)/&&($1>4||($1==4&&$2>=7))));';then
+ debug="-g3"
+else
+ debug="-g2"
+fi
+mcheck="-lmcheck"
fast=false
fast=false
+readline=""
while true
do
while true
do
@@
-59,7
+65,12
@@
do
if [ "$1" = "-s" ];then
# -O0 is important to override GCC -O2.
debug="-O0 -s"
if [ "$1" = "-s" ];then
# -O0 is important to override GCC -O2.
debug="-O0 -s"
- #ldflags=""
+ shift
+ continue
+ fi
+
+ if [ "$1" = "--nomcheck" ];then
+ mcheck=""
shift
continue
fi
shift
continue
fi
@@
-94,16
+105,24
@@
rm -f errs1.ok
werror="--disable-werror"
customm=""
# --disable-static would fail on finding built libstdc++ due to -static-libstdc++.
werror="--disable-werror"
customm=""
# --disable-static would fail on finding built libstdc++ due to -static-libstdc++.
- customss=""
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49829
+ #customss=""
+ customss="--disable-static --enable-shared"
else
werror=""
fi
else
werror=""
fi
+ if test -d readline/doc && ! test -e readline/readline.c;then
+ # Fedora gdb.spec prep.
+ readline="--with-system-readline"
+ fi
+
test -z "$CC" && CC=gcc
: >errs1.c
test -z "$CC" && CC=gcc
: >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 \
for flags in \
- "$debug -pipe -Wall -
Wp,-D_FORTIFY_SOURCE=2 -
fexceptions -fstack-protector --param=ssp-buffer-size=4" \
- "$debug -pipe -Wall -
Wp,-D_FORTIFY_SOURCE=2 -
fexceptions" \
+ "$debug -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4" \
+ "$debug -pipe -Wall -fexceptions" \
"" \
;do
if [ -z "$flags" ];then
"" \
;do
if [ -z "$flags" ];then
@@
-111,7
+130,10
@@
rm -f errs1.ok
echo >&2 "flags error"
exit 1
fi
echo >&2 "flags error"
exit 1
fi
- "$CC" $flags -c errs1.c -o /dev/null && break
+ # Use -Werror:
+ # cc1: warnings being treated as errors
+ # archive.c:1: error: -fstack-protector not supported for this target
+ "$CC" $flags -Werror -c errs1.c -o /dev/null && break
done
if test -n "$customm" && "$CC" $customm -c errs1.c -o /dev/null;then
flags="$customm $flags"
done
if test -n "$customm" && "$CC" $customm -c errs1.c -o /dev/null;then
flags="$customm $flags"
@@
-122,9
+144,9
@@
rm -f errs1.ok
export GCJFLAGS="$flags"
export CFLAGS_FOR_TARGET="$flags"
export CXXFLAGS_FOR_TARGET="$flags"
export GCJFLAGS="$flags"
export CFLAGS_FOR_TARGET="$flags"
export CXXFLAGS_FOR_TARGET="$flags"
- export LDFLAGS="$
ldflags
"
+ export LDFLAGS="$
mcheck
"
- time nice "$configure" $target $targets $customss --enable-debug --disable-sim --enable-gold --enable-plugins $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"
+ time nice "$configure" $target $targets $customss
$readline
--enable-debug --disable-sim --enable-gold --enable-plugins $maintainer $werror --with-separate-debug-dir=/usr/lib/debug "$@"
(ctags; test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)) &
(ctags; test -d gdb && (cd gdb; ctags; cd testsuite; ctags; cd ../gdbserver; ctags)) &