aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-07-06 18:14:03 +0200
committerRiccardo Spagni <ric@spagni.net>2016-07-06 18:14:03 +0200
commit65df33fb0670859c531f09838642fb5e4f5dad9d (patch)
tree133dbb4b070e9558cc912d4617e73604f284de8e
parentMerge pull request #876 (diff)
parentmakefile: remove unnecessary ARM-specific targets (diff)
downloadmonero-65df33fb0670859c531f09838642fb5e4f5dad9d.tar.xz
Merge pull request #877
ecd0f2d makefile: remove unnecessary ARM-specific targets (redfish) c650160 cmake: disable AES on ARM (redfish) 804b1bc cmake: initialize ARCH for native builds (redfish) bb39034 cmake: remove repetitive code in handling of NO_AES (redfish)
-rw-r--r--CMakeLists.txt24
-rw-r--r--Makefile8
2 files changed, 16 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e7806fa1..6b9c81895 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,12 @@ function (die msg)
message(FATAL_ERROR "${BoldRed}${msg}${ColourReset}")
endfunction ()
-if (NOT ${ARCH} STREQUAL "")
+if ("${ARCH}" STREQUAL "" OR "${ARCH}" STREQUAL "native")
+ set(ARCH ${CMAKE_SYSTEM_PROCESSOR})
+ message(STATUS "Building natively on ${ARCH}")
+endif()
+
+if (NOT "${ARCH}" STREQUAL "")
string(SUBSTRING ${ARCH} 0 3 IS_ARM)
string(TOLOWER ${IS_ARM} IS_ARM)
@@ -342,16 +347,19 @@ else()
set(STATIC_ASSERT_FLAG "-Dstatic_assert=_Static_assert")
endif()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG}")
+
option(NO_AES "Explicitly disable AES support" ${NO_AES})
- if (NO_AES)
- message(STATUS "Disabling AES support")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG}")
+ if(NOT NO_AES AND NOT (ARM6 OR ARM7))
+ message(STATUS "AES support enabled")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
+ elseif(ARM7 OR ARM6)
+ message(STATUS "AES support disabled (not available on ARM)")
else()
- message(STATUS "Enabling AES support")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} -maes")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} -maes")
+ message(STATUS "AES support disabled")
endif()
if(ARM6)
diff --git a/Makefile b/Makefile
index b02f92ad5..69d1127de 100644
--- a/Makefile
+++ b/Makefile
@@ -58,14 +58,6 @@ release-all:
mkdir -p build/release
cd build/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
-release-arm6:
- mkdir -p build/release
- cd build/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv6zk" -D BUILD_64=OFF -D NO_AES=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
-
-release-arm7:
- mkdir -p build/release
- cd build/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D BUILD_64=OFF -D NO_AES=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
-
release-static: release-static-64
release-static-64: