Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 62f9ed95b5d0feab426bff452be793c62a6b795a Mon Sep 17 00:00:00 2001 |
| 2 | From: Krzysztof Kozlowski <krzk@kernel.org> |
| 3 | Date: Wed, 6 Jun 2018 12:49:21 +0200 |
| 4 | Subject: [PATCH 1/2] Makefile: Fix cross compilation |
| 5 | |
| 6 | Allow building on ARMv7 and ARMv8. |
| 7 | |
| 8 | Upstream-Status: Submitted |
| 9 | Signed-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 | |
| 16 | diff --git a/src/Makefile b/src/Makefile |
| 17 | index 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) |
| 29 | diff --git a/src/core/Makefile b/src/core/Makefile |
| 30 | index 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) |
| 41 | diff --git a/src/gui/Makefile b/src/gui/Makefile |
| 42 | index 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 | -- |
| 56 | 2.7.4 |
| 57 | |