an installation bug in either gcc, gld, or readline -- I don't know which

Phil Edwards pedwards@disaster.jaj.com
Wed Dec 26 15:42:00 GMT 2001


On Wed, Dec 26, 2001 at 05:22:25PM -0500, Andrew Koenig wrote:
> Phil> This might be readline assuming that, because you're on a
> Phil> Solaris system, that Solaris' ld is being used.  Clearly you're
> Phil> using GNU's ld.  (Which is usually a smart thing to do on
> Phil> Solaris.)  The compiler knows this, but the readline makefile
> Phil> wouldn't.
> 
> Ah, that's interesting.  So I guess I could try changing my PATH to put
> /bin/ld ahead of /usr/gnu/bin/ld when installing readline and see what happens.

My guess would be:  Bad Things.

The -shared option, among others, /is/ translated by the compiler driver into
linker-specific options.  One of the most common bug reports we get occurs
when Solaris users configure GCC to use {Sun,GNU} linkers and assemblers,
but at runtime "the other one" is actually found.

Also the driver will of course emit all kinds of command-line options itself,
not based on -shared or anything else passed to the driver.  If you give
-v to the driver, you can see for yourself how the linker is being called.


Ideally, readline and suchlike need to ask GCC "hey, what linker are you
using?" and GCC needs to answer in a portable way.  Right now this isn't
possible at either end.  Hmmm...

I think I ended up installing two copies of GCC on my Solaris boxes:
the default uses GNU backend tools, and for those packages which care,
another copy uses only Sun tools.


> Phil> P.S.- As an aside, I see that you yourself took the cover photo for
> Phil> Accelerated C++.  Might I ask where that photo was taken?
> 
> It's a mountain pass in Norway named Trollstigveien.  It is even more
> astonishing in person than in the photo.

Thanks!  (Boy, our guess was so wrong...)


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Gcc-bugs mailing list