mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:29:16 +02:00
* Endianness
git-svn-id: trunk@47743 -
(cherry picked from commit 7f2c8857da
)
This commit is contained in:
parent
38fb90efbd
commit
a0f786f14c
@ -51,6 +51,7 @@ Type
|
|||||||
FCPUTarget: String;
|
FCPUTarget: String;
|
||||||
FDefaultPackageName: String;
|
FDefaultPackageName: String;
|
||||||
FEmitNotes: Boolean;
|
FEmitNotes: Boolean;
|
||||||
|
FEndianNess: String;
|
||||||
FFormat: String;
|
FFormat: String;
|
||||||
FHidePrivate: Boolean;
|
FHidePrivate: Boolean;
|
||||||
FHideProtected: Boolean;
|
FHideProtected: Boolean;
|
||||||
@ -69,6 +70,7 @@ Type
|
|||||||
Published
|
Published
|
||||||
Property OSTarget : String Read FOSTarget Write FOStarget;
|
Property OSTarget : String Read FOSTarget Write FOStarget;
|
||||||
Property CPUTarget : String Read FCPUTarget Write FCPUTarget;
|
Property CPUTarget : String Read FCPUTarget Write FCPUTarget;
|
||||||
|
Property EndianNess : String Read FEndianNess Write FEndianNess;
|
||||||
Property Language : String Read FLanguage Write fLanguage;
|
Property Language : String Read FLanguage Write fLanguage;
|
||||||
Property Backend : String Read FFormat Write FFormat;
|
Property Backend : String Read FFormat Write FFormat;
|
||||||
Property BackendOptions : TStrings Read FBackEndoptions Write SetBackendOptions;
|
Property BackendOptions : TStrings Read FBackEndoptions Write SetBackendOptions;
|
||||||
@ -81,6 +83,7 @@ Type
|
|||||||
Property DefaultPackageName : String Read FDefaultPackageName Write FDefaultPackageName;
|
Property DefaultPackageName : String Read FDefaultPackageName Write FDefaultPackageName;
|
||||||
Property DontTrim : Boolean Read FDontTrim Write FDontTrim;
|
Property DontTrim : Boolean Read FDontTrim Write FDontTrim;
|
||||||
Property EmitNotes : Boolean Read FEmitNotes Write FEmitNotes;
|
Property EmitNotes : Boolean Read FEmitNotes Write FEmitNotes;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFPDocProject }
|
{ TFPDocProject }
|
||||||
|
@ -12,6 +12,11 @@ const
|
|||||||
DefCPUTarget = {$I %FPCTARGETCPU%};
|
DefCPUTarget = {$I %FPCTARGETCPU%};
|
||||||
DefFPCVersion = {$I %FPCVERSION%};
|
DefFPCVersion = {$I %FPCVERSION%};
|
||||||
DefFPCDate = {$I %FPCDATE%};
|
DefFPCDate = {$I %FPCDATE%};
|
||||||
|
{$IFDEF FPC_BIG_ENDIAN}
|
||||||
|
DefEndianNess = 'FPC_BIG_ENDIAN';
|
||||||
|
{$ELSE}
|
||||||
|
DefEndianNess = 'FPC_LITTLE_ENDIAN';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
@ -126,7 +131,7 @@ begin
|
|||||||
SplitInputFIleOption(S,UN,Opts);
|
SplitInputFIleOption(S,UN,Opts);
|
||||||
if CompareText(ChangeFileExt(ExtractFileName(Un),''),AUnitName)=0 then
|
if CompareText(ChangeFileExt(ExtractFileName(Un),''),AUnitName)=0 then
|
||||||
begin
|
begin
|
||||||
AInputFile:=FixInputFile(UN)+' '+Opts;
|
AInputFile:=FixInputFile(UN)+' '+Opts+' -d'+Options.EndianNess;
|
||||||
OSTarget:=FProject.Options.OSTarget;
|
OSTarget:=FProject.Options.OSTarget;
|
||||||
CPUTarget:=FProject.Options.CPUTarget;
|
CPUTarget:=FProject.Options.CPUTarget;
|
||||||
FProcessedUnits.Add(UN);
|
FProcessedUnits.Add(UN);
|
||||||
@ -197,6 +202,7 @@ begin
|
|||||||
FProject.Options.StopOnParseError:=False;
|
FProject.Options.StopOnParseError:=False;
|
||||||
FProject.Options.CPUTarget:=DefCPUTarget;
|
FProject.Options.CPUTarget:=DefCPUTarget;
|
||||||
FProject.Options.OSTarget:=DefOSTarget;
|
FProject.Options.OSTarget:=DefOSTarget;
|
||||||
|
FProject.Options.EndianNess:=DefEndianNess;
|
||||||
FProcessedUnits:=TStringList.Create;
|
FProcessedUnits:=TStringList.Create;
|
||||||
FProjectMacros:=TStringList.Create;
|
FProjectMacros:=TStringList.Create;
|
||||||
end;
|
end;
|
||||||
@ -243,7 +249,8 @@ begin
|
|||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
// Output content files
|
// Output content files
|
||||||
Writeln('Content file : ',APackage.ContentFile);
|
if FVerbose then
|
||||||
|
DoLog('Content file : '+APackage.ContentFile);
|
||||||
if Length(APackage.ContentFile) > 0 then
|
if Length(APackage.ContentFile) > 0 then
|
||||||
Engine.WriteContentFile(APackage.ContentFile);
|
Engine.WriteContentFile(APackage.ContentFile);
|
||||||
end;
|
end;
|
||||||
@ -292,13 +299,15 @@ begin
|
|||||||
try
|
try
|
||||||
// get options from input packages
|
// get options from input packages
|
||||||
SplitInputFileOption(APackage.Inputs[i],Cmd,Arg);
|
SplitInputFileOption(APackage.Inputs[i],Cmd,Arg);
|
||||||
|
arg:=Arg+' -d'+Options.EndianNess;
|
||||||
// make absolute filepath
|
// make absolute filepath
|
||||||
Cmd:=FixInputFile(Cmd);
|
Cmd:=FixInputFile(Cmd);
|
||||||
if FProcessedUnits.IndexOf(Cmd)=-1 then
|
if FProcessedUnits.IndexOf(Cmd)=-1 then
|
||||||
begin
|
begin
|
||||||
FProcessedUnits.Add(Cmd);
|
FProcessedUnits.Add(Cmd);
|
||||||
|
|
||||||
// Parce sources for OS Target
|
// Parce sources for OS Target
|
||||||
//WriteLn(Format('Parcing unit: %s', [ExtractFilenameOnly(Cmd)]));
|
//WriteLn(Format('Parsing unit: %s', [ExtractFilenameOnly(Cmd)]));
|
||||||
ParseSource(Engine,Cmd+' '+Arg, Options.OSTarget, Options.CPUTarget,[poUseStreams]);
|
ParseSource(Engine,Cmd+' '+Arg, Options.OSTarget, Options.CPUTarget,[poUseStreams]);
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
|
Loading…
Reference in New Issue
Block a user