On Thu, Jan 09, 2014 at 01:30:25PM +0100, Vincent Lefevre wrote: > On 2014-01-08 21:55:56 -0800, Ben Pfaff wrote: > > On Wed, Jan 08, 2014 at 09:44:20AM +0100, Vincent Lefevre wrote: > > > On 2014-01-07 21:30:29 -0800, Ben Pfaff wrote: > > > > On Fri, Jan 03, 2014 at 10:22:27PM +0100, Vincent Lefevre wrote: > > > > I suggest adding such flags after configure tests have been run, as > > > > with the --enable-Werror configure flag supported by Open vSwitch: > > > > > > > > dnl OVS_ENABLE_WERROR > > > > AC_DEFUN([OVS_ENABLE_WERROR], > > > > [AC_ARG_ENABLE( > > > > [Werror], > > > > [AC_HELP_STRING([--enable-Werror], [Add -Werror to CFLAGS])], > > > > [], [enable_Werror=no]) > > > > AC_CONFIG_COMMANDS_PRE( > > > > [if test "X$enable_Werror" = Xyes; then > > > > CFLAGS="$CFLAGS -Werror" > > > > fi])]) > > > > > > This doesn't solve the problem at all: whether -Werror is used via > > > --enable-Werror or via > > > > > > ./configure ... CFLAGS="... -Werror" > > > > > > the same errors will occur. > > > > No, configuration time errors will not occur with this macro, because > > this macro adds -Werror only after all of the configuration tests have > > already run. > > Some configure tests *must* be done with the same options as the > compilation, so that some features in the program or the tests can be > disabled (via the preprocessor) if they are not supported due to the > use of -Werror.
What's an example? > > > > I guess that -Werror=old-style-definition is somewhat more restricted, > > > > but a similar solution can be used. > > > > > > Actually I wasn't using -Werror=old-style-definition directly, but > > > > > > ./configure CFLAGS="-Wall -Wold-style-declaration -Wold-style-definition > > > -Wmissing-parameter-type -Wmissing-prototypes -Wmissing-declarations > > > -Wmissing-field-initializers -Werror" > > > > If you did the same thing but dropped -Werror from CFLAGS and added > > --enable-Werror, there would be no problem with configuration tests. > > But the build (of the software or the tests) could fail due to a > feature that should have been disabled by an error detected with > -Werror at configure time. I can't think of any example, can you please explain? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org