Skip to content

Add Apertis vendor to enable more build flags

Dylan Aïssi requested to merge proposed-updates/daissi/T10216 into apertis/v2025dev1

This profile inherits from the Debian profile, but adds two new build flags: -Wformat-overflow=2 -Wformat-truncation=2

Before this MR, default build flags on v2025dev1 are:

$ dpkg-buildflags 
ASFLAGS=
CFLAGS=-g -O2 -ffile-prefix-map=/home/user/Desktop/dpkg=. -fstack-protector-strong -Wformat -Werror=format-security
CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
CXXFLAGS=-g -O2 -ffile-prefix-map=/home/user/Desktop/dpkg=. -fstack-protector-strong -Wformat -Werror=format-security
DFLAGS=-frelease
FCFLAGS=-g -O2 -ffile-prefix-map=/home/user/Desktop/dpkg=. -fstack-protector-strong
FFLAGS=-g -O2 -ffile-prefix-map=/home/user/Desktop/dpkg=. -fstack-protector-strong
GCJFLAGS=-g -O2 -ffile-prefix-map=/home/user/Desktop/dpkg=. -fstack-protector-strong
LDFLAGS=-Wl,-z,relro
OBJCFLAGS=-g -O2 -ffile-prefix-map=/home/user/Desktop/dpkg=. -fstack-protector-strong -Wformat -Werror=format-security
OBJCXXFLAGS=-g -O2 -ffile-prefix-map=/home/user/Desktop/dpkg=. -fstack-protector-strong -Wformat -Werror=format-security

After this MR, we have:

$ dpkg-buildflags 
ASFLAGS=
CFLAGS=-g -O2 -ffile-prefix-map=/media/sf_Shared_Virtual=. -fstack-protector-strong -Wformat -Werror=format-security -Wformat-overflow=2 -Wformat-truncation=2
CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
CXXFLAGS=-g -O2 -ffile-prefix-map=/media/sf_Shared_Virtual=. -fstack-protector-strong -Wformat -Werror=format-security -Wformat-overflow=2 -Wformat-truncation=2
DFLAGS=-frelease
FCFLAGS=-g -O2 -ffile-prefix-map=/media/sf_Shared_Virtual=. -fstack-protector-strong
FFLAGS=-g -O2 -ffile-prefix-map=/media/sf_Shared_Virtual=. -fstack-protector-strong
GCJFLAGS=-g -O2 -ffile-prefix-map=/media/sf_Shared_Virtual=. -fstack-protector-strong
LDFLAGS=-Wl,-z,relro
OBJCFLAGS=-g -O2 -ffile-prefix-map=/media/sf_Shared_Virtual=. -fstack-protector-strong -Wformat -Werror=format-security -Wformat-overflow=2 -Wformat-truncation=2
OBJCXXFLAGS=-g -O2 -ffile-prefix-map=/media/sf_Shared_Virtual=. -fstack-protector-strong -Wformat -Werror=format-security -Wformat-overflow=2 -Wformat-truncation=2

I did a test build of liblc3, with the previous version of dpkg -Wformat-overflow=2 -Wformat-truncation=2 are not used whereas with this new version of dpkg these new flags are used.

cc @wlozano @sjoerd

Merge request reports