From a4b4483884ad2b5f2815993e429c6d95d56d6dba Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Fri, 15 Jan 2021 18:31:43 +0100 Subject: macOS: fix Objective-C++ cross-compilation OBJCXXFLAGS are not being set correctly so Objective-C++ files were compiled with the build arch instead of the target one Part-of: --- config/darwin.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/darwin.config b/config/darwin.config index 6e8210bf..afc91166 100644 --- a/config/darwin.config +++ b/config/darwin.config @@ -53,7 +53,7 @@ min_osx_sdk_version = min_osx_sdk_version or '10.11' sdk='-mmacosx-version-min=%s -isysroot %s' % (min_osx_sdk_version, sdk_root) # Initialize all these so we can just do += later -for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS', 'CPPFLAGS', 'LDFLAGS']: +for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS', 'OBJCXXFLAGS', 'CPPFLAGS', 'LDFLAGS']: env[f] = env.get(f, '') arch_cflags = '' @@ -78,7 +78,7 @@ if not os.path.exists(incl_dir): os.makedirs(incl_dir) # Append to these flags if not already present -for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS']: +for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS', 'OBJCXXFLAGS']: if arch_cflags not in env[f]: env[f] += ' %s ' % arch_cflags incflag = '-I' + incl_dir -- cgit v1.2.3