[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2"
From: |
Zack Weinberg |
Subject: |
Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2" |
Date: |
Thu, 9 May 2013 11:24:27 -0400 |
On Wed, May 8, 2013 at 11:19 PM, Allan McRae <address@hidden> wrote:
>
> So there are multiple options of how to fix this. This simple "fixes"
> are patching glibc and gcc, but these run against my distributions
> patching policy. Also, adding -O2 to CPPFLAGS or moving
> -D_FORTIFY_SOURCE to CFALGS just does not seem correct either - CFLAGS
> and CPPFLAGS are separate for a reason.
In this case, I really do think the correct fix is to move
-D_FORTIFY_SOURCE to CFLAGS/CXXFLAGS. It is *semantically* a compiler
option (turn on fortification); that it happens to have the form of a
command-line #define which changes the contents of the system headers
is an implementation detail.
It also has the advantage of being a fix which you can implement
entirely in your build framework, and which does not require you to
regenerate hundreds if not thousands of configure scripts with a
patched autoconf.
(That said, I've never been clear myself on why CFLAGS and CPPFLAGS
*are* separate, except possibly the now-long-obsolete historical
reason that some traditional preprocessors didn't accept arbitrary
compiler options.)
zw
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", (continued)
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Ralf Corsepius, 2013/05/08
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Anatol Pomozov, 2013/05/08
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Paul Eggert, 2013/05/08
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Allan McRae, 2013/05/08
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Eric Blake, 2013/05/08
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Allan McRae, 2013/05/09
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Paul Eggert, 2013/05/08
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2",
Zack Weinberg <=
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Paul Eggert, 2013/05/09
- Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Mike Frysinger, 2013/05/09
Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2", Mike Frysinger, 2013/05/08