* speclib: Fix created lib to avoid "File truncated" problems.

This commit is contained in:
Christopher Faylor 2003-08-21 02:19:25 +00:00
parent 49703eb3f5
commit 0b10f795f1
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2003-08-20 Christopher Faylor <cgf@redhat.com>
* speclib: Fix created lib to avoid "File truncated" problems.
2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
* exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a

View File

@ -37,3 +37,16 @@ else
fi
/bin/rm -f $lib
$ar crus $lib *.o
export lib;
perl -pi.bak -- - $lib << 'EOF'
BEGIN {
binmode STDIN;
binmode STDOUT;
$lib = ($ENV{lib} =~ m!/([^/]+)$!o)[0] || $ENV{lib};
$lib =~ s/\.a//o;
my $pad = length('cygwin1_dll') - length($lib);
die "speclib: library name too long (" . length($lib) . ")\n" if $pad < 0;
$lib = "__head_$lib" . "\0" x $pad;
}
s/__head_cygwin1_dll/$lib/g;
'EOF'