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 Message-ID: <20011010014758.10048.qmail@web14505.mail.yahoo.com> Date: Wed, 10 Oct 2001 11:47:58 +1000 (EST) From: =?iso-8859-1?q?Danny=20Smith?= Subject: GCC patches To: cygwin-apps , mingw-dvlpr MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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. Danny 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 it to be in MS-DOS format. */ +#undef OUTPUT_QUOTED_STRING #define OUTPUT_QUOTED_STRING(FILE, STRING) \ do { \ char c; \ http://travel.yahoo.com.au - Yahoo! Travel - Got Itchy feet? Get inspired!