blob: 6db6ab95ee8f1416e21831efc07acc8c556ccb2b [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 62f9ed95b5d0feab426bff452be793c62a6b795a Mon Sep 17 00:00:00 2001
2From: Krzysztof Kozlowski <krzk@kernel.org>
3Date: Wed, 6 Jun 2018 12:49:21 +0200
4Subject: [PATCH 1/2] Makefile: Fix cross compilation
5
6Allow building on ARMv7 and ARMv8.
7
8Upstream-Status: Submitted
9Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
10---
11 src/Makefile | 2 +-
12 src/core/Makefile | 2 +-
13 src/gui/Makefile | 4 ++--
14 3 files changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/src/Makefile b/src/Makefile
17index b50586bc9234..654b786dd899 100644
18--- a/src/Makefile
19+++ b/src/Makefile
20@@ -18,7 +18,7 @@ export MANDIR
21 export DATADIR
22 export SQLITE
23
24-CXX?=c++
25+CXX?=$(CROSS_COMPILE)c++
26 INCLUDES=-I./core/
27 DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
28 CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
29diff --git a/src/core/Makefile b/src/core/Makefile
30index 5bf5a69cc6a6..2bd1b94c4175 100644
31--- a/src/core/Makefile
32+++ b/src/core/Makefile
33@@ -1,6 +1,6 @@
34 PACKAGENAME?=lshw
35
36-CXX=c++
37+CXX?=$(CROSS_COMPILE)c++
38 INCLUDES=
39 DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
40 CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
41diff --git a/src/gui/Makefile b/src/gui/Makefile
42index 332ce5704819..b0f925490356 100644
43--- a/src/gui/Makefile
44+++ b/src/gui/Makefile
45@@ -1,7 +1,7 @@
46 PACKAGENAME?=lshw
47
48-CXX?=c++
49-CC?=cc
50+CXX?=$(CROSS_COMPILE)c++
51+CC?=$(CROSS_COMPILE)cc
52 STRIP?=strip
53 OBJCOPY?=objcopy
54
55--
562.7.4
57