|
@@ -366,15 +366,16 @@ begin
|
|
|
|
|
|
if (not isdll) then
|
|
|
begin
|
|
|
+ LinkRes.Add('-arch');
|
|
|
case target_info.system of
|
|
|
system_powerpc_darwin:
|
|
|
- LinkRes.Add('-arch ppc');
|
|
|
+ LinkRes.Add('ppc');
|
|
|
system_i386_darwin:
|
|
|
- LinkRes.Add('-arch i386');
|
|
|
+ LinkRes.Add('i386');
|
|
|
system_powerpc64_darwin:
|
|
|
- LinkRes.Add('-arch ppc64');
|
|
|
+ LinkRes.Add('ppc64');
|
|
|
system_x86_64_darwin:
|
|
|
- LinkRes.Add('-arch x86_64');
|
|
|
+ LinkRes.Add('x86_64');
|
|
|
end;
|
|
|
end;
|
|
|
{ Write path to search libraries }
|
|
@@ -382,7 +383,7 @@ begin
|
|
|
while assigned(HPath) do
|
|
|
begin
|
|
|
if LdSupportsNoResponseFile then
|
|
|
- LinkRes.Add(maybequoted('-L'+HPath.Str))
|
|
|
+ LinkRes.Add('-L'+HPath.Str)
|
|
|
else
|
|
|
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
|
|
HPath:=TCmdStrListItem(HPath.Next);
|
|
@@ -391,7 +392,7 @@ begin
|
|
|
while assigned(HPath) do
|
|
|
begin
|
|
|
if LdSupportsNoResponseFile then
|
|
|
- LinkRes.Add(maybequoted('-L'+HPath.Str))
|
|
|
+ LinkRes.Add('-L'+HPath.Str)
|
|
|
else
|
|
|
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
|
|
HPath:=TCmdStrListItem(HPath.Next);
|
|
@@ -402,13 +403,13 @@ begin
|
|
|
HPath:=TCmdStrListItem(current_module.localframeworksearchpath.First);
|
|
|
while assigned(HPath) do
|
|
|
begin
|
|
|
- LinkRes.Add(maybequoted('-F'+HPath.Str));
|
|
|
+ LinkRes.Add('-F'+HPath.Str);
|
|
|
HPath:=TCmdStrListItem(HPath.Next);
|
|
|
end;
|
|
|
HPath:=TCmdStrListItem(FrameworkSearchPath.First);
|
|
|
while assigned(HPath) do
|
|
|
begin
|
|
|
- LinkRes.Add(maybequoted('-F'+HPath.Str));
|
|
|
+ LinkRes.Add('-F'+HPath.Str);
|
|
|
HPath:=TCmdStrListItem(HPath.Next);
|
|
|
end;
|
|
|
end;
|
|
@@ -432,7 +433,10 @@ begin
|
|
|
begin
|
|
|
s:=ObjectFiles.GetFirst;
|
|
|
if s<>'' then
|
|
|
- LinkRes.AddFileName(maybequoted(s));
|
|
|
+ if LdSupportsNoResponseFile then
|
|
|
+ LinkRes.AddFileName(s)
|
|
|
+ else
|
|
|
+ LinkRes.AddFileName(maybequoted(s));
|
|
|
end;
|
|
|
if not LdSupportsNoResponseFile then
|
|
|
LinkRes.Add(')');
|
|
@@ -445,7 +449,10 @@ begin
|
|
|
While not StaticLibFiles.Empty do
|
|
|
begin
|
|
|
S:=StaticLibFiles.GetFirst;
|
|
|
- LinkRes.AddFileName(maybequoted(s))
|
|
|
+ if LdSupportsNoResponseFile then
|
|
|
+ LinkRes.AddFileName(s)
|
|
|
+ else
|
|
|
+ LinkRes.AddFileName(maybequoted(s))
|
|
|
end;
|
|
|
if not LdSupportsNoResponseFile then
|
|
|
LinkRes.Add(')');
|
|
@@ -495,7 +502,10 @@ begin
|
|
|
{ frameworks for Darwin }
|
|
|
if IsDarwin then
|
|
|
while not FrameworkFiles.empty do
|
|
|
- LinkRes.Add('-framework '+FrameworkFiles.GetFirst);
|
|
|
+ begin
|
|
|
+ LinkRes.Add('-framework');
|
|
|
+ LinkRes.Add(FrameworkFiles.GetFirst);
|
|
|
+ end;
|
|
|
|
|
|
{ objects which must be at the end }
|
|
|
if linklibc and
|
|
@@ -516,7 +526,10 @@ begin
|
|
|
{ ignore the fact that our relocations are in non-writable sections, }
|
|
|
{ will be fixed once we have pic support }
|
|
|
if isdll and IsDarwin Then
|
|
|
- LinkRes.Add('-read_only_relocs suppress');
|
|
|
+ begin
|
|
|
+ LinkRes.Add('-read_only_relocs');
|
|
|
+ LinkRes.Add('suppress');
|
|
|
+ end;
|
|
|
{ Write and Close response }
|
|
|
linkres.writetodisk;
|
|
|
linkres.Free;
|