Ver código fonte

Use slash instead of backslash inside linker script to allow use of cross-linker

git-svn-id: trunk@27509 -
pierre 11 anos atrás
pai
commit
62b3375033
1 arquivos alterados com 6 adições e 4 exclusões
  1. 6 4
      compiler/systems/t_go32v2.pas

+ 6 - 4
compiler/systems/t_go32v2.pas

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