diff options
| author | Anil Madhavapeddy | 2014-03-16 22:41:33 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-17 12:04:07 +0000 |
| commit | 8b2f2175b35bda153541205b945cb41e21bdf727 (patch) | |
| tree | 2e1e22a7ee4646ac3642992c5f7b607c2ffa4a86 /Library/Formula | |
| parent | 4fe2a90957e91e39002e6aeb65bf2accf77f4036 (diff) | |
| download | homebrew-8b2f2175b35bda153541205b945cb41e21bdf727.tar.bz2 | |
objective-caml: fix clang; drop -fno-defer-pop.
Recent versions of clang fail with a hard error if -fno-defer-pop is
specified, and older versions warn. This patch fixes the OCaml
configure script to not pass this option as it hasn't been necessary
for decades.
See ocaml/opam#1242
Closes #27611.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/objective-caml.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Formula/objective-caml.rb b/Library/Formula/objective-caml.rb index 6e74c1759..3bb08640f 100644 --- a/Library/Formula/objective-caml.rb +++ b/Library/Formula/objective-caml.rb @@ -16,6 +16,14 @@ class ObjectiveCaml < Formula sha1 "8c5d442779abdb051ff40471871c5c6185b0bb84" => :lion end + # recent versions of clang fail with a hard error if -fno-defer-pop + # is specified, and older versions warn. This patch fixes the OCaml + # configure script to not pass this option on recent MacOS versions. + # See http://caml.inria.fr/mantis/view.php?id=6346 for upstream bug. + def patches + DATA + end + def install system "./configure", "--prefix", HOMEBREW_PREFIX, "--mandir", man, @@ -33,3 +41,24 @@ class ObjectiveCaml < Formula ln_s HOMEBREW_PREFIX/"lib/ocaml/site-lib", lib/"ocaml/site-lib" end end +__END__ +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 |
