mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:39:18 +02:00
* always surround ld link.res SEARCH_DIR() arguments with double quotes,
rather than with single/double quotes depending on the target platform (ld only supports double quotes), and rather than only quoting when necessary (wastes time since quotes are always allowed, and double quotes inside a directory name cannot be escaped for ld; they are simply not supported by the program) (mantis #22059, follow-up to r21069 and r21208) git-svn-id: trunk@21343 -
This commit is contained in:
parent
ccf895af5a
commit
c27f9da1b2
@ -163,7 +163,7 @@ begin
|
|||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
if assumebinutils then
|
if assumebinutils then
|
||||||
Add('SEARCH_DIR('+maybequoted(HPath.Str)+')')
|
Add('SEARCH_DIR("'+HPath.Str+'")')
|
||||||
else
|
else
|
||||||
Add('-L'+HPath.Str);
|
Add('-L'+HPath.Str);
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
@ -172,7 +172,7 @@ begin
|
|||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
if assumebinutils then
|
if assumebinutils then
|
||||||
Add('SEARCH_DIR('+maybequoted(HPath.Str)+')')
|
Add('SEARCH_DIR("'+HPath.Str+'")')
|
||||||
else
|
else
|
||||||
Add('-L'+HPath.Str);
|
Add('-L'+HPath.Str);
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
|
@ -118,7 +118,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:=HPath.Str;
|
s:=HPath.Str;
|
||||||
if s<>'' then
|
if s<>'' then
|
||||||
LinkRes.Add('SEARCH_DIR('+Unix2AmigaPath(maybequoted(s))+')');
|
LinkRes.Add('SEARCH_DIR("'+Unix2AmigaPath(s)+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -424,7 +424,7 @@ begin
|
|||||||
if LdSupportsNoResponseFile then
|
if LdSupportsNoResponseFile then
|
||||||
LinkRes.Add('-L'+HPath.Str)
|
LinkRes.Add('-L'+HPath.Str)
|
||||||
else
|
else
|
||||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
LinkRes.Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
||||||
@ -433,7 +433,7 @@ begin
|
|||||||
if LdSupportsNoResponseFile then
|
if LdSupportsNoResponseFile then
|
||||||
LinkRes.Add('-L'+HPath.Str)
|
LinkRes.Add('-L'+HPath.Str)
|
||||||
else
|
else
|
||||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
LinkRes.Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:=HPath.Str;
|
s:=HPath.Str;
|
||||||
if s<>'' then
|
if s<>'' then
|
||||||
LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
|
LinkRes.Add('SEARCH_DIR("'+s+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:=HPath.Str;
|
s:=HPath.Str;
|
||||||
if s<>'' then
|
if s<>'' then
|
||||||
LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
|
LinkRes.Add('SEARCH_DIR("'+s+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -353,13 +353,13 @@ begin
|
|||||||
HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
|
HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
|
||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:=HPath.Str;
|
s:=HPath.Str;
|
||||||
if s<>'' then
|
if s<>'' then
|
||||||
LinkRes.Add('SEARCH_DIR('+Unix2AmigaPath(maybequoted(s))+')');
|
LinkRes.Add('SEARCH_DIR("'+Unix2AmigaPath(s)+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:=HPath.Str;
|
s:=HPath.Str;
|
||||||
if s<>'' then
|
if s<>'' then
|
||||||
LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
|
LinkRes.Add('SEARCH_DIR("'+s+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -224,13 +224,13 @@ begin
|
|||||||
HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
|
HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
|
||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
LinkRes.Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
LinkRes.Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:=HPath.Str;
|
s:=HPath.Str;
|
||||||
if s<>'' then
|
if s<>'' then
|
||||||
LinkRes.Add('SEARCH_DIR('+(maybequoted(s))+')');
|
LinkRes.Add('SEARCH_DIR("'+s+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1200,13 +1200,13 @@ implementation
|
|||||||
HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
|
HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
|
||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
Add('SEARCH_DIR('+MaybeQuoted(HPath.Str)+')');
|
Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
HPath:=TCmdStrListItem(LibrarySearchPath.First);
|
||||||
while assigned(HPath) do
|
while assigned(HPath) do
|
||||||
begin
|
begin
|
||||||
Add('SEARCH_DIR('+MaybeQuoted(HPath.Str)+')');
|
Add('SEARCH_DIR("'+HPath.Str+'")');
|
||||||
HPath:=TCmdStrListItem(HPath.Next);
|
HPath:=TCmdStrListItem(HPath.Next);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user