Source: zxcvbn-c
Version: 2.5+dfsg-1
User: [email protected]
Usertags: ftcbfs

zxcvbn-c fails to cross build from source. The failure is rooted in
changes to the default build flags that have now become
architecture-dependent. Passing -mbranch-protection=standard (arm64) to
an amd64 compiler doesn't go well. As a consequence, we need to add the
_FOR_BUILD suffix to compiler flags as well. I'm attaching a patch for
your convenience.

Helmut
--- zxcvbn-c-2.5+dfsg.orig/makefile
+++ zxcvbn-c-2.5+dfsg/makefile
@@ -10,6 +10,9 @@
 # need zxcvbn.h prior to package installation
 CPPFLAGS += -I.
 
+CPPFLAGS_FOR_BUILD ?= $(CPPFLAGS)
+CXXFLAGS_FOR_BUILD ?= $(CXXFLAGS)
+
 # library metadata
 TARGET_LIB = libzxcvbn.so.0.0.0
 SONAME = libzxcvbn.so.0
@@ -62,7 +65,7 @@
 	./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS)
 
 dictgen: dict-generate.cpp makefile
-	$(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \
+	$(CXX_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) -std=c++11 $(CXXFLAGS_FOR_BUILD) \
 		-o dictgen dict-generate.cpp $(LDFLAGS)
 
 test-c++inline: test.c zxcvbn-c++inline.o

Reply via email to