autoconf
[Top][All Lists]
Advanced

[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: Wed, 22 Aug 2012 11:17:39 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Jeffrey Walton <address@hidden> writes:

> Here are the flags I am interested in. Again, the developers generally
> don't supply them ("it compiles, so ship it!"). I'm interested in
> warnings too because I need to see dumb, CompSci 101 mistakes such as
> ignoring return values, truncation problems, and conversion problems.
> When I find them, I need to fix them because developers don't care about
> these things ("it compiles, so ship it!")

> EXECUTABLE:
> -Wall -Wextra -Wconversion -fPIE -pie -Wno-unused-parameter -Wformat=2
> -Wformat-security -fstack-protector-all -Wstrict-overflow
> -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now

> SHARED OBJECT:
> -Wall -Wextra -Wconversion -fPIC -shared -Wno-unused-parameter
> -Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
> -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now

*If* the package uses libtool, which I realize is a big if, just pass
-fPIE in CFLAGS and don't worry about the difference.  Libtool is already
adding -fPIC -shared when building the shared objects, and is smart enough
to drop -fPIE from the shared objects as pointless.

-- 
Russ Allbery (address@hidden)             <http://www.eyrie.org/~eagle/>



reply via email to

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