This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: speclib vs. -lc trouble.


  Hi Eric *waves*

zzzzzzzzzzzzzzzzz......
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/Makefile.in,v
retrieving revision 1.223
diff -p -u -r1.223 Makefile.in
--- Makefile.in	9 Apr 2009 21:02:53 -0000	1.223
+++ Makefile.in	10 Apr 2009 04:46:55 -0000
@@ -105,7 +105,7 @@ LIBGMON_A:=libgmon.a
 CYGWIN_START:=crt0.o
 GMON_START:=gcrt0.o
 
-speclib=${word 1, $^} "${NM}" "${AR}" $(wordlist 2, $(words $^), $^)
+speclib=${word 1, $^} "${NM}" "${AR}" ${@F} $(wordlist 2, $(words $^), $^)
 
 # Some things want these from libc, but they have their own static
 # data which apps can get to, which is a pain in the dll, so we
@@ -443,22 +443,22 @@ $(srcdir)/devices.cc: gendevices devices
 	${wordlist 1,2,$^} $@
 
 ${CURDIR}/libc.a: speclib ${LIB_NAME} ./libm.a libpthread.a libutil.a
-	${speclib} -v ${@F}
+	${speclib} -v 
 
 ${CURDIR}/libm.a: speclib ${LIB_NAME} $(LIBM)
-	${speclib} ${@F}
+	${speclib} 
 
 libpthread.a: speclib ${LIB_NAME} pthread.o thread.o
-	${speclib} ${@F}
+	${speclib}
 
 libutil.a: speclib ${LIB_NAME} bsdlib.o
-	${speclib} ${@F}
+	${speclib}
 
 libdl.a: speclib ${LIB_NAME} dlfcn.o
-	${speclib} ${@F}
+	${speclib}
 
 libresolv.a: speclib ${LIB_NAME} minires.o
-	${speclib} ${@F}
+	${speclib}
 
 ${EXTRALIBS}: lib%.a: %.o
 	$(AR) cru $@ $?
Index: speclib
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/speclib,v
retrieving revision 1.17
diff -p -u -r1.17 speclib
--- speclib	9 Apr 2009 21:02:53 -0000	1.17
+++ speclib	10 Apr 2009 04:46:55 -0000
@@ -14,8 +14,8 @@ GetOptions('static!'=>\$static, 'v|exclu
 
 my $nm = shift;
 my $ar = shift;
-my $libdll = Cwd::abs_path(shift @ARGV);
-my $lib = Cwd::abs_path(pop @ARGV);
+my $lib = shift;
+my $libdll = shift;
 
 open my $nm_fd, '-|', $nm, '-Ap', '--defined-only', @ARGV, $libdll or
   die "$0: execution of $nm for object files failed - $!\n";
@@ -44,10 +44,15 @@ close $nm_fd;
 %extract or die "$0: couldn't find symbols for $lib\n";
 
 my $dir = tempdir(CLEANUP => 1);
+my $cwd = `pwd`;
+chomp $cwd;
 
+system "cp", $libdll, $dir;
 chdir $dir;
-# print join(' ', '+', $ar, 'x', sort keys %extract), "\n";
+
+# print join( $dir . ' ', '+', $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;
+unlink $cwd . "/" . $lib;
+system $ar, 'crus', $lib, sort keys %extract;
+exec "cp", $lib, $cwd . "/" . $lib;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]