Fix builds and tests to pass on Linux.

Builds on both 32-bit and 64-bit executables and all tests (except gm.dls stuff obviously, which was excluded) pass on 64-bit Linux. Cannot test the 32-bit executables, as WSL does not support running 32-bit.
This commit is contained in:
Veikko
2020-05-26 21:27:53 +03:00
committed by Veikko Sariola
parent b64723323f
commit 5e05057240
4 changed files with 87 additions and 62 deletions

View File

@ -27,11 +27,18 @@
%define MANGLE_DATA(d) d
%endif
%ifidn __OUTPUT_FORMAT__,elf32
%ifidn __OUTPUT_FORMAT__,elf
; on linux, function f with n parameters is mangled as "f"
%define MANGLE_FUNC(f,n) f
; On linux, data label d is mangled as "d"
%define MANGLE_DATA(d) d
%assign BITS 32
%endif
%ifidn __OUTPUT_FORMAT__,elf64
%define MANGLE_FUNC(f,n) f
%define MANGLE_DATA(d) d
%assign BITS 64
%endif
%ifidn __OUTPUT_FORMAT__,macho32