From 8dcf5aa622739838d6754f569174bdd8e89ee22d Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 26 Sep 2013 10:26:53 -0700 Subject: [PATCH] Avoid setting -stdlib=libc++ if cross compiling - refs mapnik/mapnik-support#96 --- SConstruct | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index f94286920..54ad20ad6 100644 --- a/SConstruct +++ b/SConstruct @@ -43,8 +43,6 @@ DEFAULT_CXX11_LINKFLAGS = "" if sys.platform == 'darwin': DEFAULT_CC = "clang" DEFAULT_CXX = "clang++" - DEFAULT_CXX11_CXXFLAGS += ' -stdlib=libc++' - DEFAULT_CXX11_LINKFLAGS = ' -stdlib=libc++' py3 = None @@ -1129,6 +1127,9 @@ if not preconfigured: env['LIBPATH'] = ['#src'] # set any custom cxxflags and ldflags to come first + if sys.platform == 'darwin' and not env['HOST']: + DEFAULT_CXX11_CXXFLAGS += ' -stdlib=libc++' + DEFAULT_CXX11_LINKFLAGS = ' -stdlib=libc++' env.Append(CPPDEFINES = env['CUSTOM_DEFINES']) env.Append(CUSTOM_CXXFLAGS = DEFAULT_CXX11_CXXFLAGS) env.Append(CXXFLAGS = env['CUSTOM_CXXFLAGS'])