From 5675325769525e8d64a1106f20902e26a1b4fd2c Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Mon, 6 Apr 2015 13:05:30 +0200 Subject: [PATCH 1/3] new makefile targets for static builds --- Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 232842a45..5e0df4dcf 100644 --- a/Makefile +++ b/Makefile @@ -30,9 +30,23 @@ release-all: mkdir -p build/release cd build/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) -release-static: +release-static: release-static-64 + +release-static-64: mkdir -p build/release - cd build/release && cmake -D STATIC=ON -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) + cd build/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) + +release-static-32: + mkdir -p build/release + cd build/release && cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) + +release-static-win64: + mkdir -p build/release + cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 ../.. && $(MAKE) + +release-static-win32: + mkdir -p build/release + cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=../cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys32 ../.. && $(MAKE) clean: @echo "WARNING: Back-up your wallet if it exists within ./build!" ; \ From 4222b372e4363e580fe1e7e30fe5af946d47b9a7 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Mon, 6 Apr 2015 14:00:09 +0200 Subject: [PATCH 2/3] add arm6 target and flags --- CMakeLists.txt | 10 +++++++++- Makefile | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 92f8381cc..15bbc793a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,15 @@ else() 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") endif() - + + string(SUBSTRING ${ARCH} 0 3 ARM_TEST) + string(TOLOWER ${ARM_TEST} ARM_TEST) + if(${ARM_TEST} STREQUAL "arm") + message(STATUS "Setting ARM C and C++ flags") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfp -mfloat-abi=hard") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfp -mfloat-abi=hard") + endif() + if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_HAS_TR1_TUPLE=0") endif() diff --git a/Makefile b/Makefile index 5e0df4dcf..50fbfcfc1 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,10 @@ release-static-32: mkdir -p build/release cd build/release && cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) +release-static-arm6: + mkdir -p build/release + cd build/release && cmake -D STATIC=ON -D ARCH="armv6zk" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) + release-static-win64: mkdir -p build/release cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 ../.. && $(MAKE) From 7d8acd1c45df042d3f0d8d3edabd7bc8d74f12c6 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Mon, 6 Apr 2015 14:14:45 +0200 Subject: [PATCH 3/3] explicitly disable AES on ARM --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 50fbfcfc1..1b501f1ee 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ release-static-32: release-static-arm6: mkdir -p build/release - cd build/release && cmake -D STATIC=ON -D ARCH="armv6zk" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) + cd build/release && cmake -D STATIC=ON -D ARCH="armv6zk" -D BUILD_64=OFF -D NO_AES=ON -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE) release-static-win64: mkdir -p build/release