On Tue, 26 Feb 2002, Andy Polyakov wrote:
> > Is there any reason why gcc -print-prog-name=collect2 is used for
> > detecting the linker instead of gcc -print-prog-name=ld? As far as I
> > know collect2 isn't actually used when linking c code. I've come
> > across a system where gcc -print-prog-name=ld points to the vendor
> > linker and gcc -print-prog-name=collect2 points to the gnu linker
> > which causes the build process to think gcc is using the gnu linker
> > where it in fatc is using the vendor one. This causes a shared library
> > build failure.
>
> How about "${CC} -Wl,-V -x c /dev/null 2>&1 | grep '^GNU ld'" for
> DETECT_GNU_LD? This should cover *all* possible situations. We don't
> even have to check if ${CC} is gcc as vendor compiler is unlikely to
> complain about unrecognized command-line option which "^GNU ld." Can you
> confirm if it works for you? Just replace the whole DETECT_GNU_LD
> multiline with the above line and rerun. A.
>
I'll try it when I get the time. Another problem I've found is that
when gcc isn't using the gnu linker it goes to the same rule as the
vendor compiler. The problem is that those rules use CC and gcc
doesn't necessarily use the same options to pass stuff through to the
linker. What I've done is to add something like
if [ "${CC}" = "gcc" ]; then \
CC=`${CC} -print-prog-name=ld`; \
else \
CC="${CC}"; \
fi
in places (obviously not perfect, gcc detection shouldn't just be a
string compare), which seems to work.
/Sam
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]