mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-08 02:55:56 +01:00
get libstdc++ mutex header working with clang + -oc-use-gcc-libs + -mmacosx-version-min= < 10.7
This commit is contained in:
parent
115d200466
commit
1eac22f6da
13
build_gcc.sh
13
build_gcc.sh
@ -85,9 +85,16 @@ $MAKE -j$JOBS
|
||||
$MAKE install
|
||||
|
||||
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
|
||||
popd &>/dev/null
|
||||
|
||||
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 # build
|
||||
popd &>/dev/null # gcc
|
||||
|
@ -29,3 +29,27 @@
|
||||
+#endif
|
||||
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user