aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rwxr-xr-xwinsup/cygwin/mkimport4
-rwxr-xr-xwinsup/cygwin/speclib9
3 files changed, 14 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index db1e19e..8069d64 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
+ * speclib: Initial stab at cleaning up temp files. More work needed.
+ * mkimport: Ditto.
+
+2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
+
* Makefile.in (clean): Clean globals.h.
(LIBCOS): Depend on globals.h.
diff --git a/winsup/cygwin/mkimport b/winsup/cygwin/mkimport
index 58c6041..99d8ef0 100755
--- a/winsup/cygwin/mkimport
+++ b/winsup/cygwin/mkimport
@@ -77,4 +77,6 @@ for my $f (keys %text) {
}
unlink $libdll;
-exec $ar, 'crus', $libdll, glob('*.o'), @ARGV;
+system $ar, 'crus', $libdll, glob('*.o'), @ARGV;
+unlink glob('*.o');
+exit 1 if $?;
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
index 80ef233..8074408 100755
--- a/winsup/cygwin/speclib
+++ b/winsup/cygwin/speclib
@@ -1,6 +1,6 @@
#!/usr/bin/perl
use Getopt::Long;
-use File::Temp qw'tempdir';
+use File::Temp;
use File::Basename;
use File::Spec;
use strict;
@@ -43,11 +43,14 @@ close $nm_fd;
%extract or die "$0: couldn't find symbols for $lib\n";
-my $dir = tempdir(CLEANUP => 1);
+my $dir = File::Temp->newdir();
chdir $dir;
# print join(' ', '+', $ar, 'x', sort keys %extract), "\n";
my $res = system $ar, 'x', $libdll, sort keys %extract;
die "$0: $ar extraction exited with non-zero status\n" if $res;
unlink $lib;
-exec $ar, 'crus', $lib, sort keys %extract;
+$res = system $ar, 'crus', $lib, sort keys %extract;
+unlink keys %extract;
+die "$0: ar creation of $lib exited with non-zero status\n" if $res;
+exit 0;