[R-sig-Debian] Default CXXFLAGS
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Tue May 21 15:35:48 CEST 2024
On 21 May 2024 at 15:59, Ivan Krylov wrote:
| On Tue, 21 May 2024 14:48:48 +0200
| Kurt Hornik <Kurt.Hornik using wu.ac.at> wrote:
|
| > I guess foer the CXXFLAGS we want dpkg-buildflags --get CXXFLAGS?
Good catch, and expansion, by both of you.
| It must be the case. It's both the documented option [1] and it
| currently differs from CFLAGS in the offending flag:
|
| root using 93e09ba5b6fb:/# diff -u <(dpkg-buildflags --get CFLAGS | sed 's/ /\n/g') <(dpkg-buildflags --get CXXFLAGS | sed 's/ /\n/g')
| --- /dev/fd/63 2024-05-21 12:54:12.275778573 +0000
| +++ /dev/fd/62 2024-05-21 12:54:12.275778573 +0000
| @@ -1,6 +1,5 @@
| -g
| -O2
| --Werror=implicit-function-declaration
| -ffile-prefix-map=/=.
| -fstack-protector-strong
| -fstack-clash-protection
Differently put using a Docker invocation away from my Ubuntu host to a
Debian setting:
$ docker run --rm -ti rocker/r-base dpkg-buildflags | egrep '^(CXXFLAGS|CFLAGS)'
CFLAGS=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
CFLAGS_FOR_BUILD=-g -O2
CXXFLAGS=-g -O2 -ffile-prefix-map=/=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
CXXFLAGS_FOR_BUILD=-g -O2
$
So it looks like picking the CXXFLAGS will remove the unwanted -Werror=...
Thanks all -- I will make that change.
Dirk
PS Kurt, it would still be nice if you could let us 'sed-filter' or alike the defaults...
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-SIG-Debian
mailing list