Browse Source

- disable the i386 assembly code for Linux/i386 as it doesn't work with a
fixed stack (uses hardcoded stack offsets) (mantis #38260)

git-svn-id: trunk@47871 -

Jonas Maebe 4 years ago
parent
commit
ea55c5f7e3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/hash/src/sha1.pp

+ 3 - 3
packages/hash/src/sha1.pp

@@ -15,10 +15,10 @@
 
 // Normally, if an optimized version is available for OS/CPU, that will be used
 // Define to use existing unoptimized implementation
-{ the assembler implementation does not work on darwin }
-{$ifdef darwin}
+{ the i386 assembler implementation does not work on platforms with a fixed stack }
+{$if DEFINED(CPU386) and (defined(darwin) or defined(linux))}
 {$DEFINE SHA1PASCAL}
-{$endif darwin}
+{$endif}
 
 unit sha1;
 {$mode objfpc}{$h+}