aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2019-05-19 13:20:06 +0900
committerBrent Cook <busterb@gmail.com>2019-06-10 06:49:34 -0500
commitbbb662b69c48c07d93e642548c0f71ebbdc06d93 (patch)
tree3a174b52524071b7151b54a4c618315a06886ad7
parentc6f8ca2bc6b5bd8ca8842326f74e0cff007766ad (diff)
downloadportable-bbb662b69c48c07d93e642548c0f71ebbdc06d93.tar.gz
portable-bbb662b69c48c07d93e642548c0f71ebbdc06d93.tar.bz2
portable-bbb662b69c48c07d93e642548c0f71ebbdc06d93.zip
Fix masm build
- Fix masm operators and comments - Add -DOPENSSL_NO_ASM only if not 64 bit build - Add -DCMAKE_INSTALL_PREFIX to avoid build error
-rw-r--r--CMakeLists.txt2
-rw-r--r--appveyor.yml2
-rw-r--r--crypto/CMakeLists.txt6
-rwxr-xr-xupdate.sh14
4 files changed, 19 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af287a4..a0b0599 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -289,7 +289,7 @@ if(ENABLE_ASM)
289 endif() 289 endif()
290 elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") 290 elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
291 set(HOST_ASM_MACOSX_X86_64 true) 291 set(HOST_ASM_MACOSX_X86_64 true)
292 elseif(MSVC AND "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AMD64") 292 elseif(MSVC AND "${CMAKE_GENERATOR}" MATCHES "Win64")
293 # XXX Disabled for now, CMake's MASM support seems to either never 293 # XXX Disabled for now, CMake's MASM support seems to either never
294 # build supply ASM or build it with the C compiler in a mode where it 294 # build supply ASM or build it with the C compiler in a mode where it
295 # does not parse correctly. It might be easier to get NASM support working. 295 # does not parse correctly. It might be easier to get NASM support working.
diff --git a/appveyor.yml b/appveyor.yml
index 790db86..8ac2045 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -34,7 +34,7 @@ before_build:
34 - bash autogen.sh 34 - bash autogen.sh
35 - mkdir build 35 - mkdir build
36 - cd build 36 - cd build
37 - cmake .. -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%SHARED_LIBS% 37 - cmake .. -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%SHARED_LIBS% -DCMAKE_INSTALL_PREFIX=../local
38 38
39build_script: 39build_script:
40 - cmake --build . --config %CONFIG% 40 - cmake --build . --config %CONFIG%
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index e1b9287..4c902ad 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -920,7 +920,11 @@ endif()
920if(NOT ENABLE_ASM) 920if(NOT ENABLE_ASM)
921 add_definitions(-DOPENSSL_NO_ASM) 921 add_definitions(-DOPENSSL_NO_ASM)
922else() 922else()
923 if(WIN32) 923 if(MSVC)
924 if(NOT "${CMAKE_GENERATOR}" MATCHES "Win64")
925 add_definitions(-DOPENSSL_NO_ASM)
926 endif()
927 elseif(WIN32)
924 add_definitions(-DOPENSSL_NO_ASM) 928 add_definitions(-DOPENSSL_NO_ASM)
925 endif() 929 endif()
926endif() 930endif()
diff --git a/update.sh b/update.sh
index 99a293a..d1fe017 100755
--- a/update.sh
+++ b/update.sh
@@ -168,7 +168,12 @@ gen_asm_stdout() {
168 #endif 168 #endif
169 EOF 169 EOF
170 if [ $1 = "masm" ]; then 170 if [ $1 = "masm" ]; then
171 cpp -I./crypto $3.tmp > $3 171 cpp -I./crypto $3.tmp \
172 | sed -e 's/^#/;/' \
173 | sed -e 's/|/OR/g' \
174 | sed -e 's/~/NOT/g' \
175 | sed -e 's/1 << \([0-9]*\)/1 SHL \1/g' \
176 > $3
172 else 177 else
173 $MV $3.tmp $3 178 $MV $3.tmp $3
174 fi 179 fi
@@ -181,7 +186,12 @@ gen_asm() {
181 #endif 186 #endif
182 EOF 187 EOF
183 if [ $1 = "masm" ]; then 188 if [ $1 = "masm" ]; then
184 cpp -I./crypto $3.tmp > $3 189 cpp -I./crypto $3.tmp \
190 | sed -e 's/^#/;/' \
191 | sed -e 's/|/OR/g' \
192 | sed -e 's/~/NOT/g' \
193 | sed -e 's/1 << \([0-9]*\)/1 SHL \1/g' \
194 > $3
185 else 195 else
186 $MV $3.tmp $3 196 $MV $3.tmp $3
187 fi 197 fi