Your message dated Sat, 29 Aug 2015 00:16:26 +0200
with message-id <[email protected]>
has caused the   report #790102,
regarding subversion fails to build with -Wdate-time in CPPFLAGS
to be marked as having been forwarded to the upstream software
author(s) swig-devel <[email protected]>

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
790102: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790102
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Hello,

I was recently asked by the Debian reproducible builds team if SWIG
could be extended to support the -Wdate-time warning option.

Actually the suggestion was to ignore all unknown -Wwhatever flags that
are not known to SWIG - see the full text here:

https://bugs.debian.org/790102

> Hi subversion, unbound and swig maintainers,
> we in the Reproducible Builds effort use a non default dpkg which export
> -Wdate-time through dpkg-buildflags.
> 
> There are package that pass CPPFLAGS (for example) quite unchanged to swig.
> 
> Sadly swig does not recognize -Wdate-time and choke and fail on it badly, e.g.
> 
> /usr/bin/swig -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/python2.7 
> -I/usr/include/python2.7 -o pythonmod/interface.h -python 
> ./pythonmod/interface.i
> swig error : Unrecognized option -Wdate-time
> Use 'swig -help' for available options.
> Makefile:369: recipe for target 'pythonmod/interface.h' failed
> make[1]: *** [pythonmod/interface.h] Error 1
> 
> 
> Needless to say, I'd like to build those packages with such flag (that we also
> would like to get into the default set, see the bug #762683 for a start).
> 
> 
> Possible solutions i see for this:
> 
> a. swig stops failing so badly on unrecognized options. If you really want to
>    validate the options at least stop failing on unrecognized -W? Seems quite
>    logical to pass CPPFLAGS to swig to me, and as such sounds sane
> b. people stop passing CPPFLAGS to swig. I've already saw a "CPPFLAGS cleaner"
>    on subversion's configure script. Please I don't want to see another
> 
> 
> Even if I do have preference I don't have a strong opinion on this, so if you
> agree this is not a bug in swig (which I could even accept, given that the
> accepted flags are well documented), I'll just clone+reassign this bug around.

IMHO SWIG should not just ignore any unknown warning setting, at least
not without making a bit of noise on stderr. Even than I'd rather have a
tool understand all options that I passed. So just swallowing all -W
options appears a bit over the top to me.

And of course gcc is not the only compiler used in together with SWIG so
where would that stop? Here are the warning options supported by GCC and
Visual Studio CL compilers:

https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gcc/Warning-Options.html#Warning-Options
https://msdn.microsoft.com/en-us/library/vstudio/thxezb7y%28v=vs.100%29.aspx

Solution (b) would be better since we can not be sure that swig options
will not one day conflict with compiler options of the same name.

However, currently only -Wdate-time seems to pose a problem and swig
already accepts -Wall. Therefore I propose to make a pragmatic change to
allow -Wdate-time as well and postpone a discussion about handling of
random CPPFLAGS thrown at swig.

I just created a pull request which just adds -Wdate-time as an accepted
but ignored command line option:

https://github.com/swig/swig/pull/511

Greetings, Torsten

--- End Message ---

Reply via email to