[PATCH] configure: use -Wp, -D_FORTIFY_SOURCE=0 instead of -D_FORTIFY_SOURCE=0

Anssi Hannula anssi.hannula at iki.fi
Fri Sep 28 10:49:17 CDT 2012

28.09.2012 18:14, Alexandre Julliard kirjoitti:
> Anssi Hannula <anssi.hannula at iki.fi> writes:
>> Some Linux distributions (at least Mageia) build packages with
>> -Wp,-D_FORTIFY_SOURCE=2 by default. There is a check in configure which
>> checks for enabled fortify and adds "-U_FORTIFY_SOURCE
>> -D_FORTIFY_SOURCE=0". Unfortunately, -Wp,-Dfoo are applied after -Dfoo,
>> so the added flags fail to override the fortify in the CFLAGS.
> I would say that's a distro bug. Defaulting to Fortify is already broken
> enough, but making it even harder to disable is stupid.  I don't think
> we want to get into that kind of arms race.

Well, the intention is probably not to make it harder to override.
Mageia uses the -Wp,x form simply because Mandriva and Fedora use that
as well (according to logs at http://koji.fedoraproject.org/ ), I'm not
sure if Fedora had some good reason to not use -D_FORTIFY_SOURCE=2

IMHO those three distros (esp. Fedora) using -Wp,x is enough
justification to add the "-Wp," prefixes to the existing fortify hack in
wine configure.ac.

However, I do understand and accept your position that it is not really
wine's job to override all the weird compilation flags the user might be
using. I wouldn't have sent the patch at all if the existing fortify
hack hadn't already been there in the configure script :)

For the record, Fedora already disables fortify for wine build, and
Mageia is currently rolling updated wine packages that have fortify
disabled. Mandriva seems to still be affected. No idea if there are more
distributions using -Wp,-D_FORTIFY_SOURCE=2 for package builds.

Anssi Hannula

More information about the wine-devel mailing list