From 59f5a220b7df093cd7a84c0683a82c3f6ba2bb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Fri, 25 Apr 2014 21:06:24 +0200 Subject: [PATCH] add some notes about the default deployment target to the README wrapper: never default to libc++ with gcc --- README.md | 15 ++++++++++++++- wrapper/compiler.cpp | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e5da43a..df2a6f1 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,8 @@ XX= the target version, you can find it out by running `osxcross-conf` and the You can use the shortcut `o32-...` or `i386-apple-darwin...` what ever you like more. -*I'll continue from now on with `o32-clang`, but remember, you can simply replace it with `o32-gcc` or `i386-apple-darwin...`.* +*I'll continue from now on with `o32-clang`, but remember, + you can simply replace it with `o32-gcc` or `i386-apple-darwin...`.* ##### Building Makefile based projects: ##### @@ -131,6 +132,18 @@ Usage Examples: * build the 64 bit binary: `o64-g++ test.cpp -O3 -o test.x86_64` * use lipo to generate the universal binary: `x86_64-apple darwinXX-lipo -create test.i386 test.x86_64 -output test` +### DEPLOYMENT TARGET: ### + +The default deployment target is `Mac OS X 10.5`. + +However, there are several ways to override the default value: + +1. by passing `OSX_VERSION_MIN=10.x` to `./build.sh` +2. by passing `-mmacosx-version-min=10.x` to the compiler +3. by setting the `MACOSX_DEPLOYMENT_TARGET` environment variable + +\>= 10.9 also defaults to `libc++` instead of `libstdc++`, this behavior +can be overriden by explicitly passing `-stdlib=libstdc++` to clang. ### LICENSE: #### * bash scripts: GPLv2 diff --git a/wrapper/compiler.cpp b/wrapper/compiler.cpp index 9d74888..51804e2 100644 --- a/wrapper/compiler.cpp +++ b/wrapper/compiler.cpp @@ -660,7 +660,8 @@ struct Target { if (!OSNum.Num()) OSNum = getSDKOSNum(); - return stdlib != libstdcxx && hasLibCXX() && OSNum >= OSVersion(10, 9); + return stdlib != libstdcxx && hasLibCXX() && !isGCC() && + OSNum >= OSVersion(10, 9); } bool isLibCXX() const {