Hi,

Quoting Emanuele Rocca (2023-12-04 11:49:30)
> some compiler flags are architecture specific and should not leak when
> cross-building.
> 
> As an example, -fcf-protection is x86-specific, and the following fails:
> 
>  aarch64-linux-gnu-gcc-13 -fcf-protection
> 
> Similarly, -mbranch-protection=standard is aarch64-specific, and the
> following fails:
> 
>  x86_64-linux-gnu-gcc-13 -mbranch-protection=standard
> 
> With the attached patch lighttpd cleanly cross-builds from source.

note, that *_FOR_BUILD variables are new in dpkg 1.22.1.

You can get flags that work even before that by running:

CFLAGS_FOR_BUILD ?= $(shell dpkg-architecture --host-arch $(DEB_BUILD_ARCH) 
--force --command dpkg-buildflags --get CFLAGS)

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to