Boost logo

Boost-Build :

From: Christopher Currie (Christopher_at_[hidden])
Date: 2003-11-06 21:58:33

It is rumored that Andre Hentz uttered the following:
> The patch is attached along with a log message. In short, solaris LD needs
> -h.

Thanks for posting this, it's been on my TODO list as well.

> On a related issue, GNU uses -rpath while solaris uses -R; solaris
> doesn't take -rpath and GNU has another meaning for -R. Thoughts?

It gets worse. GCC on Sun can be built to use either linker, so if the
above were strictly true, we'd need some way of knowing which linker was
being used. I've toyed with the idea of adding another variable to the
"using gcc" rule to support specifying the linker, but I'm not sure it's
the the best solution.

Fortunately, GNU ld is a little smarter than I thought. The current
documentation says:

"For compatibility with other ELF linkers, if the -R option is followed
by a directory name, rather than a file name, it is treated as the
-rpath option."

This is true for the most recent version of binutils; I've no idea when
they implemented it, though. It depends on how important it is for us to
support earlier versions. If it is important, we'll need to implement
some sort of linker detection/specification.

Otherwise, on Solaris at least, the right thing to do is just have gcc
use -Wl,-R,path and it should work with either linker. Whether this is
true of other gcc supported platforms remains to be seen.




Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at