update compile script (add debug_static option)

This commit is contained in:
Sergej Schumilo 2022-01-11 04:18:21 +01:00
parent 1d77722270
commit a3264cfa83
2 changed files with 16 additions and 5 deletions

View File

@ -22,10 +22,11 @@ error () {
echo "$0: <option>"
echo ""
echo "Available compile options: "
echo " - dynamic dynamically link libxdc and capstone4"
echo " - static statically link libxdc and capstone4"
echo " - lto statically link libxdc and capstone4 and enable LTO (up to 10% better performance)"
echo " - debug enable several debug options"
echo " - dynamic dynamically link libxdc and capstone4"
echo " - static statically link libxdc and capstone4"
echo " - lto statically link libxdc and capstone4 and enable LTO (up to 10% better performance)"
echo " - debug enable several debug options"
echo " - debug_static enable several debug options and statically link libxdc and capstone4"
echo ""
exit 3
}
@ -109,6 +110,16 @@ then
exit 0
fi
if [ "$1" == "debug_static" ];
then
make clean
compile_libraries
./configure --target-list=x86_64-softmmu --disable-docs --enable-gtk --disable-werror --disable-capstone --disable-libssh --enable-nyx --enable-sanitizers --enable-debug --enable-nyx-static --disable-tools
compile
exit 0
fi
if [ "$1" == "static" ];
then

2
configure vendored
View File

@ -6125,7 +6125,7 @@ fi
if test "$debug" = "no"; then
CFLAGS="-O3 -rdynamic -frename-registers -frename-registers -mtune=native $CFLAGS"
else
CFLAGS="-O0 -g $CFLAGS"
CFLAGS="-O0 -rdynamic -g $CFLAGS"
fi
if test "$have_asan" = "yes"; then