Fix compilation for i386 CPU with -Cg option.

This is failing since commit #39345 because FPC_PIC macro is only set after _INTERFACE is parsed.
 + Warning about this added.

git-svn-id: trunk@39374 -
This commit is contained in:
pierre 2018-07-04 05:31:08 +00:00
parent 65d8836952
commit 1440fe7d0d

View File

@ -33,6 +33,18 @@ unit Generics.Hashes;
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
interface
uses
Classes, SysUtils;
{ Warning: the following set of macro code
that decides to use assembler or normal code
needs to stay after the _INTERFACE keyword
because FPC_PIC macro is only set after this keyword,
as it can be modified before by the global $PIC preprocessor directive.
Pierre Muller 2018/07/04 }
{$ifdef FPC_PIC}
{$define DISABLE_X86_CPUINTEL}
{$endif FPC_PIC}
@ -64,11 +76,6 @@ unit Generics.Hashes;
{$endif}
{$endif CPU64}
interface
uses
Classes, SysUtils;
// Original version of Bob Jenkins Hash
// http://burtleburtle.net/bob/c/lookup3.c
function HashWord(