Control: retitle -1 dpkg-buildflags: Please add support for D compiler flags Control: severity -1 wishlist Control: tags -1 moreinfo
On Thu, 2020-11-26 at 18:08:24 +0100, Sven Joachim wrote: > On 2020-11-26 12:19 +0100, Matthias Klose wrote: > > Package: dpkg-dev > > Version: 1.20.5 > > > > as seen in > > https://buildd.debian.org/status/fetch.php?pkg=dub&arch=amd64&ver=1.22.0-1& > > stamp=1596920730&raw=0 > > > > Running gdc... > > + gdc -Wall -obin/dub -fversion=DubUseCurl -Isource > > -Wl,--push-state,--no-as-needed -lcurl -lz -Wl,--pop-state -g -O2 > > -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat > > -Werror=format-security -Wl,-z,relro @build-files.txt > > d21: warning: command-line option ‘-Wformat=1’ is valid for > > C/C++/ObjC/ObjC++ > > but not for D > > d21: warning: ‘-Werror=’ argument ‘-Werror=format-security’ is not valid > > for D > > + set +x > > > > Please don't pass these flags in dpkg-buildflags. > > They are passed as part of CFLAGS. If that is not suitable for D, I > think dub should not pass $CFLAGS to gdc, which it currently does. Right, and it's not just dub, it's most of the packages in D where their build systems pass CPPFLAGS and CFLAGS to the compiler/linker invocation, in addition to DFLAGS. I can add DFLAGS support at least to refactor the -fdebug/-frelease options, but even that will not fix the unknown options warnings as long as all those build systems are not modified. meson for example simply filters unknown options, understanding that those might be coming from pkg-config and similar. Thanks, Guillem