get libstdc++ mutex header working with clang + -oc-use-gcc-libs + -mmacosx-version-min= < 10.7

This commit is contained in:
Thomas Pöchtrager 2014-04-23 19:31:49 +02:00
parent 115d200466
commit 1eac22f6da
2 changed files with 34 additions and 3 deletions

View File

@ -85,8 +85,15 @@ $MAKE -j$JOBS
$MAKE install $MAKE install
GCC_VERSION=`echo $GCC_VERSION | tr '-' ' ' | awk '{print $1}'` GCC_VERSION=`echo $GCC_VERSION | tr '-' ' ' | awk '{print $1}'`
pushd $OSXCROSS_TARGET_DIR/x86_64-apple-$OSXCROSS_TARGET/include/c++/${GCC_VERSION}* &>/dev/null
patch -p0 -l < $OSXCROSS_TARGET_DIR/../patches/libstdcxx.patch &>/dev/null || true pushd $OSXCROSS_TARGET_DIR/x86_64-apple-$OSXCROSS_TARGET/include &>/dev/null
pushd c++/${GCC_VERSION}* &>/dev/null
cat $OSXCROSS_TARGET_DIR/../patches/libstdcxx.patch | \
sed "s/darwin13/$OSXCROSS_TARGET/g" | \
patch -p0 -l &>/dev/null || true
popd &>/dev/null
popd &>/dev/null popd &>/dev/null
popd &>/dev/null # build popd &>/dev/null # build

View File

@ -29,3 +29,27 @@
+#endif +#endif
#endif // _GLIBCXX_CSTDDEF #endif // _GLIBCXX_CSTDDEF
--- x86_64-apple-darwin13/bits/c++config.h
+++ x86_64-apple-darwin13/bits/c++config.h
@@ -913,7 +913,9 @@
#define _GLIBCXX_HAVE_TGMATH_H 1
/* Define to 1 if the target supports thread-local storage. */
+#if !defined(__clang__) || __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070
#define _GLIBCXX_HAVE_TLS 1
+#endif
/* Define to 1 if you have the <unistd.h> header file. */
#define _GLIBCXX_HAVE_UNISTD_H 1
--- x86_64-apple-darwin13/i386/bits/c++config.h
+++ x86_64-apple-darwin13/i386/bits/c++config.h
@@ -913,7 +913,9 @@
#define _GLIBCXX_HAVE_TGMATH_H 1
/* Define to 1 if the target supports thread-local storage. */
+#if !defined(__clang__) || __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070
#define _GLIBCXX_HAVE_TLS 1
+#endif
/* Define to 1 if you have the <unistd.h> header file. */
#define _GLIBCXX_HAVE_UNISTD_H 1