[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [autoconf] Problems Configuring (C Compiler cannot produce executabl

From: Russ Allbery
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce executables)
Date: Tue, 21 Aug 2012 22:10:13 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Jeffrey Walton <address@hidden> writes:

> I think the solution is to update Make so that there are separate
> LD_EXE_FLAGS and LD_SO_FLAGS. But that was rejected too...

Yeah, I understand both the reason why the idea was rejected and the
reason why it's appealing.

Autoconf isn't the place to look for new flags to pass only to shared
library links (which I think would be the right way to go about that), but
the Automake folks might be interested in talking that over.  I've run
into a few places where I'd like to do that as well (for example,

Currently, the way this works in the Automake world is that the shared
library builds are done via Libtool, which adds the appropriate additional
flags for shared libraries on the local platform.  This generally works
quite well, but so far as I know there isn't a good way to do that
globally across the project.  You can set individual flags for specific
libraries with the _LDFLAGS setting in Automake, but that's for the
developer (since it requires modifying, not for the person
doing the compile.

This would be something that would need to be added to Automake, at least
as I understand it.

In any event, I don't think passing -Wl,-shared into a configure script is
ever going to make sense unless I'm missing some subtlety.  That flag is
specifically for creating shared libraries, and if the package is already
building a shared library, it's (necessarily) already going to add that
flag in exactly the places where it's appropriate.

Note that it is safe to pass -fPIE globally via CFLAGS even if shared
libraries (which must use -fPIC instead of -fPIE) are in play provided
Libtool is in use, since Libtool is smart enough to not pass -fPIE into
shared library builds.

Russ Allbery (address@hidden)             <>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]