aboutsummaryrefslogtreecommitdiffhomepage
path: root/debian/patches/cross.patch
blob: cd46962934fe95ad0228bf04c6086ad321d53467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Helmut Grohne <helmut@subdivi.de>
Date: Sun, 25 Mar 2018 13:36:47 +0200
Subject: fix crossbuilding zxcvbn-c

---
 makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/makefile b/makefile
index 40c88f2..6223330 100644
--- a/makefile
+++ b/makefile
@@ -5,6 +5,7 @@ CXXFLAGS ?= -O2 -Wall -Wextra
 CC ?= gcc
 AR ?= ar
 CXX ?= g++
+CXX_FOR_BUILD ?= $(CXX)
 
 # need zxcvbn.h prior to package installation
 CPPFLAGS += -I.
@@ -61,7 +62,7 @@ dict-crc.h: dictgen $(WORDS)
 	./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS)
 
 dictgen: dict-generate.cpp makefile
-	$(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \
+	$(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \
 		-o dictgen dict-generate.cpp $(LDFLAGS)
 
 test-c++inline: test.c zxcvbn-c++inline.o