From 96522491adfd5dff115606268ccbf30e77f69665 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 27 Jan 2016 03:41:16 +0100 Subject: [PATCH] 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. --- configure | 3 ++- configure.in | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure b/configure index deb702695b..1cc233dfa2 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.in b/configure.in index 0ac57f3fd7..8457112a47 100644 --- a/configure.in +++ b/configure.in @@ -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