automake
[Top][All Lists]
Advanced

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

Re: Cannot Create Executables (configure and -fPIC/-pic)


From: Robert Boehne
Subject: Re: Cannot Create Executables (configure and -fPIC/-pic)
Date: Tue, 21 Aug 2012 17:11:15 -0500
User-agent: Mozilla/5.0 (X11; SunOS i86pc; rv:14.0) Gecko/20120714 Thunderbird/14.0

Jeffrey,

If you look at config.log it will show you the test program that it was attempting
to compile, and what errors that attempt generated.  It seems like your
compiler doesn't like "-fPIC -pic" and it has little to do with autotools.

HTH,

Robert

On 08/21/12 17:06, Jeffrey Walton wrote:
Hi All,

When I try and run configure with -fPIC -pic (as opposed to -fPIE
-pie), I receive "C compiler cannot create executables".

./configure CFLAGS="-Wall -Wextra -Wconversion -fPIC -pic
-Wno-unused-parameter -Wformat=2 -Wformat-security
-fstack-protector-all -Wstrict-overflow -Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
configure: error: C compiler cannot create executables
See `config.log' for more details

Because LDFLAGS cannot distinguish between executables and shared
objects, I was told to use -fPIC -pic: "using -fPIC instead of -fPIE
is always ok" [1].

Any ideas how to get automake and friends to build ASLR enabled
executables and shared objects in this manner?

Thanks in advance
Jeff

[1] Request: Add -aslr switch that invokes -fPIE/-pie or -fPIC/-shared
as appropriate, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52885




reply via email to

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