mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-04 23:49:37 +01:00
* strip created .so file with strip --strip-unneeded
This commit is contained in:
parent
d9402cf275
commit
bd2c49f44f
@ -65,7 +65,7 @@ Type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
ArBin,LDBin,
|
ArBin,LDBin,StripBin,
|
||||||
OutputFile,
|
OutputFile,
|
||||||
DestPath,
|
DestPath,
|
||||||
PPLExt,
|
PPLExt,
|
||||||
@ -261,6 +261,15 @@ begin
|
|||||||
Error('Error: Wrong PPU Version : '+PPUFn,false);
|
Error('Error: Wrong PPU Version : '+PPUFn,false);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
{ No .o file generated for this ppu, just skip }
|
||||||
|
if (inppu^.header.flags and uf_no_link)<>0 then
|
||||||
|
begin
|
||||||
|
dispose(inppu,done);
|
||||||
|
If Not Quiet then
|
||||||
|
Writeln (' No files.');
|
||||||
|
DoPPU:=true;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
{ Already a lib? }
|
{ Already a lib? }
|
||||||
if (inppu^.header.flags and uf_in_library)<>0 then
|
if (inppu^.header.flags and uf_in_library)<>0 then
|
||||||
begin
|
begin
|
||||||
@ -452,7 +461,11 @@ begin
|
|||||||
If MakeStatic then
|
If MakeStatic then
|
||||||
Err:=Shell(arbin+' rs '+outputfile+' '+names)<>0
|
Err:=Shell(arbin+' rs '+outputfile+' '+names)<>0
|
||||||
else
|
else
|
||||||
Err:=Shell(ldbin+' -shared -o '+OutputFile+' '+names)<>0;
|
begin
|
||||||
|
Err:=Shell(ldbin+' -shared -o '+OutputFile+' '+names)<>0;
|
||||||
|
if not Err then
|
||||||
|
Shell(stripbin+' --strip-unneeded '+OutputFile);
|
||||||
|
end;
|
||||||
If Err then
|
If Err then
|
||||||
Error('Fatal: Library building stage failed.',true);
|
Error('Fatal: Library building stage failed.',true);
|
||||||
{ Rename to the destpath }
|
{ Rename to the destpath }
|
||||||
@ -492,6 +505,7 @@ begin
|
|||||||
PPLExt:='ppu';
|
PPLExt:='ppu';
|
||||||
ArBin:='ar';
|
ArBin:='ar';
|
||||||
LdBin:='ld';
|
LdBin:='ld';
|
||||||
|
StripBin:='strip';
|
||||||
repeat
|
repeat
|
||||||
c:=Getopt (ShortOpts);
|
c:=Getopt (ShortOpts);
|
||||||
Case C of
|
Case C of
|
||||||
@ -582,7 +596,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 1999-11-23 09:44:15 peter
|
Revision 1.7 1999-11-25 00:00:39 peter
|
||||||
|
* strip created .so file with strip --strip-unneeded
|
||||||
|
|
||||||
|
Revision 1.6 1999/11/23 09:44:15 peter
|
||||||
* updated
|
* updated
|
||||||
|
|
||||||
Revision 1.5 1999/07/29 01:40:21 peter
|
Revision 1.5 1999/07/29 01:40:21 peter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user