Skip to content

Commit

Permalink
Try to make 4.00.1 compile on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Aug 11, 2015
1 parent c9e5207 commit 8e62dc3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compilers/4.00.1/4.00.1/4.00.1.comp
@@ -1,6 +1,9 @@
opam-version: "1"
version: "4.00.1"
src: "http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.1.tar.gz"
patches: [
"https://raw.githubusercontent.com/ocaml/opam-repository/master/compilers/4.00.1/4.00.1/fix-clang-build-on-osx.diff"
]
make: [
"world"
"opt"
Expand Down
20 changes: 20 additions & 0 deletions compilers/4.00.1/4.00.1/fix-clang-build-on-osx.diff
@@ -0,0 +1,20 @@
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

0 comments on commit 8e62dc3

Please sign in to comment.