Skip to content

Instantly share code, notes, and snippets.

View tpoechtrager's full-sized avatar

Thomas Pöchtrager tpoechtrager

View GitHub Profile
diff --git a/build.sh b/build.sh
index a547bfe..ec09f05 100755
--- a/build.sh
+++ b/build.sh
@@ -191,6 +191,9 @@ popd &>/dev/null
patch -p0 < $PATCH_DIR/cctools-ld64-1.patch
patch -p0 < $PATCH_DIR/cctools-ld64-2.patch
echo ""
+which autogen
+which automake
diff --git a/wrapper/compiler.cpp b/wrapper/compiler.cpp
index 41b74d7..10ddee3 100644
--- a/wrapper/compiler.cpp
+++ b/wrapper/compiler.cpp
@@ -781,8 +781,8 @@ struct Target {
"c++1y", "gnu++1y", "c++14", "gnu++14",
"c++1z", "gnu++1z" };
- for (auto std : STD) {
- if (!strcmp(langstd, std))
@tpoechtrager
tpoechtrager / gist:9693081
Created March 21, 2014 18:44
10.6 SDK fix
diff --git a/oclang/oclang b/oclang/oclang
index 9cd0e8b..f07b202 100755
--- a/oclang/oclang
+++ b/oclang/oclang
@@ -115,6 +115,8 @@ if [ $USE_LIBCXX -ne 0 ]; then
fi
else
CXXINC="-cxx-isystem $OSXCROSS_SDK/usr/lib/gcc/i686-apple-$OSXCROSS_TARGET/4.2.1/include"
+ CXXINC="$CXXINC -cxx-isystem $OSXCROSS_SDK/usr/include/c++/4.2.1 "
+ CXXINC="$CXXINC -cxx-isystem $OSXCROSS_SDK/usr/include/c++/4.2.1/$ARCH2-apple-$OSXCROSS_TARGET "
thomas@thomas-pc:~/tmp$ w64-clang++ x.cpp -static-libgcc -Wall -Wextra -Wpedantic -O0 && ./a.out
-0.00 -1.10 80002.00 -0.50
thomas@thomas-pc:~/tmp$ w64-clang++ x.cpp -static-libgcc -Wall -Wextra -Wpedantic -O3 && ./a.out
-4.00 -2.70 80002.00 -0.50
thomas@thomas-pc:~/tmp$ cat x.cpp
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
float whscale = 2.0f;
@tpoechtrager
tpoechtrager / gist:8194248
Created December 31, 2013 08:58
append '-g0' only if '-gX' is explicitly given
diff --git a/oclang/oclang b/oclang/oclang
index e906814..59cdc96 100755
--- a/oclang/oclang
+++ b/oclang/oclang
@@ -32,6 +32,8 @@ else
USE_LIBCXX=0
fi
+PREVENT_DSYMUTIL_FROM_BEING_RUN=""
+