[Pkg-utopia-maintainers] Bug#1093595: libatasmart FTCBFS: passes host flags to the build compiler
Helmut Grohne
helmut at subdivi.de
Fri Jan 17 17:41:25 GMT 2025
Source: libatasmart
Version: 0.19-5
Tags: patch upstream
User: debian-cross at lists.debian.org
Usertags: ftcbfs
libatasmart fails to cross build from source, because it passes host
architecture build flags to the build architecture compiler. This
happens in the strpool directory. There CC is set to CC_FOR_BUILD, which
is correctly detected and propagated. However BUILD_CFLAGS are assigned
to AM_CFLAGS and therefore end up being appended rather than replacing
the host's CFLAGS. The assignment should be done to CFLAGS to actually
overwrite the host's flags. I'm attaching a patch for your convenience.
Note that the packaging does not set BUILD_CFLAGS. If you want to set
them correctly, consider also adding
include /usr/share/dpkg/architecture.mk
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
include /usr/share/dpkg/buildflags.mk
export BUILD_CFLAGS := $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
endif
to debian/rules, but I don't think it matters in any practical way.
Helmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross.patch
Type: text/x-diff
Size: 306 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/attachments/20250117/912185c6/attachment.patch>
More information about the Pkg-utopia-maintainers
mailing list