icarus-verilog: fix build error by specifying LD
Icarus-verilog-0.9.5 crashes clang or llvm into an assertion error when either of those two binaries is used as the linker. Add a command to set `ENV['LD']`. It also works for XCode-only. Remove both the fails_with because it works now. Add a separate line to `make installdirs` that fixes a build error where a directory does not exist. Tested on ML with XCode-4.4.1 using clang and llvm. Fixes Homebrew/homebrew#13650 Closes Homebrew/homebrew#14138. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
a40fc07bc7
commit
58c93198dd
1 changed files with 5 additions and 21 deletions
|
@ -10,29 +10,13 @@ class IcarusVerilog < Formula
|
|||
sha1 '313ab0f5dc4d198bd4687daaf2e54749c67558b3'
|
||||
end
|
||||
|
||||
# Yes indeed, this software fails to compile out of the box with both
|
||||
# LLVM and Clang.
|
||||
|
||||
fails_with :llvm do
|
||||
build '2336'
|
||||
cause <<-EOS.undent
|
||||
ld: warning: unexpected dylib (/usr/lib/libSystem.dylib) on link line
|
||||
Assertion failed: (_machoSection != 0), function machoSection, file /SourceCache/ld64/ld64-128.2/src/ld/ld.hpp, line 565.
|
||||
EOS
|
||||
end
|
||||
|
||||
fails_with :clang do
|
||||
build '318'
|
||||
cause <<-EOS.undent
|
||||
ld: warning: unexpected dylib (/usr/lib/libSystem.dylib) on link line
|
||||
Assertion failed: (_machoSection != 0), function machoSection, file /SourceCache/ld64/ld64-128.2/src/ld/ld.hpp, line 565.
|
||||
EOS
|
||||
end
|
||||
|
||||
def install
|
||||
# Fixes an assertion when XCode-4.4 tries to link with clang or llvm-gcc.
|
||||
ENV['LD'] = MacOS.locate("ld")
|
||||
system "./configure", "--prefix=#{prefix}"
|
||||
system "make"
|
||||
# Separate steps, as install does not depend on compile properly
|
||||
system "make install"
|
||||
system 'make'
|
||||
system 'make installdirs'
|
||||
system 'make install'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue