#2933: LDFLAGS ignored by build system
---------------------------------+------------------------------------------
Reporter: duncan | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10 branch
Component: Build System | Version: 6.10.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Solaris
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by duncan):
Replying to [comment:1 simonmar]:
> I'm surprised if `--with-gmp-libraries` doesn't work - as far as I can
see it should, because we add those directories to the `library-dirs`
field of the RTS `package.conf`. Incedentally GMP should really have its
own package, which would then be a good place to put these options, along
with any -R options you also want to add.
Yes. It adds it to `include-dirs` and `library-dirs`. Those translate into
-I and -L, but for shared libs we also need -R if the dir is not on the
standard runtime linker path.
Similarly, `-R` is not used when linking stage2 so stage2 still does not
work without `LD_LIBRARY_PATH`.
As for `LDFLAGS`, I'd advocate improving `--with-gmp-libraries` first. It
is probably enough in most cases.
So the suggestion is that `--with-gmp-libraries` should add `ld-options:
-R${GMP_LIB_DIR}` as well. And it should be used for linking stage2.
I know some people think -R/-rpath is evil, though I'm never sure quite
why. If a library is not on the standard lib path then surely we need both
-L and -R?
So the `LDFLAGS` is just a backup plan in case people come and tell us
that -R is evil and should not be used by default.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2933#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs