Source: hoichess Version: 0.22.0-3 Tags: patch upstream User: [email protected] Usertags: ftcbfs
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
--- hoichess-0.22.0.orig/book/Makefile +++ hoichess-0.22.0/book/Makefile @@ -45,5 +45,5 @@ $(HOST_HOICHESS): @# BUILDDIR is relative to src/! - $(MAKE) -C ../src CXX="$(HOST_CXX)" CXXFLAGS+="$(HOST_CXXFLAGS)" BUILDDIR="$(dir $@)" all-hoichess + $(MAKE) -C ../src CXX="$(HOST_CXX)" CXXFLAGS="$(HOST_CXXFLAGS)" BUILDDIR="$(dir $@)" all-hoichess

