Approval: can I commit this please?

Kean Johnston jkj@sco.com
Sun Apr 20 08:04:00 GMT 2003


> Yes, but are you sure that there's no non-GNU ld that doesn't
> understand -shared now?  That seems like a very hard thing to be sure
> about.  It might be better if your patch could try -shared and -g one
> after the other, or explicitly detect SCO ld, or something.
Hmmm. Well no, I cant be 100% sure. -G is pretty prevalent amongs non-
GNU link editors. Solaris, UnixWare, SCO ... almost any System V based
system. Id be surprised (a bit) if AIX didn't support it, maybe even
HP-UX. I don't have access to the latter so I cant be sure. Although
AIX 5L uses the same linker as UnixWare so it uses -G as well. The
interesting this is, those linkers wont actually report a failure if
you use -shared, because it sees it as a valid argument, it just doesn't
see it as an arugment to create shared libraries. Either way the test is
quite flawed. Its badly written because it really was assuming the
GNU linker, or specific linker arguments at best, and that's not a very
good autoconf test. My patch is a slight improvement, but only slight.
It now assumes either GNU or System-V-ish.

So if its OK I will remove that portion of the patch (still check for
GNU ld, that's useful knowledge) but keep the -shared for now until we
can figure out the right way to handle this. I suspect, that really this
needs to be a target macro, not something auto-detected. With that
removed
can the rest of it go in, modulo spelling corrections in the changelog
entry? Even with the right flag this test would still fail on SCO, so
it certainly wont harm that port.

Kean



More information about the Gcc-patches mailing list