aboutsummaryrefslogtreecommitdiffstats
path: root/testing/monero/fix-build-flags-for-ppc64le.patch
blob: 573e268bed4d9f179ef08d99574ec38ba750cb57 (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
30
31
--- monero-0.10.3.1/CMakeLists.txt
+++ monero-0.10.3.1/CMakeLists.txt
@@ -82,6 +82,10 @@
   set(ARM8 1)
 endif()
 
+if(ARCH_ID STREQUAL "ppc64le")
+  set(PPC64LE 1)
+endif()
+
 if(WIN32 OR ARM)
   set(OPT_FLAGS_RELEASE "-O2")
 else()
@@ -379,6 +383,8 @@
   message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}")
   if(ARCH STREQUAL "default")
     set(ARCH_FLAG "")
+  elseif(PPC64LE)
+    set(ARCH_FLAG "-mcpu=${ARCH}")
   else()
     set(ARCH_FLAG "-march=${ARCH}")
   endif()
@@ -435,7 +441,7 @@
 
   option(NO_AES "Explicitly disable AES support" ${NO_AES})
 
-  if(NOT NO_AES AND NOT ARM)
+  if(NOT NO_AES AND NOT ARM AND NOT PPC64LE)
     message(STATUS "AES support enabled")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")