mirror of
https://github.com/Relintai/osxcross.git
synced 2025-04-11 17:32:38 +02:00
use -std=c++0x instead of -std=gnu++0x
as -std=gnu++0x seems to break compiling ld64 on some systems
This commit is contained in:
parent
4a685dbe73
commit
c57030bc98
3
build.sh
3
build.sh
@ -172,6 +172,9 @@ extract $CCTOOLS_TARBALL 1
|
||||
|
||||
pushd cctools*/cctools &>/dev/null
|
||||
pushd .. &>/dev/null
|
||||
if [ $LINKER_VERSION != "134.9" ]; then
|
||||
patch -p0 < $PATCH_DIR/cctools-f19cc13.patch
|
||||
fi
|
||||
if [ "$PLATFORM" == "Linux" ]; then
|
||||
patch -p0 < $PATCH_DIR/cctools-old-linux.patch
|
||||
fi
|
||||
|
25
patches/cctools-f19cc13.patch
Normal file
25
patches/cctools-f19cc13.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git cctools/configure.ac cctools/configure.ac
|
||||
index 8b59f6b..3411e34 100644
|
||||
--- cctools/configure.ac
|
||||
+++ cctools/configure.ac
|
||||
@@ -12,7 +12,7 @@ CXX=clang++
|
||||
|
||||
CFLAGS="$CFLAGS `cat tmp/cflags 2>/dev/null`"
|
||||
CFLAGS="$CFLAGS -isystem /usr/local/include -isystem /usr/pkg/include -O3"
|
||||
-CXXFLAGS="$CXXFLAGS -std=gnu++0x `cat tmp/cxxflags 2>/dev/null`"
|
||||
+CXXFLAGS="$CXXFLAGS -std=c++0x `cat tmp/cxxflags 2>/dev/null`"
|
||||
CXXFLAGS="$CXXFLAGS -isystem /usr/local/include -isystem /usr/pkg/include -O3"
|
||||
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib `cat tmp/ldflags 2>/dev/null`"
|
||||
diff --git cctools/ld64/src/ld/code-sign-blobs/memutils.h cctools/ld64/src/ld/code-sign-blobs/memutils.h
|
||||
index 8fa48d6..bcf1a23 100644
|
||||
--- cctools/ld64/src/ld/code-sign-blobs/memutils.h
|
||||
+++ cctools/ld64/src/ld/code-sign-blobs/memutils.h
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <algorithm>
|
||||
|
||||
+using namespace __gnu_cxx;
|
||||
|
||||
//
|
||||
// Encapsulate these very sharp tools in a separate (ugly-named) namespace
|
@ -98,7 +98,7 @@ function check_cxx_stdlib()
|
||||
{
|
||||
set +e
|
||||
|
||||
$CXX $CXXFLAGS -std=gnu++0x $BASE_DIR/tools/stdlib-test.cpp -S -o- \
|
||||
$CXX $CXXFLAGS -std=c++0x $BASE_DIR/tools/stdlib-test.cpp -S -o- \
|
||||
2>$BUILD_DIR/stdlib-test.log 1>/dev/null
|
||||
echo "$?"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user