summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNehal J Wani <nehaljw.kkd1@gmail.com>2017-12-31 12:52:33 (GMT)
committerDavid Goldblatt <davidtgoldblatt@gmail.com>2018-01-04 19:14:46 (GMT)
commit78a87e4a80e9bf379c0dc660374173ef394252f6 (patch)
tree7d9e8e62018fe9c3b38274f2f212a777ccb62cb5
parent433c2edabc5c03ae069ac652857c05c673807d0c (diff)
downloadjemalloc-78a87e4a80e9bf379c0dc660374173ef394252f6.zip
jemalloc-78a87e4a80e9bf379c0dc660374173ef394252f6.tar.gz
jemalloc-78a87e4a80e9bf379c0dc660374173ef394252f6.tar.bz2
Make sure JE_CXXFLAGS_ADD uses CPP compiler
All the invocations of AC_COMPILE_IFELSE inside JE_CXXFLAGS_ADD were running 'the compiler and compilation flags of the current language' which was always the C compiler and the CXXFLAGS were never being tested against a C++ compiler. This patch fixes this issue by temporarily changing the chosen compiler to C++ by pushing it over the stack and popping it immediately after the compilation check.
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9432dc6..231b6df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,7 @@ AC_MSG_CHECKING([whether compiler supports $1])
T_CONFIGURE_CXXFLAGS="${CONFIGURE_CXXFLAGS}"
JE_APPEND_VS(CONFIGURE_CXXFLAGS, $1)
JE_CONCAT_VVV(CXXFLAGS, CONFIGURE_CXXFLAGS, SPECIFIED_CXXFLAGS)
+AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
]], [[
@@ -87,6 +88,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
AC_MSG_RESULT([no])
[CONFIGURE_CXXFLAGS="${T_CONFIGURE_CXXFLAGS}"]
)
+AC_LANG_POP([C++])
JE_CONCAT_VVV(CXXFLAGS, CONFIGURE_CXXFLAGS, SPECIFIED_CXXFLAGS)
])