gcc's (and others) -Werror

Robert Connolly robert at linuxfromscratch.org
Mon Oct 12 20:12:25 PDT 2009

libgomp's ./configure, and others, ignore --disable-werror and use -Werror in 
some ./configure tests.

-Wstack-protector and -D_FORTIFY_SOURCE=2 can cause warnings in some of 
these ./configure tests, causing them to fail when they really shouldn't. 
This would also affect any package that also uses -Werror this way.

I haven't looked into this, but it's something we should pay attention to in 
every package. Every package, including upgrades, should be checked 
for -Werror, and see if it causes any problems.

The failed ./configure test would usually cause the package to use its own 
version of a libc function, instead of the one in libc.

It might be an idea to have a shell script like:

tar xf package.tar.bz2
cd package
find . -type f | xargs grep -n -E 'Werror|mktemp|tmpnam'

When unpacking any package.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20091012/af70e2df/attachment.sig>

More information about the hlfs-dev mailing list