This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


Paul Eggert wrote:
"Richard Guenther" <richard.guenther@gmail.com> writes:

Authors of the affected programs should adjust their makefiles

That is what the proposed patch is for. It gives a way for developers to adjust their makefiles.

A developer of portable software cannot simply put something
like this into a makefile:

CFLAGS = -g -O2 -fwrapv

as -fwrapv won't work with most other compilers.  So the
developer needs some Autoconfish help anyway, to address the
problem.  The proposed help is only rudimentary, but it does
adjust makefiles to address the issue, and it's better than
nothing.  Further improvements would of course be welcome.

So rather than changing the default to -fwrapv for all programs, which I would find most unwelcome, how about adding a macro
AC_THIS_PROGRAM_IS_BROKEN_AND_THE_MAINTAINER_DOESNT_CARE
which could add -fwrapv and maybe -fno-strict-aliasing if the compiler supports them? Then anyone who knows their program is affected, or is just worried that it might be, could add that macro to their configure.in.



Bernd



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]