mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 14:29:34 +02:00
* maybequoted() added
This commit is contained in:
parent
79f84b67ab
commit
dc363f29bc
@ -196,7 +196,7 @@ Implementation
|
||||
{$ifdef m68k}
|
||||
cpuinfo,
|
||||
{$endif m68k}
|
||||
cpubase,aasmcpu
|
||||
aasmcpu
|
||||
;
|
||||
|
||||
var
|
||||
@ -400,7 +400,7 @@ Implementation
|
||||
{$ELSE USE_SYSUTILS}
|
||||
begin
|
||||
swapvectors;
|
||||
exec(command,para);
|
||||
exec(maybequoted(command),para);
|
||||
swapvectors;
|
||||
if (doserror<>0) then
|
||||
begin
|
||||
@ -466,13 +466,13 @@ Implementation
|
||||
{$endif}
|
||||
if (cs_link_on_target in aktglobalswitches) then
|
||||
begin
|
||||
Replace(s,'$ASM',ScriptFixFileName(AsmFile));
|
||||
Replace(s,'$OBJ',ScriptFixFileName(ObjFile));
|
||||
Replace(s,'$ASM',maybequoted(ScriptFixFileName(AsmFile)));
|
||||
Replace(s,'$OBJ',maybequoted(ScriptFixFileName(ObjFile)));
|
||||
end
|
||||
else
|
||||
begin
|
||||
Replace(s,'$ASM',AsmFile);
|
||||
Replace(s,'$OBJ',ObjFile);
|
||||
Replace(s,'$ASM',maybequoted(AsmFile));
|
||||
Replace(s,'$OBJ',maybequoted(ObjFile));
|
||||
end;
|
||||
if CallAssembler(FindAssembler,s) then
|
||||
RemoveAsm
|
||||
@ -1683,7 +1683,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.82 2004-11-09 22:32:59 peter
|
||||
Revision 1.83 2004-12-22 16:32:45 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.82 2004/11/09 22:32:59 peter
|
||||
* small m68k updates to bring it up2date
|
||||
* give better error for external local variable
|
||||
|
||||
|
@ -564,7 +564,7 @@ begin
|
||||
{ Call AR }
|
||||
smartpath:=current_module.outputpath^+FixPath(lower(current_module.modulename^)+target_info.smartext,false);
|
||||
SplitBinCmd(target_ar.arcmd,binstr,cmdstr);
|
||||
Replace(cmdstr,'$LIB',current_module.staticlibfilename^);
|
||||
Replace(cmdstr,'$LIB',maybequoted(current_module.staticlibfilename^));
|
||||
Replace(cmdstr,'$FILES',FixFileName(smartpath+current_module.asmprefix^+'*'+target_info.objext));
|
||||
success:=DoExec(FindUtil(binstr),cmdstr,false,true);
|
||||
{ Clean up }
|
||||
@ -706,7 +706,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.46 2004-11-03 22:22:51 peter
|
||||
Revision 1.47 2004-12-22 16:32:45 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.46 2004/11/03 22:22:51 peter
|
||||
First check outputunitdir/outputexedir for .o file
|
||||
|
||||
Revision 1.45 2004/10/14 16:25:39 mazen
|
||||
|
@ -210,7 +210,7 @@ begin
|
||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE `cat $RES`';
|
||||
DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE `cat $RES`';
|
||||
DllCmd[2]:='strip --strip-unneeded $EXE';
|
||||
{
|
||||
(*
|
||||
ExeCmd[1]:='sh $RES $EXE $OPT $STATIC $STRIP -L.';
|
||||
{ ExeCmd[1]:='sh $RES $EXE $OPT $DYNLINK $STATIC $STRIP -L.';}
|
||||
DllCmd[1]:='sh $RES $EXE $OPT -L.';
|
||||
@ -218,7 +218,7 @@ begin
|
||||
{ DllCmd[1]:='sh $RES $EXE $OPT -L. -g -nostart -soname=$EXE';
|
||||
} DllCmd[2]:='strip --strip-unneeded $EXE';
|
||||
{ DynamicLinker:='/lib/ld-beos.so.2';}
|
||||
}
|
||||
*)
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -269,13 +269,13 @@ begin
|
||||
HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('-L'+HPath.Str);
|
||||
LinkRes.Add(maybequoted('-L'+HPath.Str));
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
HPath:=TStringListItem(LibrarySearchPath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('-L'+HPath.Str);
|
||||
LinkRes.Add(maybequoted('-L'+HPath.Str));
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
|
||||
@ -309,7 +309,7 @@ begin
|
||||
begin
|
||||
s:=ObjectFiles.GetFirst;
|
||||
if s<>'' then
|
||||
LinkRes.AddFileName(s);
|
||||
LinkRes.AddFileName(maybequoted(s));
|
||||
end;
|
||||
|
||||
{ LinkRes.Add('-lroot \');
|
||||
@ -322,7 +322,7 @@ begin
|
||||
While not StaticLibFiles.Empty do
|
||||
begin
|
||||
S:=StaticLibFiles.GetFirst;
|
||||
LinkRes.AddFileName(s)
|
||||
LinkRes.AddFileName(maybequoted(s))
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -406,9 +406,9 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
||||
@ -458,9 +458,9 @@ var
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
||||
@ -470,7 +470,7 @@ var
|
||||
if success and (cs_link_strip in aktglobalswitches) then
|
||||
begin
|
||||
SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
|
||||
success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
|
||||
end;
|
||||
|
||||
@ -496,7 +496,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.16 2004-11-19 16:30:24 peter
|
||||
Revision 1.17 2004-12-22 16:32:45 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.16 2004/11/19 16:30:24 peter
|
||||
* fixed setting of mangledname when importing
|
||||
|
||||
Revision 1.15 2004/11/08 22:09:59 peter
|
||||
|
@ -356,18 +356,18 @@ begin
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
if LdSupportsNoResponseFile then
|
||||
LinkRes.Add('-L'+HPath.Str)
|
||||
LinkRes.Add(maybequoted('-L'+HPath.Str))
|
||||
else
|
||||
LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
|
||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
HPath:=TStringListItem(LibrarySearchPath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
if LdSupportsNoResponseFile then
|
||||
LinkRes.Add('-L'+HPath.Str)
|
||||
LinkRes.Add(maybequoted('-L'+HPath.Str))
|
||||
else
|
||||
LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
|
||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
|
||||
@ -390,7 +390,7 @@ begin
|
||||
begin
|
||||
s:=ObjectFiles.GetFirst;
|
||||
if s<>'' then
|
||||
LinkRes.AddFileName(s);
|
||||
LinkRes.AddFileName(maybequoted(s));
|
||||
end;
|
||||
if not LdSupportsNoResponseFile then
|
||||
LinkRes.Add(')');
|
||||
@ -403,7 +403,7 @@ begin
|
||||
While not StaticLibFiles.Empty do
|
||||
begin
|
||||
S:=StaticLibFiles.GetFirst;
|
||||
LinkRes.AddFileName(s)
|
||||
LinkRes.AddFileName(maybequoted(s))
|
||||
end;
|
||||
if not LdSupportsNoResponseFile then
|
||||
LinkRes.Add(')');
|
||||
@ -514,9 +514,9 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
||||
@ -545,16 +545,16 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
|
||||
|
||||
{ Strip the library ? }
|
||||
if success and (cs_link_strip in aktglobalswitches) then
|
||||
begin
|
||||
SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
|
||||
success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
|
||||
end;
|
||||
|
||||
@ -612,7 +612,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.26 2004-11-19 16:30:24 peter
|
||||
Revision 1.27 2004-12-22 16:32:45 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.26 2004/11/19 16:30:24 peter
|
||||
* fixed setting of mangledname when importing
|
||||
|
||||
Revision 1.25 2004/11/19 14:21:44 marco
|
||||
|
@ -484,11 +484,11 @@ begin
|
||||
Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+1023) shr 10));
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$APPTYPE',AppTypeStr);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RSRC',RsrcStr);
|
||||
Replace(cmdstr,'$OUT',OutName);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$OUT',maybequoted(OutName));
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
if i<>3 then
|
||||
success:=DoExec(FindUtil(binstr),cmdstr,(i=1),false)
|
||||
else
|
||||
@ -516,7 +516,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.12 2004-12-05 12:25:48 hajny
|
||||
Revision 1.13 2004-12-22 16:32:45 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.12 2004/12/05 12:25:48 hajny
|
||||
* fix for compilation on 8.3 filesystems
|
||||
|
||||
Revision 1.11 2004/11/17 22:22:12 peter
|
||||
|
@ -328,20 +328,20 @@ begin
|
||||
HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
|
||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
HPath:=TStringListItem(LibrarySearchPath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
|
||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
|
||||
LinkRes.Add('INPUT(');
|
||||
{ add objectfiles, start with prt0 always }
|
||||
if prtobj<>'' then
|
||||
LinkRes.AddFileName(FindObjectFile(prtobj,'',false));
|
||||
LinkRes.AddFileName(maybequoted(FindObjectFile(prtobj,'',false)));
|
||||
{ try to add crti and crtbegin if linking to C }
|
||||
if linklibc then
|
||||
begin
|
||||
@ -355,7 +355,7 @@ begin
|
||||
begin
|
||||
s:=ObjectFiles.GetFirst;
|
||||
if s<>'' then
|
||||
LinkRes.AddFileName(s);
|
||||
LinkRes.AddFileName(maybequoted(s));
|
||||
end;
|
||||
LinkRes.Add(')');
|
||||
|
||||
@ -366,7 +366,7 @@ begin
|
||||
While not StaticLibFiles.Empty do
|
||||
begin
|
||||
S:=StaticLibFiles.GetFirst;
|
||||
LinkRes.AddFileName(s)
|
||||
LinkRes.AddFileName(maybequoted(s))
|
||||
end;
|
||||
LinkRes.Add(')');
|
||||
end;
|
||||
@ -463,9 +463,9 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
|
||||
@ -503,9 +503,9 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$INIT',InitStr);
|
||||
Replace(cmdstr,'$FINI',FiniStr);
|
||||
Replace(cmdstr,'$SONAME',SoNameStr);
|
||||
@ -515,7 +515,7 @@ begin
|
||||
if success and (cs_link_strip in aktglobalswitches) then
|
||||
begin
|
||||
SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
|
||||
success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
|
||||
end;
|
||||
|
||||
@ -578,7 +578,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.31 2004-12-19 14:03:16 florian
|
||||
Revision 1.32 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.31 2004/12/19 14:03:16 florian
|
||||
* dyn. linker path fixed for x86_64
|
||||
|
||||
Revision 1.30 2004/11/17 22:22:12 peter
|
||||
|
@ -203,9 +203,9 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',ScriptFixFileName(current_module.exefilename^));
|
||||
Replace(cmdstr,'$EXE',maybequoted(ScriptFixFileName(current_module.exefilename^)));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',ScriptFixFileName(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$RES',maybequoted(ScriptFixFileName(outputexedir+Info.ResName)));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
||||
@ -245,7 +245,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.15 2004-11-19 16:30:24 peter
|
||||
Revision 1.16 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.15 2004/11/19 16:30:24 peter
|
||||
* fixed setting of mangledname when importing
|
||||
|
||||
Revision 1.14 2004/11/11 19:31:33 peter
|
||||
|
@ -92,9 +92,7 @@ begin
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
s:=HPath.Str;
|
||||
if not (cs_link_on_target in aktglobalswitches) then
|
||||
s:=GetShortName(s)
|
||||
else
|
||||
if (cs_link_on_target in aktglobalswitches) then
|
||||
s:=ScriptFixFileName(s);
|
||||
LinkRes.Add('-L'+s);
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
@ -103,26 +101,20 @@ begin
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
s:=HPath.Str;
|
||||
if not (cs_link_on_target in aktglobalswitches) then
|
||||
s:=GetShortName(s);
|
||||
if s<>'' then
|
||||
LinkRes.Add('SEARCH_DIR('+s+')');
|
||||
LinkRes.Add('SEARCH_DIR('+maybequoted(s)+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
|
||||
LinkRes.Add('INPUT (');
|
||||
{ add objectfiles, start with prt0 always }
|
||||
s:=FindObjectFile('prt0','',false);
|
||||
if not (cs_link_on_target in aktglobalswitches) then
|
||||
s:=GetShortName(s);
|
||||
LinkRes.AddFileName(s);
|
||||
while not ObjectFiles.Empty do
|
||||
begin
|
||||
s:=ObjectFiles.GetFirst;
|
||||
if not (cs_link_on_target in aktglobalswitches) then
|
||||
s:=GetShortName(s);
|
||||
if s<>'' then
|
||||
LinkRes.AddFileName(s);
|
||||
LinkRes.AddFileName(maybequoted(s));
|
||||
end;
|
||||
LinkRes.Add(')');
|
||||
|
||||
@ -133,9 +125,7 @@ begin
|
||||
While not StaticLibFiles.Empty do
|
||||
begin
|
||||
S:=StaticLibFiles.GetFirst;
|
||||
if not (cs_link_on_target in aktglobalswitches) then
|
||||
s:=GetShortName(s);
|
||||
LinkRes.AddFileName(s);
|
||||
LinkRes.AddFileName(maybequoted(s));
|
||||
end;
|
||||
LinkRes.Add(')');
|
||||
end;
|
||||
@ -190,12 +180,9 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
if pos(' ',current_module.exefilename^)>0 then
|
||||
Replace(cmdstr,'$EXE','"'+ScriptFixFileName(current_module.exefilename^)+'"')
|
||||
else
|
||||
Replace(cmdstr,'$EXE',ScriptFixFileName(current_module.exefilename^));
|
||||
Replace(cmdstr,'$EXE',maybequoted(ScriptFixFileName(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',ScriptFixFileName(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$RES',maybequoted(ScriptFixFileName(outputexedir+Info.ResName)));
|
||||
success:=DoExec(FindUtil(BinStr),cmdstr,true,false);
|
||||
|
||||
{ Stripping Enabled? }
|
||||
@ -205,7 +192,7 @@ begin
|
||||
if success and (cs_link_strip in aktglobalswitches) then
|
||||
begin
|
||||
SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
|
||||
end;
|
||||
|
||||
@ -228,7 +215,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 2004-10-25 15:38:41 peter
|
||||
Revision 1.9 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.8 2004/10/25 15:38:41 peter
|
||||
* heap and heapsize removed
|
||||
* checkpointer fixes
|
||||
|
||||
|
@ -589,10 +589,10 @@ begin
|
||||
{ Call linker, this will generate a new object file that will be passed
|
||||
to nlmconv. Otherwise we could not create nlms without debug info }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$TMPOBJ',outputexedir+tmpLinkFileName);
|
||||
Replace(cmdstr,'$TMPOBJ',maybequoted(outputexedir+tmpLinkFileName));
|
||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||
success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
|
||||
|
||||
@ -606,7 +606,7 @@ begin
|
||||
NLMConvLinkFile.writetodisk;
|
||||
NLMConvLinkFile.Free;
|
||||
SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
|
||||
Replace(cmdstr,'$RES',outputexedir+'n'+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+'n'+Info.ResName));
|
||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||
success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
|
||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||
@ -646,7 +646,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 2004-11-25 18:46:11 armin
|
||||
Revision 1.12 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.11 2004/11/25 18:46:11 armin
|
||||
* added utilsprefix for as,ld and nlmconv
|
||||
|
||||
Revision 1.10 2004/11/19 16:30:24 peter
|
||||
|
@ -520,10 +520,10 @@ begin
|
||||
{ Call linker, this will generate a new object file that will be passed
|
||||
to nlmconv. Otherwise we could not create nlms without debug info }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$TMPOBJ',outputexedir+tmpLinkFileName);
|
||||
Replace(cmdstr,'$TMPOBJ',maybequoted(outputexedir+tmpLinkFileName));
|
||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||
success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
|
||||
|
||||
@ -537,7 +537,7 @@ begin
|
||||
NLMConvLinkFile.writetodisk;
|
||||
NLMConvLinkFile.Free;
|
||||
SplitBinCmd(Info.ExeCmd[2],binstr,cmdstr);
|
||||
Replace(cmdstr,'$RES',outputexedir+'n'+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+'n'+Info.ResName));
|
||||
Comment (v_debug,'Executing '+BinStr+' '+cmdstr);
|
||||
success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
|
||||
if (success) and not(cs_link_extern in aktglobalswitches) then
|
||||
@ -564,7 +564,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.22 2004-11-25 18:46:11 armin
|
||||
Revision 1.23 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.22 2004/11/25 18:46:11 armin
|
||||
* added utilsprefix for as,ld and nlmconv
|
||||
|
||||
Revision 1.21 2004/11/19 16:30:24 peter
|
||||
|
@ -41,9 +41,9 @@ implementation
|
||||
strings,
|
||||
dos,
|
||||
cutils,cclasses,
|
||||
globtype,comphook,systems,symconst,symsym,symdef,
|
||||
globtype,systems,symconst,symdef,
|
||||
globals,verbose,fmodule,script,
|
||||
import,link,i_os2,ppu;
|
||||
import,link,i_os2;
|
||||
|
||||
type
|
||||
timportlibos2=class(timportlib)
|
||||
@ -383,13 +383,13 @@ begin
|
||||
HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('-L'+HPath.Str);
|
||||
LinkRes.Add(maybequoted('-L'+HPath.Str));
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
HPath:=TStringListItem(LibrarySearchPath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('-L'+HPath.Str);
|
||||
LinkRes.Add(maybequoted('-L'+HPath.Str));
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
|
||||
@ -399,7 +399,7 @@ begin
|
||||
begin
|
||||
s:=ObjectFiles.GetFirst;
|
||||
if s<>'' then
|
||||
LinkRes.AddFileName(s);
|
||||
LinkRes.AddFileName(maybequoted(s));
|
||||
end;
|
||||
|
||||
{ Write staticlibraries }
|
||||
@ -407,7 +407,7 @@ begin
|
||||
While not StaticLibFiles.Empty do
|
||||
begin
|
||||
S:=StaticLibFiles.GetFirst;
|
||||
LinkRes.AddFileName(s)
|
||||
LinkRes.AddFileName(maybequoted(s))
|
||||
end;
|
||||
|
||||
{ Write sharedlibraries like -l<lib>, also add the needed dynamic linker
|
||||
@ -484,11 +484,11 @@ begin
|
||||
Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+1023) shr 10));
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$APPTYPE',AppTypeStr);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RSRC',RsrcStr);
|
||||
Replace(cmdstr,'$OUT',OutName);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$OUT',maybequoted(OutName));
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
if i<>3 then
|
||||
success:=DoExec(FindUtil(binstr),cmdstr,(i=1),false)
|
||||
else
|
||||
@ -516,7 +516,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.16 2004-12-05 12:25:48 hajny
|
||||
Revision 1.17 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.16 2004/12/05 12:25:48 hajny
|
||||
* fix for compilation on 8.3 filesystems
|
||||
|
||||
Revision 1.15 2004/11/17 22:22:12 peter
|
||||
|
@ -183,7 +183,7 @@ begin
|
||||
begin
|
||||
Replace(cmdstr,'$EXE',MaybeQuote(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$SCRIPT',FindUtil('palm.ld'));
|
||||
Replace(cmdstr,'$APPNAME',palmos_applicationname);
|
||||
@ -213,7 +213,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 2004-06-20 08:55:32 florian
|
||||
Revision 1.4 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.3 2004/06/20 08:55:32 florian
|
||||
* logs truncated
|
||||
|
||||
}
|
||||
|
@ -292,13 +292,13 @@ begin
|
||||
HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
|
||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
HPath:=TStringListItem(LibrarySearchPath.First);
|
||||
while assigned(HPath) do
|
||||
begin
|
||||
LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
|
||||
LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
|
||||
@ -319,7 +319,7 @@ begin
|
||||
begin
|
||||
s:=ObjectFiles.GetFirst;
|
||||
if s<>'' then
|
||||
LinkRes.AddFileName(s);
|
||||
LinkRes.AddFileName(maybequoted(s));
|
||||
end;
|
||||
LinkRes.Add(')');
|
||||
|
||||
@ -330,7 +330,7 @@ begin
|
||||
While not StaticLibFiles.Empty do
|
||||
begin
|
||||
S:=StaticLibFiles.GetFirst;
|
||||
LinkRes.AddFileName(s)
|
||||
LinkRes.AddFileName(maybequoted(s))
|
||||
end;
|
||||
LinkRes.Add(')');
|
||||
end;
|
||||
@ -416,9 +416,9 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.exefilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
||||
@ -448,16 +448,16 @@ begin
|
||||
|
||||
{ Call linker }
|
||||
SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$RES',outputexedir+Info.ResName);
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
|
||||
|
||||
{ Strip the library ? }
|
||||
if success and (cs_link_strip in aktglobalswitches) then
|
||||
begin
|
||||
SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
|
||||
success:=DoExec(utilsprefix+FindUtil(binstr),cmdstr,true,false);
|
||||
end;
|
||||
|
||||
@ -491,7 +491,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.15 2004-11-19 16:30:24 peter
|
||||
Revision 1.16 2004-12-22 16:32:46 peter
|
||||
* maybequoted() added
|
||||
|
||||
Revision 1.15 2004/11/19 16:30:24 peter
|
||||
* fixed setting of mangledname when importing
|
||||
|
||||
Revision 1.14 2004/11/08 22:09:59 peter
|
||||
|
Loading…
Reference in New Issue
Block a user