ghc-pkg -g fails on Solaris
Axel Simon
A.Simon at kent.ac.uk
Wed Jan 19 10:46:00 EST 2005
On 18 Jan 2005, at 15:12, Duncan Coutts wrote:
> Hi,
>
> On all Unix platforms except Darwin, ghc-pkg calls:
> ld -r -x -o HSfoo.o --whole-archive libHSfoo.a
>
> See:
> ghc/utils/ghc-pkg/Main.hs, function autoBuildGHCiLib
>
> This works for the GNU linker. For the Solaris linker (which takes the
> name "ld", GNU ld gets "gld" if it's installed) this does not work.
>
> The Solaris linker does not understand the -x or --whole-archive flags.
I built GHC by setting some funny autoconf variables to the GNU
versions of the linker and the archiver. However, the real bug, IMHO,
is that ghc-pkg uses "ld" in the current search path instead of the one
ghc was configured with. GNU ld has the nice side effect that it is
much faster than Sun's ld. The only way seems to build the ghci library
by hand.
Axel.
More information about the Glasgow-haskell-bugs
mailing list