Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Date: Tue, 9 Oct 2001 21:54:13 -0400 From: Christopher Faylor To: cygwin-apps AT cygwin DOT com Subject: Re: GCC patches Message-ID: <20011009215413.A14607@redhat.com> Reply-To: cygwin-apps AT cygwin DOT com Mail-Followup-To: cygwin-apps AT cygwin DOT com References: <20011010014758 DOT 10048 DOT qmail AT web14505 DOT mail DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011010014758.10048.qmail@web14505.mail.yahoo.com> User-Agent: Mutt/1.3.21i On Wed, Oct 10, 2001 at 11:47:58AM +1000, Danny Smith wrote: > > Hello all > >I want to submit following to GCC patches for branch and trunk. >These are slightly modified from the local changes for >building gcc-2.95.3 for mingw. Any comments? > >At the end of mingw32.h, there is this: >/* Override Cygwin's definition. This is necessary now due to the way > Cygwin profiling code is written. Once "fixed", we can remove this. >*/ >#undef SUBTARGET_PROLOGUE > >I notice that Cygwin's definition has changed. It may now be >"fixed" for mingw, but for the nonce I am leaving the #undef in. I wonder what this about is and who changed it. I will apply these patches if you submit them to gcc-patches but I notice that there was a wrapping problem on at least one line below. Could you fix that prior to submitting the patch? cgf > >ChangeLog > > 2001-10-09 Danny Smith > > * config/i386/mingw32.h (WIN32_BUILD_RELOCATABLE_PACKAGE): New > define. (Thanks to Mumit Khan for suggesting macro name). > (CPP_PREDEFINES): Define __MINGW32__ but don't set value; add > more WIN32 defines. > (STANDARD_INCLUDE_DIR): Remove i386- from directory name. > (STANDARD_INCLUDE_COMPONENT): Change to MINGW. > (MATH_LIBRARY): Undef before definition. > (OUTPUT_QUOTED_STRING): Likewise. > * config/i386/cygwin.h: Use WIN32_BUILD_RELOCATABLE_PACKAGE. > > > >Index: gcc/gcc/config/i386/cygwin.h >=================================================================== >RCS file: /cvs/gcc/gcc/gcc/config/i386/cygwin.h,v >retrieving revision 1.51 >diff -u -p -r1.51 cygwin.h >--- cygwin.h 2001/09/21 01:27:04 1.51 >+++ cygwin.h 2001/10/08 21:09:49 >@@ -461,6 +461,9 @@ extern int i386_pe_dllimport_name_p PARA > #define SET_ASM_OP "\t.set\t" > #endif > >+/* Override GCC's relative pathname lookup (ie., relocatability) >unless >+ otherwise told by other subtargets. */ >+#ifndef WIN32_BUILD_RELOCATABLE_PACKAGE > #undef MD_STARTFILE_PREFIX > #define MD_STARTFILE_PREFIX "/usr/lib/" > >@@ -473,7 +476,8 @@ extern int i386_pe_dllimport_name_p PARA > #undef SYSTEM_INCLUDE_DIR > #undef STANDARD_INCLUDE_DIR > #define STANDARD_INCLUDE_DIR 0 >-#endif >+#endif /* not CROSS_COMPILE */ >+#endif /* not WIN32_BUILD_RELOCATABLE_PACKAGE */ > > #undef TREE > >Index: gcc/gcc/config/i386/mingw32.h >=================================================================== >RCS file: /cvs/gcc/gcc/gcc/config/i386/mingw32.h,v >retrieving revision 1.20 >diff -u -p -r1.20 mingw32.h >--- mingw32.h 2001/04/19 20:28:05 1.20 >+++ mingw32.h 2001/10/08 21:10:58 >@@ -22,6 +22,12 @@ Boston, MA 02111-1307, USA. */ > /* Most of this is the same as for cygwin, except for changing some > specs. */ > >+/* Mingw GCC, unlike Cygwin's, must be relocatable. This macro must be > >+ defined before any other files are included. */ >+#ifndef WIN32_BUILD_RELOCATABLE_PACKAGE >+#define WIN32_BUILD_RELOCATABLE_PACKAGE 1 >+#endif >+ > #include "i386/cygwin.h" > > #define TARGET_EXECUTABLE_SUFFIX ".exe" >@@ -30,15 +36,15 @@ Boston, MA 02111-1307, USA. */ > only difference between the two should be __MSVCRT__ needed to > distinguish MSVC from CRTDLL runtime in mingw headers. */ > #undef CPP_PREDEFINES >-#define CPP_PREDEFINES "-D_WIN32 -DWIN32 \ >- -D__MINGW32__=0.2 -D__MSVCRT__ -DWINNT -D_X86_=1 \ >+#define CPP_PREDEFINES "-D_WIN32 -D__WIN32 -D__WIN32__ -DWIN32 \ >+ -D__MINGW32__ -D__MSVCRT__ -DWINNT -D_X86_=1 \ > -Asystem=winnt" > > /* Specific a different directory for the standard include files. */ > #undef STANDARD_INCLUDE_DIR >-#define STANDARD_INCLUDE_DIR "/usr/local/i386-mingw32/include" >- >-#define STANDARD_INCLUDE_COMPONENT "MINGW32" >+#define STANDARD_INCLUDE_DIR "/usr/local/mingw32/include" >+#undef STANDARD_INCLUDE_COMPONENT >+#define STANDARD_INCLUDE_COMPONENT "MINGW" > > #undef CPP_SPEC > #define CPP_SPEC \ >@@ -75,10 +81,12 @@ Boston, MA 02111-1307, USA. */ > %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s}" > > /* MS runtime does not need a separate math library. */ >+#undef MATH_LIBRARY > #define MATH_LIBRARY "" > > /* Output STRING, a string representing a filename, to FILE. We >canonicalize ^^^^^^^^^^^^^^^^^^^ here > it to be in MS-DOS format. */ >+#undef OUTPUT_QUOTED_STRING > #define OUTPUT_QUOTED_STRING(FILE, STRING) \ > do { \ > char c; \ >