[GHC] #7661: GHC build system does not detect opt-3.0 and friends
GHC
cvs-ghc at haskell.org
Thu Feb 14 14:33:13 CET 2013
#7661: GHC build system does not detect opt-3.0 and friends
---------------------------------+------------------------------------------
Reporter: singpolyma | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 7.7 | Resolution:
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Building GHC failed
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by kgardas):
* owner: dterei =>
* status: closed => new
* resolution: fixed =>
Comment:
Hi David,
unfortunately this is not working on my Ubuntu 12.04.2 LTS on pandaboard.
I do have both llc-3.0 and opt-3.0 in /usr/bin and in PATH:
{{{
$ which llc-3.0
/usr/bin/llc-3.0
$ which opt-3.0
/usr/bin/opt-3.0
}}}
but GHC's configure does not detect them. Configuring with simple
./configure ends with:
{{{
Configure completed successfully.
Building GHC version : 7.7.20130214
Build platform : arm-unknown-linux
Host platform : arm-unknown-linux
Target platform : arm-unknown-linux
Bootstrapping using : /usr/bin/ghc
which is version : 7.4.1
Using gcc : /usr/bin/gcc
which is version : 4.6.3
Building a cross compiler : NO
ld : /usr/bin/ld
Happy : /usr/bin/happy (1.18.9)
Alex : /usr/bin/alex (3.0.1)
Perl : /usr/bin/perl
dblatex :
xsltproc :
Using LLVM tools
llc :
opt :
HsColour was not found; documentation will not contain source links
}}}
and settings file looks:
{{{
$ cat settings
[("GCC extra via C opts", " -fwrapv"),
("C compiler command", "/usr/bin/gcc"),
("C compiler flags", " -fno-stack-protector -Wl,--hash-size=31 -Wl
,--reduce-memory-overheads"),
("ld command", "/usr/bin/ld"),
("ld flags", " --hash-size=31 --reduce-memory-overheads"),
("ld supports compact unwind", "YES"),
("ld supports build-id", "YES"),
("ld is GNU ld", "YES"),
("ar command", "/usr/bin/ar"),
("ar flags", "q"),
("ar supports at file", "YES"),
("touch command", "touch"),
("dllwrap command", "/bin/false"),
("windres command", "/bin/false"),
("perl command", "/usr/bin/perl"),
("target os", "OSLinux"),
("target arch", "ArchARM {armISA = ARMv7, armISAExt = [VFPv3,NEON],
armABI = HARD}"),
("target word size", "4"),
("target has GNU nonexec stack", "False"),
("target has .ident directive", "True"),
("target has subsections via symbols", "False"),
("Unregisterised", "NO"),
("LLVM llc command", "llc"),
("LLVM opt command", "opt")
]
}}}
There are two issues with this patch I'm able to see now.
1) in aclocal.m4 in FIND_LLVM_PROG you use
{{{
if test "$1" == ""; then
}}}
but this should be:
{{{
if test "$$1" == ""; then
}}}
to result in for example "$LLC" == "" instead of "LLC" == ""
2) Ubuntu (and Debian probably does the same), installs LLVM-3.0 package
into /usr/lib/llvm-3.0 directory and creates a links to opt/llc into
/usr/bin with the prefixes -3.0. That means:
{{{
$ ls -la /usr/bin/llc-3.0
lrwxrwxrwx 1 root root 23 Dec 11 2011 /usr/bin/llc-3.0 ->
../lib/llvm-3.0/bin/llc
}}}
The result is that your find test where you find for file will not work as
this is not a file, but link. You will also need to find for link (i.e.
-type l)
Both issues are fixed by attached patch.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7661#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list