Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-09-15 08:36:43 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-15 08:36:43 +0400
commit74509af276c485bb42f1573eb467f4919f0b243e (patch)
tree58f3cd3d64836dc6c67b93687e8aa549dfda8230
parentd409c077df3e6f376eb1917263765037212ee39a (diff)
* Makefile.in: Generate libcygwin.a during the link pass rather than as a
separate dlltool step. * dcrt0.cc (_dll_crt0): pppid_handle could be NULL. Don't close it if so.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/Makefile.in12
-rw-r--r--winsup/cygwin/dcrt0.cc5
3 files changed, 15 insertions, 9 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c538244da..f50707d71 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+Sat Sep 15 00:28:40 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.in: Generate libcygwin.a during the link pass rather than as
+ a separate dlltool step.
+ * dcrt0.cc (_dll_crt0): pppid_handle could be NULL. Don't close it if
+ so.
+
Fri Sep 14 20:48:18 2001 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (dll_crt0_1): Create vfork main storage here so that it can
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index b9283a2d5..c18a37745 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -142,9 +142,9 @@ GMON_OFILES:= gmon.o mcount.o profil.o
all_host=@all_host@
install_host=@install_host@
-all: new-$(DLL_NAME) $(all_host) all_target
+all: all_target $(all_host)
-all_target: $(LIBGMON_A) $(LIB_NAME) automode.o binmode.o textmode.o
+all_target: $(LIB_NAME) automode.o binmode.o textmode.o $(LIBGMON_A)
all_host: new-$(LIB_NAME) cygrun.exe
@@ -179,10 +179,8 @@ maintainer-clean realclean: clean
# Rule to build libcygwin.a
-$(LIB_NAME): $(DEF_FILE) $(LIBCOS)
- $(DLLTOOL) --as=$(AS) --dllname $(DLL_NAME) --def $(DEF_FILE) --output-lib templib.a
- $(AR) rcv templib.a $(LIBCOS)
- mv templib.a $(LIB_NAME)
+$(LIB_NAME): new-$(DLL_NAME) $(LIBCOS)
+ $(AR) rcv $(LIB_NAME) $(LIBCOS)
# Rule to make stub library used by testsuite
@@ -196,7 +194,7 @@ new-$(LIB_NAME): $(LIB_NAME)
# Rule to build cygwin.dll
new-$(DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) $(LIBC) $(LIBM) Makefile winver_stamp
- $(CXX) $(CXXFLAGS) -nostdlib -Wl,-T$(firstword $^) -shared -o $@ \
+ $(CXX) $(CXXFLAGS) -nostdlib -Wl,-T$(firstword $^) -Wl,--out-implib,$(LIB_NAME) -shared -o $@ \
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
$(DLL_IMPORTS) $(MALLOC_OBJ) $(LIBM) $(LIBC) \
-lstdc++ -lgcc -lshell32 -luuid
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 5402510a7..f347ade63 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -808,7 +808,7 @@ _dll_crt0 ()
hMainProc = GetCurrentProcess ();
DuplicateHandle (hMainProc, GetCurrentThread (), hMainProc,
- &hMainThread, 0, FALSE, DUPLICATE_SAME_ACCESS);
+ &hMainThread, 0, false, DUPLICATE_SAME_ACCESS);
GetStartupInfo (&si);
if (si.cbReserved2 >= EXEC_MAGIC_SIZE &&
@@ -820,7 +820,8 @@ _dll_crt0 ()
case PROC_FORK1:
user_data->forkee = fork_info->cygpid;
case PROC_SPAWN:
- CloseHandle (fork_info->pppid_handle);
+ if (fork_info->pppid_handle)
+ CloseHandle (fork_info->pppid_handle);
case PROC_EXEC:
{
child_proc_info = fork_info;