1 From 28f0c20302e5c64712899848cae3d0a48a9dc952 Mon Sep 17 00:00:00 2001
2 From: Vlad Zakharov <vzakhar@synopsys.com>
3 Date: Wed, 10 Aug 2016 18:02:59 +0300
4 Subject: [PATCH] configure: Add $CXXFLAGS for test compilations
6 Why we are passing only linker flags when compiling test code?
7 Loosing compiler flags leads to errors.
9 Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
11 configure | 8 ++++----
12 1 file changed, 4 insertions(+), 4 deletions(-)
14 diff --git a/configure b/configure
15 index 0d90a4f..618fe78 100755
18 @@ -63,9 +63,9 @@ cc_check() {
20 cat "$TMPC" >> "$TMPLOG"
22 - echo "$CXX $TMPC $LDFLAGS -o $TMPO$EXEEXT $@" >> "$TMPLOG"
23 + echo "$CXX $TMPC $CXXFLAGS $LDFLAGS -o $TMPO$EXEEXT $@" >> "$TMPLOG"
25 - ( $CXX "$TMPC" $LDFLAGS -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
26 + ( $CXX "$TMPC" $CXXFLAGS $LDFLAGS -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
30 @@ -107,9 +107,9 @@ EOF
32 if test -n "$_host"; then
33 # In cross-compiling mode, we cannot run the result
34 - eval "$1 $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
35 + eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
37 - eval "$1 $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
38 + eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp