Fix lib detection when using environment c/l flags
This was broken by f06061aa3b
This commit is contained in:
32
config.lib
32
config.lib
@@ -1513,8 +1513,8 @@ make_compiler_cflags() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_compile_libbfd() {
|
test_compile_libbfd() {
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS -o tmp.config.bfd -x c++ - $1"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.bfd -x c++ - $1"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS -o tmp.config.bfd -x c++ - $1 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.bfd -x c++ - $1 2> /dev/null << EOL
|
||||||
#define PACKAGE 1
|
#define PACKAGE 1
|
||||||
#define PACKAGE_VERSION 1
|
#define PACKAGE_VERSION 1
|
||||||
#include <bfd.h>
|
#include <bfd.h>
|
||||||
@@ -1674,8 +1674,8 @@ make_cflags_and_ldflags() {
|
|||||||
LIBS="$LIBS -lpthread"
|
LIBS="$LIBS -lpthread"
|
||||||
fi
|
fi
|
||||||
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
|
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS -o tmp.config.libdl -x c++ - -ldl"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.libdl -x c++ - -ldl"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS -o tmp.config.libdl -x c++ - -ldl 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.libdl -x c++ - -ldl 2> /dev/null << EOL
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
int main() {
|
int main() {
|
||||||
Dl_info info;
|
Dl_info info;
|
||||||
@@ -1713,8 +1713,8 @@ EOL
|
|||||||
|
|
||||||
HAVE_GDB_DBG=
|
HAVE_GDB_DBG=
|
||||||
if [ "$with_self_gdb_debug" = "1" ]; then
|
if [ "$with_self_gdb_debug" = "1" ]; then
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.dbggdb -x c++ -"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdb -x c++ -"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.dbggdb -x c++ - 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdb -x c++ - 2> /dev/null << EOL
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -1738,8 +1738,8 @@ EOL
|
|||||||
CFLAGS="$CFLAGS -DWITH_DBG_GDB"
|
CFLAGS="$CFLAGS -DWITH_DBG_GDB"
|
||||||
HAVE_GDB_DBG=1
|
HAVE_GDB_DBG=1
|
||||||
|
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.dbggdbprctl -x c++ -"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdbprctl -x c++ -"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.dbggdbprctl -x c++ - 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdbprctl -x c++ - 2> /dev/null << EOL
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
int main() {
|
int main() {
|
||||||
return prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0);
|
return prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0);
|
||||||
@@ -1767,8 +1767,8 @@ EOL
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.sigaction -x c++ - -ldl"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaction -x c++ - -ldl"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.sigaction -x c++ - -ldl 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaction -x c++ - -ldl 2> /dev/null << EOL
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
void *addr;
|
void *addr;
|
||||||
int code;
|
int code;
|
||||||
@@ -1795,8 +1795,8 @@ EOL
|
|||||||
CFLAGS="$CFLAGS -DWITH_SIGACTION"
|
CFLAGS="$CFLAGS -DWITH_SIGACTION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl 2> /dev/null << EOL
|
||||||
#include <ucontext.h>
|
#include <ucontext.h>
|
||||||
int main() {
|
int main() {
|
||||||
ucontext_t context;
|
ucontext_t context;
|
||||||
@@ -1822,8 +1822,8 @@ EOL
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$os" = "MINGW" ]; then
|
if [ "$os" = "MINGW" ]; then
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS -o tmp.config.dbghelp -x c++ -"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.dbghelp -x c++ -"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS -o tmp.config.dbghelp -x c++ - 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.dbghelp -x c++ - 2> /dev/null << EOL
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <dbghelp.h>
|
#include <dbghelp.h>
|
||||||
int main() {
|
int main() {
|
||||||
@@ -1861,8 +1861,8 @@ EOL
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
|
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
|
||||||
log 2 "executing $cc_host $CFLAGS $LDFLAGS -o tmp.config.demangle -x c++ - -lstdc++"
|
log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.demangle -x c++ - -lstdc++"
|
||||||
"$cc_host" $CFLAGS $LDFLAGS -o tmp.config.demangle -x c++ - -lstdc++ 2> /dev/null << EOL
|
"$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.demangle -x c++ - -lstdc++ 2> /dev/null << EOL
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
int main() {
|
int main() {
|
||||||
int status = -1;
|
int status = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user