From ca163038711f27bd50c8defd7e61f6b27dda935c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 10 May 2013 14:16:58 -0700 Subject: [PATCH] use -fpermissive on OS X when g++ is used - closes #1835 --- SConstruct | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index a25eb8daf..5eeed2f11 100644 --- a/SConstruct +++ b/SConstruct @@ -1089,7 +1089,7 @@ if not preconfigured: SOLARIS = env['PLATFORM'] == 'SunOS' env['SUNCC'] = SOLARIS and env['CXX'].startswith('CC') - # If the Sun Studio C++ compiler (`CC`) is used instead of GCC. + # If the Sun Studio C++ compiler (`CC`) is used instead of gcc. if env['SUNCC']: env['CC'] = 'cc' # To be compatible w/Boost everything needs to be compiled @@ -1596,8 +1596,14 @@ if not preconfigured: env.Append(CPPDEFINES = ndebug_defines) if not env['SUNCC']: - # Common flags for GCC. + + # Common flags for CXX compiler. common_cxx_flags = '-ansi -Wall %s %s -ftemplate-depth-300 ' % (env['WARNING_CXXFLAGS'], pthread) + + # https://github.com/mapnik/mapnik/issues/1835 + if sys.platform == 'darwin' and 'g++' in env['CXX']: + common_cxx_flags += '-fpermissive ' + if env['DEBUG']: env.Append(CXXFLAGS = common_cxx_flags + '-O0 -fno-inline') else: