OSDN Git Service

* config/i386/cygwin.h: Avoid adding include files if -nostdinc is used.
authorcgf <cgf@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Oct 2001 21:57:20 +0000 (21:57 +0000)
committercgf <cgf@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Oct 2001 21:57:20 +0000 (21:57 +0000)
* config/i386/mingw32.h (WIN32_NO_ABSOLUTE_INST_DIRS): New define.
(Thanks to Chris Faylor 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_NO_ABSOLUTE_INST_DIRS.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46161 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/cygwin.h
gcc/config/i386/mingw32.h
gcc/config/i386/win32.h

index 29db45c..6bc3557 100644 (file)
@@ -1,3 +1,20 @@
+2001-10-10  Christopher Faylor <cgf@redhat.com>
+
+       * config/i386/cygwin.h: Avoid adding include files if -nostdinc is
+       used.
+
+2001-10-10  Danny Smith  <danny_r_smith_2001@yahoo.co.nz>
+
+       * config/i386/mingw32.h (WIN32_NO_ABSOLUTE_INST_DIRS): New define.
+       (Thanks to Chris Faylor 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_NO_ABSOLUTE_INST_DIRS.
+
 2001-10-10  Richard Henderson  <rth@redhat.com>
 
        * unwind-dw2-fde.c (fde_compare_t): Change return type to int.
index 138d96f..65e5f7f 100644 (file)
@@ -66,24 +66,24 @@ Boston, MA 02111-1307, USA. */
 #define CPP_PREDEFINES "-D_X86_=1 -Asystem=winnt"
 
 #ifdef CROSS_COMPILE
-#define CYGWIN_INCLUDES "-idirafter " CYGWIN_CROSS_DIR "/include"
-#define W32API_INC "-idirafter " CYGWIN_CROSS_DIR "/include/w32api"
+#define CYGWIN_INCLUDES "%{!nostdinc:-idirafter " CYGWIN_CROSS_DIR "/include}"
+#define W32API_INC "%{!nostdinc:-idirafter " CYGWIN_CROSS_DIR "/include/w32api}"
 #define W32API_LIB "-L" CYGWIN_CROSS_DIR "/lib/w32api/"
 #define CYGWIN_LIB CYGWIN_CROSS_DIR "/lib"
 #define MINGW_LIBS "-L" CYGWIN_CROSS_DIR "/lib/mingw"
-#define MINGW_INCLUDES "-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++-3 "\
+#define MINGW_INCLUDES "%{!nostdinc:-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++-3 "\
                       "-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++ "\
-                      "-idirafter " CYGWIN_CROSS_DIR "/include/mingw"
+                      "-idirafter " CYGWIN_CROSS_DIR "/include/mingw}"
 #else
-#define CYGWIN_INCLUDES "-isystem /usr/local/include -idirafter /usr/include"
-#define W32API_INC "-idirafter /usr/include/w32api"
+#define CYGWIN_INCLUDES "%{!nostdinc:-isystem /usr/local/include -idirafter /usr/include}"
+#define W32API_INC "%{!nostdinc:-idirafter /usr/include/w32api}"
 #define W32API_LIB "-L/usr/lib/w32api/"
 #define CYGWIN_LIB "/usr/lib"
 #define MINGW_LIBS "-L/usr/local/lib/mingw -L/usr/lib/mingw"
-#define MINGW_INCLUDES "-isystem /usr/include/mingw/g++-3 "\
+#define MINGW_INCLUDES "%{!nostdinc:-isystem /usr/include/mingw/g++-3 "\
                       "-isystem /usr/include/mingw/g++ "\
                       "-isystem /usr/local/include/mingw" \
-                      "-idirafter /usr/include/mingw"
+                      "-idirafter /usr/include/mingw}"
 #endif
 
 /* Get tree.c to declare a target-specific specialization of
@@ -109,9 +109,9 @@ Boston, MA 02111-1307, USA. */
   %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \
   %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{mthreads:-D_MT} "\
     MINGW_INCLUDES "} \
-  %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix "\
+  %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix "\
     CYGWIN_INCLUDES "}\
-  %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT}\
+  %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}\
   %{!mno-win32:" W32API_INC "}\
 "
 
@@ -120,8 +120,12 @@ Boston, MA 02111-1307, USA. */
   %{shared|mdll: %{mno-cygwin:" MINGW_LIBS " mingw/dllcrt2%O%s}}\
   %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:" MINGW_LIBS " mingw/crt2%O%s}\
   %{pg:gcrt0%O%s}}}\
+  crtbegin%O%s\
 "
 
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend%O%s"
+
 /* Normally, -lgcc is not needed since everything in it is in the DLL, but we
    want to allow things to be added to it when installing new versions of
    GCC without making a new CYGWIN.DLL, so we leave it.  Profiling is handled
@@ -461,6 +465,9 @@ extern int i386_pe_dllimport_name_p PARAMS ((const char *));
 #define SET_ASM_OP "\t.set\t"
 #endif
 
+/* Override GCC's relative pathname lookup (ie., relocatability) unless
+   otherwise told by other subtargets.  */
+#ifndef WIN32_NO_ABSOLUTE_INST_DIRS
 #undef MD_STARTFILE_PREFIX
 #define MD_STARTFILE_PREFIX     "/usr/lib/"
 
@@ -473,7 +480,8 @@ extern int i386_pe_dllimport_name_p PARAMS ((const char *));
 #undef SYSTEM_INCLUDE_DIR
 #undef STANDARD_INCLUDE_DIR
 #define STANDARD_INCLUDE_DIR 0
-#endif
+#endif /* not CROSS_COMPILE */
+#endif /* not WIN32_NO_ABSOLUTE_INST_DIRS */
 
 #undef TREE
 
index ba546d6..bdbeddd 100644 (file)
@@ -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_NO_ABSOLUTE_INST_DIRS
+#define WIN32_NO_ABSOLUTE_INST_DIRS 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.  */
+/* 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;                                      \
index fda2658..fac2d8d 100644 (file)
@@ -201,9 +201,6 @@ extern void i386_pe_unique_section ();
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START " #"
 
-/* DWARF2 Unwinding doesn't work with exception handling yet. */
-#define DWARF2_UNWIND_INFO 0
-
 /* Don't assume anything about the header files. */
 #define NO_IMPLICIT_EXTERN_C