Configure: Add configure switch to control use of sigaltstack
This commit is contained in:
10
config.lib
10
config.lib
@@ -99,6 +99,7 @@ set_default() {
|
|||||||
with_bfd_extra_debug="1"
|
with_bfd_extra_debug="1"
|
||||||
with_self_gdb_debug="1"
|
with_self_gdb_debug="1"
|
||||||
with_self_lldb_debug="1"
|
with_self_lldb_debug="1"
|
||||||
|
with_sigaltstack="1"
|
||||||
|
|
||||||
save_params_array="
|
save_params_array="
|
||||||
build
|
build
|
||||||
@@ -180,6 +181,7 @@ set_default() {
|
|||||||
with_bfd_extra_debug
|
with_bfd_extra_debug
|
||||||
with_self_gdb_debug
|
with_self_gdb_debug
|
||||||
with_self_lldb_debug
|
with_self_lldb_debug
|
||||||
|
with_sigaltstack
|
||||||
CC CXX CFLAGS CXXFLAGS LDFLAGS CFLAGS_BUILD CXXFLAGS_BUILD LDFLAGS_BUILD PKG_CONFIG_PATH PKG_CONFIG_LIBDIR"
|
CC CXX CFLAGS CXXFLAGS LDFLAGS CFLAGS_BUILD CXXFLAGS_BUILD LDFLAGS_BUILD PKG_CONFIG_PATH PKG_CONFIG_LIBDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,6 +493,10 @@ detect_params() {
|
|||||||
--with-self-lldb-debug) with_self_lldb_debug="1";;
|
--with-self-lldb-debug) with_self_lldb_debug="1";;
|
||||||
--with-self-lldb-debug=*) with_self_lldb_debug="$optarg";;
|
--with-self-lldb-debug=*) with_self_lldb_debug="$optarg";;
|
||||||
|
|
||||||
|
--without-sigaltstack) with_sigaltstack="0";;
|
||||||
|
--with-sigaltstack) with_sigaltstack="1";;
|
||||||
|
--with-sigaltstack=*) with_sigaltstack="$optarg";;
|
||||||
|
|
||||||
CC=* | --CC=*) CC="$optarg";;
|
CC=* | --CC=*) CC="$optarg";;
|
||||||
CXX=* | --CXX=*) CXX="$optarg";;
|
CXX=* | --CXX=*) CXX="$optarg";;
|
||||||
CFLAGS=* | --CFLAGS=*) CFLAGS="$optarg";;
|
CFLAGS=* | --CFLAGS=*) CFLAGS="$optarg";;
|
||||||
@@ -1817,6 +1823,7 @@ EOL
|
|||||||
CFLAGS="$CFLAGS -DWITH_UCONTEXT"
|
CFLAGS="$CFLAGS -DWITH_UCONTEXT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$with_sigaltstack" = "1" ]; then
|
||||||
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaltstack -x c++ - -ldl"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaltstack -x c++ - -ldl"
|
||||||
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaltstack -x c++ - -ldl 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaltstack -x c++ - -ldl 2> /dev/null << EOL
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -1839,6 +1846,9 @@ EOL
|
|||||||
log 1 "checking sigaltstack... found"
|
log 1 "checking sigaltstack... found"
|
||||||
CFLAGS="$CFLAGS -DWITH_SIGALTSTACK"
|
CFLAGS="$CFLAGS -DWITH_SIGALTSTACK"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
log 1 "checking sigaltstack... disabled"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$os" = "MINGW" ]; then
|
if [ "$os" = "MINGW" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user