Re: [arch-dev-public] Build issues due to -D_FORTIFY_SOURCE=2 in CPPFLAGS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [arch-dev-public] Build issues due to -D_FORTIFY_SOURCE=2 in CPPFLAGS

Joakim Hernberg
On Mon, 08 Apr 2013 16:54:54 +1000
Allan McRae <[hidden email]> wrote:

> Hi,
>
> With pacman-4.1 we introduced CPPFLAGS in makepkg.conf and moved the
> -D_FORTIFY_SOURCE=2 flag out of C{,XX}FLAGS to there (where it should
> be).

This of course will break wine's builtin workaround for FORTIFY_SOURCE,
which assumed that it was in CFLAGS.  Maybe no matter as for some
reason it wasn't working on archlinux in any case.

It produces the following (snipped from the gcc output)
-D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0, which for
some reason seems to produce broken code.

--

   Joakim
Reply | Threaded
Open this post in threaded view
|

Re: [arch-dev-public] Build issues due to -D_FORTIFY_SOURCE=2 in CPPFLAGS

Anatol Pomozov
Hi

On Wed, Apr 10, 2013 at 11:07 AM, Joakim Hernberg <[hidden email]> wrote:

> On Mon, 08 Apr 2013 16:54:54 +1000
> Allan McRae <[hidden email]> wrote:
>
>> Hi,
>>
>> With pacman-4.1 we introduced CPPFLAGS in makepkg.conf and moved the
>> -D_FORTIFY_SOURCE=2 flag out of C{,XX}FLAGS to there (where it should
>> be).
>
> This of course will break wine's builtin workaround for FORTIFY_SOURCE,
> which assumed that it was in CFLAGS.  Maybe no matter as for some
> reason it wasn't working on archlinux in any case.
>
> It produces the following (snipped from the gcc output)
> -D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0, which for
> some reason seems to produce broken code.

This also breaks 'crash' AUR package. I workaround' the issue by
'unset CPPFLAGS' before building the package

https://aur.archlinux.org/packages/crash/
https://gist.github.com/anatol/5326430