summaryrefslogtreecommitdiff
path: root/net-p2p/monero/files/monero-0.17.2.3-translations-use-host-compiler.patch
blob: 847a63108a26a2f0ff4211b23ff47cc7b0832771 (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 6e2719e0d44e052715642ec895e76d64b77809ce Mon Sep 17 00:00:00 2001
From: Bertrand Jacquin <bertrand@jacquin.bzh>
Date: Sat, 30 Nov 2019 02:09:14 +0000
Subject: [PATCH] translations: use host compiler

Do not pass target compiler and compiler flags as
generate_translations_header need to be created using host compiler and
compiler flags
---
 CMakeLists.txt              | 4 +++-
 translations/CMakeLists.txt | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 362ca8d5659c..3b4d31f87e46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -534,7 +534,9 @@ ExternalProject_Add(generate_translations_header
   SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations"
   BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
   STAMP_DIR ${LRELEASE_PATH}
-  CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
+  CMAKE_ARGS
+    -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_BINARY_DIR}/translations.cmake
+    -DLRELEASE_PATH=${LRELEASE_PATH}
   INSTALL_COMMAND cmake -E echo "")
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
 add_subdirectory(external)
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
index 0081746f2b9c..5309d84d742f 100644
--- a/translations/CMakeLists.txt
+++ b/translations/CMakeLists.txt
@@ -28,6 +28,10 @@
 
 cmake_minimum_required(VERSION 2.8.7)
 
+# Ensure LDFLAGS for target are not propaged here since target are
+# meant for host
+UNSET(ENV{LDFLAGS})
+
 project(translations)
 
 # when crosscompiling import the executable targets from a file