m4/nc_cxx: don't enable libcxx on clang by default
Some system libraries, like boost, may have linked against libstdc++ and hence make breaking assumptions about std structure layouts. eg, boost::filesystem::path and std::basic_string
This commit is contained in:
parent
8dc4abb69c
commit
7cc4173dea
12
m4/nc_cxx.m4
12
m4/nc_cxx.m4
@ -1,6 +1,4 @@
|
||||
AC_DEFUN([NC_CXX],[
|
||||
AC_REQUIRE([AX_COMPILER_VENDOR])
|
||||
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[-std=c++1z],
|
||||
[AX_APPEND_FLAG([-std=c++1z], [CXXFLAGS])],
|
||||
@ -16,11 +14,11 @@ AC_DEFUN([NC_CXX],[
|
||||
AC_C_RESTRICT
|
||||
AC_C_INLINE
|
||||
|
||||
AX_COMPILER_VENDOR
|
||||
AS_IF(
|
||||
[test "x$ax_cv_cxx_compiler_vendor" == "xclang"],
|
||||
[AX_APPEND_COMPILE_FLAGS([-stdlib=libc++])]
|
||||
)
|
||||
AC_ARG_ENABLE([libcxx], [AS_HELP_STRING([--enable-libcxx], [use clang's cxx library])])
|
||||
|
||||
AS_IF([test "x${enable_libcxx}" == "xyes"], [
|
||||
AX_APPEND_COMPILE_FLAGS([-stdlib=libc++])
|
||||
])
|
||||
|
||||
AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden], [], [-Werror])
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user