Add -stdlib=libc++ to {CXX,LD}FLAGS and not CXX

This allows things work even if a non-default of CXX is specified on the
command line.
This commit is contained in:
Vadim Zeitlin
2016-01-27 03:41:16 +01:00
parent bef874a674
commit 96522491ad
2 changed files with 5 additions and 3 deletions

3
configure vendored
View File

@@ -20415,7 +20415,8 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
fi
if test "$HAVE_CXX11" = "1" ; then
CXX="$CXX -stdlib=libc++"
CXXFLAGS="$CXXFLAGS -stdlib=libc++"
LDFLAGS="$LDFLAGS -stdlib=libc++"
fi
if test "x$retest_macosx_linking" = "xyes"; then

View File

@@ -1233,8 +1233,9 @@ fi
if test "$HAVE_CXX11" = "1" ; then
dnl We also need to use libc++ standard library instead of libstdc++ for
dnl C++11 support.
CXX="$CXX -stdlib=libc++"
dnl C++11 support, both when compiling and when linking.
CXXFLAGS="$CXXFLAGS -stdlib=libc++"
LDFLAGS="$LDFLAGS -stdlib=libc++"
fi
dnl If either an SDK or a version option was added, make sure that we can