Source: libatasmart
Version: 0.19-5
Tags: patch upstream
User: [email protected]
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
--- libatasmart-0.19.orig/strpool/Makefile.am
+++ libatasmart-0.19/strpool/Makefile.am
@@ -17,8 +17,8 @@
 # <http://www.gnu.org/licenses/>.
 
 CC = @CC_FOR_BUILD@
-AM_CFLAGS = @BUILD_CFLAGS@
-AM_LDFLAGS = @BUILD_LDFLAGS@
+CFLAGS = @BUILD_CFLAGS@
+LDFLAGS = @BUILD_LDFLAGS@
 
 noinst_PROGRAMS = \
 	strpool
_______________________________________________
Pkg-utopia-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-utopia-maintainers

Reply via email to