delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/01/11/02:25:37

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-Id: <200001110728.BAA23602@pluto.xraylith.wisc.edu>
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: (patch) Re: mingw headers are installed over cygwin headers.
In-Reply-To: Your message of "10 Jan 2000 21:45:27 +0900."
<s1sd7raccyg DOT fsf AT jaist DOT ac DOT jp>
Date: Tue, 11 Jan 2000 01:28:37 -0600
From: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>

Mingw include install fix (plus a missing entry point for DLL when building
under DLL). 

Changes to configure not include, so please rebuild configure.

Tue Jan 11 01:18:01 2000  Mumit Khan  <khan AT xraylith DOT wisc DOT edu>

	* configure.in (HEADER_SUBDIRS): New variable. Substitute. 
	* Makefile.in (HEADER_SUBDIRS): New variable.
	(install): Use to install Mingw headers to a subdirectory if building
	under Cygwin.
	(DLL_CC_STUFF): Add DLL entry point.

Index: configure.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/cygwin-dev/winsup/mingw/configure.in,v
retrieving revision 1.2
diff -u -3 -p -r1.2 configure.in
--- configure.in	2000/01/11 07:19:58	1.2
+++ configure.in	2000/01/11 07:20:48
@@ -84,6 +84,7 @@ AC_CANONICAL_SYSTEM
 
 configdirs=""
 SUBDIRS=""
+HEADER_SUBDIR=""
 
 case "$target_os" in
 *mingw32msvc*)
@@ -105,6 +106,8 @@ case "$target_os" in
   # overwrite Cygwin's one. Likewise for libgmon.a.
   LIBM_A=
   LIBGMON_A=
+  # Install mingw headers in mingw subdirectory.
+  HEADER_SUBDIR="mingw"
   ;;
 *)
   # Build it for CRTDLL by default.
@@ -132,6 +135,7 @@ AC_SUBST(THREAD_DLL)
 AC_SUBST(LIBM_A)
 AC_SUBST(LIBGMON_A)
 AC_SUBST(SUBDIRS)
+AC_SUBST(HEADER_SUBDIR)
 
 AC_PROG_INSTALL
 AC_OUTPUT(Makefile)
Index: Makefile.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/cygwin-dev/winsup/mingw/Makefile.in,v
retrieving revision 1.2
diff -u -3 -p -r1.2 Makefile.in
--- Makefile.in	2000/01/11 07:19:58	1.2
+++ Makefile.in	2000/01/11 07:21:56
@@ -33,6 +33,10 @@ datadir = @datadir@
 infodir = @infodir@
 includedir = @includedir@
 
+# The Mingw headers are installed under a subdirectory of 
+# $(tooldir)/include when configuring in Cygwin.
+HEADER_SUBDIR = @HEADER_SUBDIR@
+
 SHELL = /bin/sh
 
 INSTALL = @INSTALL@
@@ -132,6 +136,7 @@ xx_$(THREAD_DLL_NAME) xx_mingwthrd.def: 
 
 DLL_OFILES        = mthr.o mthr_init.o
 DLL_CC_STUFF      = -B./ -mdll $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
+		    -Wl,--entry,_DllMainCRTStartup AT 12 \
                     $(DLL_OFILES)
 DLL_DLLTOOL_STUFF = --as=$(AS) --dllname $(THREAD_DLL_NAME) \
                     --def mingwthrd.def \
@@ -198,9 +203,10 @@ install: all
 		$(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
 	done
 	for sub in . sys ; do \
-	$(mkinstalldirs) $(tooldir)/include/$$sub ; \
+		dstdir=$(tooldir)/include/$(HEADER_SUBDIR)/$$sub ; \
+		$(mkinstalldirs) $$dstdir ; \
 		for i in $(srcdir)/include/$$sub/*.h ; do \
-		  $(INSTALL_DATA) $$i $(tooldir)/include/$$sub/`basename $$i` ; \
+		  $(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
 		done ; \
 	done
 	@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019