mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 07:19:27 +02:00
Replace cat $RES
by $CATRES and call CatFileContent method
git-svn-id: trunk@19649 -
This commit is contained in:
parent
5d6a7dc03d
commit
b1bd1d29ec
@ -39,7 +39,7 @@ unit i_win;
|
||||
tf_winlikewidestring,tf_no_pic_supported,
|
||||
tf_no_generic_stackcheck,tf_has_winlike_resources,
|
||||
tf_dwarf_only_local_labels,
|
||||
tf_safecall_exceptions];
|
||||
tf_safecall_exceptions,tf_no_backquote_support];
|
||||
cpu : cpu_i386;
|
||||
unit_env : 'WIN32UNITS';
|
||||
extradefines : 'MSWINDOWS;WINDOWS';
|
||||
@ -105,7 +105,7 @@ unit i_win;
|
||||
tf_winlikewidestring,tf_no_pic_supported,
|
||||
tf_dwarf_only_local_labels,
|
||||
tf_no_generic_stackcheck,tf_has_winlike_resources,
|
||||
tf_safecall_exceptions];
|
||||
tf_safecall_exceptions,tf_no_backquote_support];
|
||||
cpu : cpu_x86_64;
|
||||
unit_env : 'WIN64UNITS';
|
||||
extradefines : 'MSWINDOWS;WINDOWS';
|
||||
@ -169,7 +169,7 @@ unit i_win;
|
||||
flags : [tf_files_case_aware{,tf_winlikewidestring},
|
||||
tf_smartlink_sections,tf_requires_proper_alignment,tf_no_pic_supported,
|
||||
tf_has_winlike_resources,
|
||||
tf_safecall_exceptions];
|
||||
tf_safecall_exceptions,tf_no_backquote_support];
|
||||
cpu : cpu_arm;
|
||||
unit_env : '';
|
||||
extradefines : 'UNDER_CE;WINDOWS;UNICODE';
|
||||
@ -233,7 +233,7 @@ unit i_win;
|
||||
flags : [tf_files_case_aware
|
||||
{,tf_winlikewidestring},tf_smartlink_sections,tf_no_pic_supported,
|
||||
tf_has_winlike_resources,
|
||||
tf_safecall_exceptions];
|
||||
tf_safecall_exceptions,tf_no_backquote_support];
|
||||
cpu : cpu_i386;
|
||||
unit_env : '';
|
||||
extradefines : 'UNDER_CE;WINDOWS;UNICODE';
|
||||
|
@ -191,8 +191,8 @@ procedure TLinkerBeOS.SetDefaultInfo;
|
||||
begin
|
||||
with Info do
|
||||
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`';
|
||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $CATRES';
|
||||
DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $CATRES';
|
||||
DllCmd[2]:='strip --strip-unneeded $EXE';
|
||||
(*
|
||||
ExeCmd[1]:='sh $RES $EXE $OPT $STATIC $STRIP -L.';
|
||||
@ -403,6 +403,7 @@ begin
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$CATRES',CatFileContent(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
|
@ -145,8 +145,8 @@ begin
|
||||
begin
|
||||
if not(target_info.system in systems_darwin) then
|
||||
begin
|
||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE `cat $RES`';
|
||||
DllCmd[1]:='ld $OPT -shared -L. -o $EXE `cat $RES`'
|
||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $CATRES';
|
||||
DllCmd[1]:='ld $OPT -shared -L. -o $EXE $CATRES'
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -155,7 +155,7 @@ begin
|
||||
is loaded below that address. This avoids problems with the
|
||||
strange Windows-compatible resource handling that assumes
|
||||
that addresses below 64kb do not exist.
|
||||
|
||||
|
||||
On 64bit systems, page zero is 4GB by default, so no problems
|
||||
there.
|
||||
}
|
||||
@ -165,16 +165,16 @@ begin
|
||||
programs with problems that require Valgrind will have more
|
||||
than 60KB of data (first 4KB of address space is always invalid)
|
||||
}
|
||||
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE `cat $RES`';
|
||||
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES';
|
||||
if not(cs_gdb_valgrind in current_settings.globalswitches) then
|
||||
ExeCmd[1]:=ExeCmd[1]+' -pagezero_size 0x10000';
|
||||
{$else ndef cpu64bitaddr}
|
||||
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE `cat $RES`';
|
||||
ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES';
|
||||
{$endif ndef cpu64bitaddr}
|
||||
if (apptype<>app_bundle) then
|
||||
DllCmd[1]:='ld $PRTOBJ $OPT $GCSECTIONS -dynamic -dylib -multiply_defined suppress -L. -o $EXE `cat $RES`'
|
||||
DllCmd[1]:='ld $PRTOBJ $OPT $GCSECTIONS -dynamic -dylib -multiply_defined suppress -L. -o $EXE $CATRES'
|
||||
else
|
||||
DllCmd[1]:='ld $PRTOBJ $OPT $GCSECTIONS -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
|
||||
DllCmd[1]:='ld $PRTOBJ $OPT $GCSECTIONS -dynamic -bundle -multiply_defined suppress -L. -o $EXE $CATRES'
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -248,7 +248,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
result:=maybequoted(result);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Function TLinkerBSD.WriteResponseFile(isdll:boolean) : Boolean;
|
||||
@ -502,7 +502,7 @@ begin
|
||||
if not LdSupportsNoResponseFile then
|
||||
LinkRes.Add(')');
|
||||
end;
|
||||
|
||||
|
||||
{ frameworks for Darwin }
|
||||
if IsDarwin then
|
||||
while not FrameworkFiles.empty do
|
||||
@ -510,7 +510,7 @@ begin
|
||||
LinkRes.Add('-framework');
|
||||
LinkRes.Add(FrameworkFiles.GetFirst);
|
||||
end;
|
||||
|
||||
|
||||
{ objects which must be at the end }
|
||||
if linklibc and
|
||||
not IsDarwin Then
|
||||
@ -597,6 +597,7 @@ begin
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$CATRES',CatFileContent(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
@ -646,7 +647,7 @@ begin
|
||||
begin
|
||||
DeleteFile(linkscript.fn);
|
||||
linkscript.free
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
MakeExecutable:=success; { otherwise a recursive call to link method }
|
||||
@ -770,7 +771,7 @@ begin
|
||||
end;
|
||||
if (target_info.system in systems_darwin) then
|
||||
DeleteFile(outputexedir+'linksyms.fpc');
|
||||
end;
|
||||
end;
|
||||
|
||||
MakeSharedLibrary:=success; { otherwise a recursive call to link method }
|
||||
end;
|
||||
|
@ -192,8 +192,8 @@ procedure TLinkerHaiku.SetDefaultInfo;
|
||||
begin
|
||||
with Info do
|
||||
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`';
|
||||
ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $CATRES';
|
||||
DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $CATRES';
|
||||
DllCmd[2]:='strip --strip-unneeded $EXE';
|
||||
(*
|
||||
ExeCmd[1]:='sh $RES $EXE $OPT $STATIC $STRIP -L.';
|
||||
@ -403,6 +403,7 @@ begin
|
||||
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
|
||||
Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
|
||||
Replace(cmdstr,'$OPT',Info.ExtraOptions);
|
||||
Replace(cmdstr,'$CATRES',CatFileContent(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
|
||||
Replace(cmdstr,'$STATIC',StaticStr);
|
||||
Replace(cmdstr,'$STRIP',StripStr);
|
||||
|
Loading…
Reference in New Issue
Block a user