o patch by Dávid Pethes: Fixes for compilation with nasm 2.10 and higher on Win64:

* disable generation of RVA and SECREL32 symbols (according to comment in taiconst_type, they are win32 only)
  * use lowercase cpu names (it was changed from case-insensitive names sometime after 2.10)

git-svn-id: trunk@38579 -
This commit is contained in:
florian 2018-03-20 21:55:01 +00:00
parent cd4c277ae2
commit fa3ee68004

View File

@ -82,37 +82,38 @@ interface
{$i r8086nasm.inc} {$i r8086nasm.inc}
{$endif} {$endif}
); );
{ nasm 2.13 expects lowercase cpu names }
nasm_cpu_name : array[tcputype] of string = ( nasm_cpu_name : array[tcputype] of string = (
{$if defined(x86_64)} {$if defined(x86_64)}
'IA64', // cpu_none, 'ia64', // cpu_none,
'X64', // cpu_athlon64, 'x64', // cpu_athlon64,
'IA64', // cpu_core_i, 'ia64', // cpu_core_i,
'IA64', // cpu_core_avx, 'ia64', // cpu_core_avx,
'IA64' // cpu_core_avx2 'ia64' // cpu_core_avx2
{$elseif defined(i386)} {$elseif defined(i386)}
'IA64', // cpu_none, 'ia64', // cpu_none,
'386', // cpu_386, '386', // cpu_386,
'486', // cpu_486, '486', // cpu_486,
'PENTIUM', // cpu_Pentium, 'pentium', // cpu_Pentium,
'P2', // cpu_Pentium2, 'p2', // cpu_Pentium2,
'P3', // cpu_Pentium3, 'p3', // cpu_Pentium3,
'P4', // cpu_Pentium4, 'p4', // cpu_Pentium4,
'P4', // cpu_PentiumM, 'p4', // cpu_PentiumM,
'IA64', // cpu_core_i, 'ia64', // cpu_core_i,
'IA64', // cpu_core_avx, 'ia64', // cpu_core_avx,
'IA64' // cpu_core_avx2 'ia64' // cpu_core_avx2
{$elseif defined(i8086)} {$elseif defined(i8086)}
'IA64', // cpu_none 'ia64', // cpu_none
'8086', // cpu_8086 '8086', // cpu_8086
'186', // cpu_186 '186', // cpu_186
'286', // cpu_286 '286', // cpu_286
'386', // cpu_386 '386', // cpu_386
'486', // cpu_486 '486', // cpu_486
'PENTIUM', // cpu_Pentium 'pentium', // cpu_Pentium
'P2', // cpu_Pentium2 'p2', // cpu_Pentium2
'P3', // cpu_Pentium3 'p3', // cpu_Pentium3
'P4', // cpu_Pentium4 'p4', // cpu_Pentium4
'P4' // cpu_PentiumM 'p4' // cpu_PentiumM
{$endif} {$endif}
); );
@ -782,12 +783,18 @@ interface
aitconst_fardataseg: aitconst_fardataseg:
writer.AsmWriteLn(#9'DW'#9+current_module.modulename^+'_DATA'); writer.AsmWriteLn(#9'DW'#9+current_module.modulename^+'_DATA');
{$endif i8086} {$endif i8086}
{$ifdef x86_64}
aitconst_rva_symbol,
aitconst_secrel32_symbol: ;
{$endif x86_64}
{$ifdef i386}
aitconst_rva_symbol,
aitconst_secrel32_symbol,
{$endif i386}
aitconst_64bit, aitconst_64bit,
aitconst_32bit, aitconst_32bit,
aitconst_16bit, aitconst_16bit,
aitconst_8bit, aitconst_8bit,
aitconst_rva_symbol,
aitconst_secrel32_symbol,
aitconst_16bit_unaligned, aitconst_16bit_unaligned,
aitconst_32bit_unaligned, aitconst_32bit_unaligned,
aitconst_64bit_unaligned: aitconst_64bit_unaligned: