Skip to content

Commit d93443e

Browse files
committed
C backend: Only pass -masm=... to gcc on x86 or x86_64
(cherry picked from commit 06d6cd7)
1 parent efb19c8 commit d93443e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Version 1.02.1
1616
- crt/string.bi, crt/mem.bi: Added CONSTs to function declarations
1717
- #767: Illegal byref result assignments will now cause a proper error message, not just a warning
1818
- Using the -asm att|intel option for non-x86[_64] targets now triggers an error
19+
- C backend: -masm=... will now only be passed to gcc for x86[_64] targets
1920

2021

2122
Version 1.02.0

src/compiler/fbc.bas

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2798,9 +2798,12 @@ private function hCompileStage2Module( byval module as FBCIOFILE ptr ) as intege
27982798
ln += "-mfpmath=sse -msse2 "
27992799
end if
28002800

2801-
if( fbGetOption( FB_COMPOPT_ASMSYNTAX ) = FB_ASMSYNTAX_INTEL ) then
2802-
ln += "-masm=intel "
2803-
end if
2801+
select case( fbGetCpuFamily( ) )
2802+
case FB_CPUFAMILY_X86, FB_CPUFAMILY_X86_64
2803+
if( fbGetOption( FB_COMPOPT_ASMSYNTAX ) = FB_ASMSYNTAX_INTEL ) then
2804+
ln += "-masm=intel "
2805+
end if
2806+
end select
28042807

28052808
case FB_BACKEND_LLVM
28062809
select case( fbGetCpuFamily( ) )

0 commit comments

Comments
 (0)