mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-04 18:27:17 +01:00
Use slash instead of backslash inside linker script to allow use of cross-linker
git-svn-id: trunk@27509 -
This commit is contained in:
parent
3d34a8a3b0
commit
62b3375033
@ -208,9 +208,11 @@ begin
|
||||
|
||||
{ Add all options to link.res instead of passing them via command line:
|
||||
DOS command line is limited to 126 characters! }
|
||||
LinkRes.Add('--script='+maybequoted(outputexedir+Info.ScriptName));
|
||||
{ Newer or cross GNU ld do not like \ in path names,
|
||||
so we use bstoslash }
|
||||
LinkRes.Add('--script='+maybequoted(bstoslash(outputexedir+Info.ScriptName)));
|
||||
if (cs_link_map in current_settings.globalswitches) then
|
||||
LinkRes.Add('-Map '+maybequoted(ChangeFileExt(current_module.exefilename,'.map')));
|
||||
LinkRes.Add('-Map '+maybequoted(bstoslash(ChangeFileExt(current_module.exefilename,'.map'))));
|
||||
if create_smartlink_sections then
|
||||
LinkRes.Add('--gc-sections');
|
||||
if info.ExtraOptions<>'' then
|
||||
@ -218,7 +220,7 @@ begin
|
||||
(* Potential issues with older ld version??? *)
|
||||
if (cs_link_strip in current_settings.globalswitches) then
|
||||
LinkRes.Add('-s');
|
||||
LinkRes.Add('-o '+maybequoted(current_module.exefilename));
|
||||
LinkRes.Add('-o '+maybequoted(bstoslash(current_module.exefilename)));
|
||||
|
||||
{ Write staticlibraries }
|
||||
if not StaticLibFiles.Empty then
|
||||
@ -227,7 +229,7 @@ begin
|
||||
While not StaticLibFiles.Empty do
|
||||
begin
|
||||
S:=StaticLibFiles.GetFirst;
|
||||
LinkRes.AddFileName(GetShortName(s))
|
||||
LinkRes.AddFileName(bstoslash(GetShortName(s)))
|
||||
end;
|
||||
LinkRes.Add('-)');
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user