* 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:
Jonas Maebe 2012-05-20 13:30:51 +00:00
parent ccf895af5a
commit c27f9da1b2
11 changed files with 16 additions and 16 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;