Build Win32 with Yasm rather than MASM.
Although x86masm.pl exists, upstream's documentation suggest only x86nasm.pl is supported. Yasm seems to handle it fine with a small change. Change-Id: Ia77be57c6b743527225924b2b398f2f07a084a7f Reviewed-on: https://boringssl-review.googlesource.com/2092 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
3e700bb3e8
commit
03a739d8d2
@ -12,12 +12,16 @@ else()
|
|||||||
if (CMAKE_CL_64)
|
if (CMAKE_CL_64)
|
||||||
message("Using masm")
|
message("Using masm")
|
||||||
set(PERLASM_STYLE masm)
|
set(PERLASM_STYLE masm)
|
||||||
|
enable_language(ASM_MASM)
|
||||||
else()
|
else()
|
||||||
message("Using win32")
|
message("Using win32n")
|
||||||
set(PERLASM_STYLE win32)
|
set(PERLASM_STYLE win32n)
|
||||||
|
|
||||||
|
# On 32-bit, upstream supports only NASM, not MASM. We'll use Yasm, specifically.
|
||||||
|
set(CMAKE_ASM_NASM_COMPILER "yasm")
|
||||||
|
enable_language(ASM_NASM)
|
||||||
endif()
|
endif()
|
||||||
set(ASM_EXT asm)
|
set(ASM_EXT asm)
|
||||||
enable_language(ASM_MASM)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(perlasm dest src)
|
function(perlasm dest src)
|
||||||
|
@ -83,7 +83,15 @@ sub ::file
|
|||||||
%ifidn __OUTPUT_FORMAT__,obj
|
%ifidn __OUTPUT_FORMAT__,obj
|
||||||
section code use32 class=code align=64
|
section code use32 class=code align=64
|
||||||
%elifidn __OUTPUT_FORMAT__,win32
|
%elifidn __OUTPUT_FORMAT__,win32
|
||||||
|
%ifdef __YASM_VERSION_ID__
|
||||||
|
%if __YASM_VERSION_ID__ < 01010000h
|
||||||
|
%error yasm version 1.1.0 or later needed.
|
||||||
|
%endif
|
||||||
|
; Yasm automatically includes @feat.00 and complains about redefining it.
|
||||||
|
; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
|
||||||
|
%else
|
||||||
\$\@feat.00 equ 1
|
\$\@feat.00 equ 1
|
||||||
|
%endif
|
||||||
section .text code align=64
|
section .text code align=64
|
||||||
%else
|
%else
|
||||||
section .text code
|
section .text code
|
||||||
|
Loading…
Reference in New Issue
Block a user