gcc 4.8.2 -> 4.9.0

add a patch to make -oc-use-gcc-libs more friendly to use
This commit is contained in:
Thomas Pöchtrager 2014-04-22 21:17:15 +02:00
parent 9b642c3931
commit 8b7886350a
2 changed files with 39 additions and 2 deletions

View File

@ -11,11 +11,11 @@ source tools/tools.sh
# GCC version to build
# (<4.7 will not work properly with libc++)
GCC_VERSION=4.8.2
GCC_VERSION=4.9.0
#GCC_VERSION=4.9-20140416 # snapshot
# GCC mirror
GCC_MIRROR="ftp://ftp.gwdg.de/pub/misc/gcc"
GCC_MIRROR="ftp://ftp.fu-berlin.de/unix/languages/gcc"
require wget
@ -82,8 +82,14 @@ fi
$EXTRACONFFLAGS
$MAKE -j$JOBS
$MAKE install -j$JOBS || \
$MAKE install -j$JOBS
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
popd &>/dev/null # build
popd &>/dev/null # gcc

31
patches/libstdcxx.patch Normal file
View File

@ -0,0 +1,31 @@
--- bits/random.h
+++ bits/random.h
@@ -101,10 +101,12 @@
{ typedef unsigned long long type; };
#ifdef _GLIBCXX_USE_INT128
+#ifndef __clang__
template<int __s>
struct _Select_uint_least_t<__s, 1>
{ typedef unsigned __int128 type; };
#endif
+#endif
// Assume a != 0, a < m, c < m, x < m.
template<typename _Tp, _Tp __m, _Tp __a, _Tp __c,
--- cstddef
+++ cstddef
@@ -45,11 +45,13 @@
#include <stddef.h>
#if __cplusplus >= 201103L
+#ifndef __clang__
namespace std
{
// We handle size_t, ptrdiff_t, and nullptr_t in c++config.h.
using ::max_align_t;
}
#endif
+#endif
#endif // _GLIBCXX_CSTDDEF