aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-08-21 02:19:25 +0000
committerChristopher Faylor <me@cgf.cx>2003-08-21 02:19:25 +0000
commit0b10f795f1e1bfc48ccd88ce089373881764a83a (patch)
treec862419961e323279ff128e228922094fedf0d76 /winsup
parent49703eb3f53c12fb0ac3d12ca0beaddfe581cfd4 (diff)
downloadnewlib-0b10f795f1e1bfc48ccd88ce089373881764a83a.zip
newlib-0b10f795f1e1bfc48ccd88ce089373881764a83a.tar.gz
newlib-0b10f795f1e1bfc48ccd88ce089373881764a83a.tar.bz2
* speclib: Fix created lib to avoid "File truncated" problems.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rwxr-xr-xwinsup/cygwin/speclib13
2 files changed, 17 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f3219d0..03a7ed5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
index c686343..4a08ab7 100755
--- a/winsup/cygwin/speclib
+++ b/winsup/cygwin/speclib
@@ -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'