Skip to content

Instantly share code, notes, and snippets.

@nox
Last active August 29, 2015 13:57
Show Gist options
  • Save nox/9589142 to your computer and use it in GitHub Desktop.
Save nox/9589142 to your computer and use it in GitHub Desktop.
Patch for OCaml bug #0006346 http://caml.inria.fr/mantis/view.php?id=6346
diff --git a/configure b/configure
index d45e88f..25d872b 100755
--- a/configure
+++ b/configure
@@ -322,7 +322,14 @@ case "$bytecc,$target" in
bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
mathlib="";;
*,*-*-darwin*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ # On recent version of OSX, gcc is a symlink to clang
+ if $bytecc --version | grep -q clang; then
+ # -fno-defer-pop is not supported by clang, and make recent
+ # versions of clang to fail
+ bytecccompopts="$gcc_warnings"
+ else
+ bytecccompopts="-fno-defer-pop $gcc_warnings"
+ fi
mathlib=""
mkexe="$mkexe -Wl,-no_compact_unwind"
# Tell gcc that we can use 32-bit code addresses for threaded code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment