Replace cat $RESby $CATRES and call CatFileContent method

git-svn-id: trunk@19649 -
This commit is contained in:
pierre 2011-11-18 21:33:24 +00:00
parent 5d6a7dc03d
commit b1bd1d29ec
4 changed files with 23 additions and 20 deletions

View File

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

View File

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

View File

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

View File

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