0001-Makefile-Fix-cross-compilation.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. Allow building on ARMv7 and ARMv8.
  6. Upstream-Status: Submitted
  7. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
  8. ---
  9. src/Makefile | 2 +-
  10. src/core/Makefile | 2 +-
  11. src/gui/Makefile | 4 ++--
  12. 3 files changed, 4 insertions(+), 4 deletions(-)
  13. diff --git a/src/Makefile b/src/Makefile
  14. index b50586bc9234..654b786dd899 100644
  15. --- a/src/Makefile
  16. +++ b/src/Makefile
  17. @@ -18,7 +18,7 @@ export MANDIR
  18. export DATADIR
  19. export SQLITE
  20. -CXX?=c++
  21. +CXX?=$(CROSS_COMPILE)c++
  22. INCLUDES=-I./core/
  23. DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
  24. CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
  25. diff --git a/src/core/Makefile b/src/core/Makefile
  26. index 5bf5a69cc6a6..2bd1b94c4175 100644
  27. --- a/src/core/Makefile
  28. +++ b/src/core/Makefile
  29. @@ -1,6 +1,6 @@
  30. PACKAGENAME?=lshw
  31. -CXX=c++
  32. +CXX?=$(CROSS_COMPILE)c++
  33. INCLUDES=
  34. DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
  35. CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
  36. diff --git a/src/gui/Makefile b/src/gui/Makefile
  37. index 332ce5704819..b0f925490356 100644
  38. --- a/src/gui/Makefile
  39. +++ b/src/gui/Makefile
  40. @@ -1,7 +1,7 @@
  41. PACKAGENAME?=lshw
  42. -CXX?=c++
  43. -CC?=cc
  44. +CXX?=$(CROSS_COMPILE)c++
  45. +CC?=$(CROSS_COMPILE)cc
  46. STRIP?=strip
  47. OBJCOPY?=objcopy
  48. --
  49. 2.7.4