Web lists-archives.com

Re: Mandates explicit -std=c++XY for c++ projects


On Tue, Oct 10, 2017 at 9:11 AM, Ansgar Burchardt <ansgar@xxxxxxxxxx> wrote:
> Mathieu Malaterre writes:
>> With this mind I'd like to make mandatory the -std=c++XY flags when
>> compiling either a c++ library or a stand-alone c++ program:
>> 1. Either upstream define the explicit -std=c++XY flags by mean of its
>> build system,
>> 2. Or the package maintainers needs to explicit change the CXXFLAGS to
>> pass the appropriate version of the c++ standard. In which case this
>> should be documented in the README.Debian file.
>> 3. As a fallback, dh should initialize the CXXFLAGS with -std=gnu++98
> So if the upstream build system adds '-std=c++14' and CXXFLAGS is set to
> '-std=gnu++98', one gets '-std=c++14 -std=gnu++98' and building the
> package no longer works?  That doesn't sound good to me.
> Why should CXXFLAGS be documented in README.Debian?  (Or in fact
> anywhere outside of d/rules?)  They aren't interesting for users of the
> package.

Sorry missed that question. I simply based my comment based on:

* https://www.debian.org/doc/debian-policy/#libraries

Any exception to this rule should be discussed on the mailing list
debian-devel@xxxxxxxxxxxxxxxx, and the reasons for compiling with the
-fPIC flag must be recorded in the file README.Debian. [3]

Again I have no strong opinion on that. Having is set in the d/rules
is relatively clear. I just wanted to make it clear just like the
-fPIC flag.