#1152368 libqalculate FTCBFS: passes host flags to the build compiler

#1152368#5
Date:
2026-10-28 15:14:53 UTC
From:
To:
libqalculate fails to cross build from source for amd64 and arm64,
because it passes host architecture compiler flags to the build compiler
and those two architectures have architecture-specific compiler flags.
Simply removing the *_FOR_BUILD overrides fixes the cross build as
dpkg-buildflags initializes them in a suitable way. I'm attaching a
patch for your convenience.

I tracked down why they were added to
https://salsa.debian.org/debian/libqalculate/-/commit/098ab41f63b420590b1fd701d16d58c7ff0ec29c
and it mentions blhc as a cause. This is an instance where blhc is
wrong. While it is important to include compiler flags, this is a build
tool and it is not included in a binary package. Here, it is more
important to not pass incompatible flags.

Helmut