Skip to content

Commit

Permalink
Some small adjustments for legacy OSX.
Browse files Browse the repository at this point in the history
  • Loading branch information
LongDirtyAnimAlf committed Jan 13, 2024
1 parent b379a8d commit cefa320
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
2 changes: 1 addition & 1 deletion public/gitrevision.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[master]v2.4.0dp-2859(49601da)
[master]v2.4.0dp-2860(b379a8d)
30 changes: 24 additions & 6 deletions sources/crossinstallers/m_any_to_apple_base.pas
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function Tany_apple.GetLibs(Basepath:string): boolean;

function Tany_apple.GetBinUtils(Basepath:string): boolean;
var
AsFile: string;
AsFile,AsCustomFile: string;
i,DarwinRelease:integer;
//S,PresetBinPath: string;
begin
Expand Down Expand Up @@ -312,6 +312,7 @@ function Tany_apple.GetBinUtils(Basepath:string): boolean;
end;

result:=SimpleSearchBinUtil(BasePath,'all-apple',AsFile);

{$ifdef MSWINDOWS}
if (NOT result) then
begin
Expand Down Expand Up @@ -392,8 +393,9 @@ function Tany_apple.GetBinUtils(Basepath:string): boolean;
// Look in special ppc-directory for universal named powerpc tools
if (TargetCPU in [TCPU.powerpc64,TCPU.powerpc]) then
begin
AsFile:=StringReplace(AsFile,TargetCPUName,'powerpc',[]);
result:=SimpleSearchBinUtil(BasePath,'powerpc-'+TargetOSName,AsFile);
AsCustomFile:=StringReplace(AsFile,TargetCPUName,'powerpc',[]);
result:=SimpleSearchBinUtil(BasePath,'powerpc-'+TargetOSName,AsCustomFile);
if result then AsFile:=AsCustomFile;
end;
end;

Expand All @@ -402,8 +404,24 @@ function Tany_apple.GetBinUtils(Basepath:string): boolean;
// Look in special i686-directory
if (TargetCPU in [TCPU.i386]) then
begin
AsFile:=StringReplace(AsFile,TargetCPUName,'i686',[]);
result:=SimpleSearchBinUtil(BasePath,'i686-'+TargetOSName,AsFile);
AsCustomFile:=StringReplace(AsFile,TargetCPUName,'i686',[]);
result:=SimpleSearchBinUtil(BasePath,'i686-'+TargetOSName,AsCustomFile);
if result then AsFile:=AsCustomFile;
end;
end;

// Look in special legacy-directory
if (NOT result) then
begin
result:=SimpleSearchBinUtil(BasePath,'all-darwin-legacy',AsFile);
if (NOT result) then
begin
if (TargetCPU in [TCPU.i386]) then
begin
AsCustomFile:=StringReplace(AsFile,TargetCPUName,'i686',[]);
result:=SimpleSearchBinUtil(BasePath,'all-darwin-legacy',AsCustomFile);
if result then AsFile:=AsCustomFile;
end;
end;
end;

Expand Down Expand Up @@ -476,7 +494,7 @@ function Tany_apple.GetBinUtils(Basepath:string): boolean;
FBinsFound:=true;
// Configuration snippet for FPC
AddFPCCFGSnippet('-FD'+BinUtilsPath); {search this directory for compiler utilities}
AddFPCCFGSnippet('-XX');
//AddFPCCFGSnippet('-XX');
AddFPCCFGSnippet('-XP'+BinUtilsPrefix); {Prepend the binutils names};
end;
end;
Expand Down
7 changes: 7 additions & 0 deletions sources/installerfpc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,16 @@ function TFPCCrossInstaller.BuildModuleCustom(ModuleName: string): boolean;

//Remove dedicated settings of config snippet
if MakeCycle=Low(TSTEPS) then
//if (MakeCycle=st_Start)
Infoln(infotext+'Removing '+FPCCONFIGFILENAME+' config snippet for target '+CrossInstaller.RegisterName,etInfo);

//Add config snippet

{$ifdef crosssimple}
//if (MakeCycle=High(TSTEPS)) then
{$else}
//if (MakeCycle=st_RtlBuild) then
{$endif}
if (MakeCycle=High(TSTEPS)) then
begin
s1:='';
Expand Down
2 changes: 1 addition & 1 deletion sources/m_crossinstaller.pas
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ interface

CrossWindowsSuggestion = 'Suggestion for cross binutils: the crossfpc binutils at https://gitlab.com/freepascal.org/fpc/binaries/-/tree/main/i386-win32.';

MAXDARWINVERSION=20;
MAXDARWINVERSION=24;
MINDARWINVERSION=7;

MAXOSVERSION=15;
Expand Down

0 comments on commit cefa320

Please sign in to comment.