#1120103 hoichess FTCBFS: passes host flags to the build compiler

Package:
src:hoichess
Source:
src:hoichess
Submitter:
Helmut Grohne
Date:
2025-11-05 11:05:03 UTC
Severity:
normal
Tags:
#1120103#5
Date:
2025-10-28 08:32:43 UTC
From:
To:
hoichess fails to cross build from source for some combinations of
architectures, because it passes host compiler flags to the build
compiler. This is a bit non-obvious. hoichess is generally well-equipped
for cross building and has special provisions in book/Makefile to
support it. Specifically, it recursively calls itself with a replaced
compiler to build tools to be run during buil. It terms these
"build/host/", which may cause confusion with the GNU terminology used
by Debian. In doing so, it appens the flags for the native compiler
rather than replacing them. When cross building for e.g. arm64, flags
such as -mbranch-protection=standard are thus kept and the native
compiler fails to understand them. I'm attaching a patch to turn the
appending into replacement and that fixes the cross build.

Helmut