The build of syslinux 3:6.04~git20190206.bf6db5b4+dfsg1-3ubuntu1 targeting amd64 is failing with the following error:
gcc -MT bios.o -MD -MF ./.bios.o.d -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/syslinux-3:6.04~git20190206.bf6db5b4+dfsg1-3ubuntu1 -m32 -march=i386 -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -ffreestanding -fno-stack-protector -fwrapv -freg-struct-return -Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 -msoft-float -fno-exceptions -fno-asynchronous-unwind-tables -fno-strict-aliasing -falign-functions=0 -falign-jumps=0 -falign-labels=0 -falign-loops=0 -fvisibility=hidden -g -W -Wall -Wstrict-prototypes -Wno-sign-compare -fcommon -I/<<PKGBUILDDIR>>/core/include -I/<<PKGBUILDDIR>>/com32/include -I/<<PKGBUILDDIR>>/com32/include/sys -I/<<PKGBUILDDIR>>/com32/lib -I/<<PKGBUILDDIR>>/core/lwip/src/include -I/<<PKGBUILDDIR>>/core/lwip/src/include/ipv4 -I/<<PKGBUILDDIR>>/core/fs/pxe -D__SYSLINUX_CORE__ -D__FIRMWARE_BIOS__ -I/<<PKGBUILDDIR>>/bios -DLDLINUX=\"ldlinux.c32\" -c -o bios.o /<<PKGBUILDDIR>>/core/bios.c
cc1: error: ‘-fcf-protection’ is not compatible with this target
make[5]: *** [/<<PKGBUILDDIR>>/mk/embedded.mk:66: bios.o] Error 1
I compared with the most recent (2021-06-13) buildlog from the debian pkg here https:/ /buildd. debian. org/status/ fetch.php? pkg=syslinux& arch=amd64& ver=3%3A6. 04~git20190206. bf6db5b4% 2Bdfsg1- 3%2Bb1& stamp=162359245 1&raw=0 and the -fcf-protection flag is not present.
I will try to determine when it was added and why it is not compatible.
Found this similar bug https:/ /bugs.launchpad .net/ubuntu/ +source/ gcc-11/ +bug/1940029
The error message maybe misleading, because this flag is supposed to be compatible with the i386 arch (as per this doc https:/ /wiki.ubuntu. com/ToolChain/ CompilerFlags# A-fcf-protectio n).