fre 2021-01-15 klockan 09:55 +0100 skrev Bruno Haible: > It is an interesting idea. Leaving the question aside how it is > implemented > (through an AC_SUBSTed variable or what else), the main question is: > Would > some GNU package maintainers want this? > > I always thought that GNU package maintainers want their entire > package to > be compiled with the same CFLAGS and CPPFLAGS. Would compiling the > gnulib > part with options for fewer warnings be OK with you? > > Paul, Pádraig, Jim, Paul, Akim, Simon, all: what's your opinion?
In general I think different code need different flags. Some things I consider a no-no in my own code is not something I would enforce on gnulib code, and vice versa. 1) It is already possible to do this, just write a local Makefile.am and use gnulib-tool --makefile-name=gnulib.mk and do local compile flag changes. I do this sometime to disable -Werror for gnulib but I want the -Werror flag to be enabled for my own code. 2) Sometimes building gnulib with the package flags results in improvements to gnulib that I wouldn't otherwise notice. I recall lots of fixes to gnulib originating this way. 3) Sometimes building gnulib with the package flag causes problems, in the past this happened with -Werror and I've stopped using -Werror by default (I think) because gnulib's code tends to be more fragile when it comes to compiler-specific detailed warnings than some of my own code. 4) I'd like separate --enable-silent-rule settings for gnulib and my own code. When developing from git, I really don't want to see all of gnulib's output but I would like to see the project's own output. This is probably possible to achieve using a gnulib.mk approach. Having native support for --enable-silent-gnulib-rules or support for 'make V=2' would be useful. /Simon
signature.asc
Description: This is a digitally signed message part