cygwin.h (SUBTARGET_OVERRIDE_OPTIONS): New macro to ignore fpic/fPIC for windows32...
authorMumit Khan <khan@xraylith.wisc.edu>
Tue, 9 Feb 1999 23:52:06 +0000 (23:52 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 9 Feb 1999 23:52:06 +0000 (16:52 -0700)
* i386/cygwin.h (SUBTARGET_OVERRIDE_OPTIONS): New macro to ignore
fpic/fPIC for windows32 targets.
* i386/xm-cygwin.h (GET_ENV_PATH_LIST): Replace '\\' in windows32
paths with '/'.
* i386/mingw32.h (CPP_SPEC): Define.
(CPP_PREDEFINES): Add MINGW32 version id.
* i386/crtdll.h (CPP_PREDEFINES): Likewise.

From-SVN: r25121

gcc/ChangeLog
gcc/config/i386/crtdll.h
gcc/config/i386/cygwin.h
gcc/config/i386/mingw32.h
gcc/config/i386/xm-cygwin.h

index c25d9dbd04a9946c7f6f21c99471dcd715e65502..6db6024724b8eec2e5fc36a6ba8e4debdc724248 100644 (file)
@@ -7,6 +7,14 @@ Tue Feb  9 17:27:29 GMT 1999  Nathan Sidwell  <nathan@acm.org>
 
 Tue Feb  9 16:52:22 1999  Mumit Khan  <khan@xraylith.wisc.edu>
 
+       * i386/cygwin.h (SUBTARGET_OVERRIDE_OPTIONS): New macro to ignore 
+       fpic/fPIC for windows32 targets.
+       * i386/xm-cygwin.h (GET_ENV_PATH_LIST): Replace '\\' in windows32
+       paths with '/'.
+       * i386/mingw32.h (CPP_SPEC): Define.
+       (CPP_PREDEFINES): Add MINGW32 version id.
+       * i386/crtdll.h (CPP_PREDEFINES): Likewise.
+
        * Makefile.in (collect2$(exeext)): Delete redundant dependency and
        add missing exeext to target.
 
index f7eaf2b71e63efdd7fb33e18fe69886e44184a72..4334da0bd91cb2de5a707c01583c9cf530687946 100644 (file)
@@ -3,7 +3,7 @@
    as distinct from winnt.h, which is used to build GCC for use with a
    windows style library and tool set and uses the Microsoft tools.
    This variant uses CRTDLL.DLL insted of MSVCRTDLL.DLL.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
 
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES "-Di386 -D_WIN32 -DWIN32 -D__WIN32__ \
-  -D__MINGW32__ -DWINNT  -D_X86_=1 -D__STDC__=1\
+  -D__MINGW32__=0.2 -DWINNT  -D_X86_=1 -D__STDC__=1\
   -D__stdcall=__attribute__((__stdcall__)) \
   -D_stdcall=__attribute__((__stdcall__)) \
   -D__cdecl=__attribute__((__cdecl__)) \
index af0b25e5917f9539eca3248966fc8b9dd8a3e823..1c235358cbfd8686c10436513f0bd70c2085a342 100644 (file)
@@ -2,7 +2,7 @@
    hosting on Windows NT 3.x, using a Unix style C library and tools,
    as distinct from winnt.h, which is used to build GCC for use with a
    windows style library and tool set and uses the Microsoft tools.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -235,6 +235,20 @@ switch_to_section (section, decl)                          \
     fprintf (FILE, "\n");                      \
   } while (0)
 
+/* Don't allow flag_pic to propagate since gas may produce invalid code
+   otherwise. */
+
+#undef  SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS                                     \
+do {                                                                   \
+  if (flag_pic)                                                                \
+    {                                                                  \
+      warning ("-f%s ignored for target (all code is position independent)",\
+              (flag_pic > 1) ? "PIC" : "pic");                         \
+      flag_pic = 0;                                                    \
+    }                                                                  \
+} while (0)                                                            \
+
 /* Define this macro if references to a symbol must be treated
    differently depending on something about the variable or
    function named by the symbol (such as what section it is in).
index 3ef5c5b849c6cee91d60290155e2b3d5979c2d8e..f8da4894ad072dacfd4ff1ed342a7c3b5b105543 100644 (file)
@@ -2,7 +2,7 @@
    hosting on Windows32, using GNU tools and the Windows32 API Library,
    as distinct from winnt.h, which is used to build GCC for use with a
    windows style library and tool set and uses the Microsoft tools.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
    distinguish MSVC from CRTDLL runtime in mingw headers. */
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES "-Di386 -D_WIN32 -DWIN32 -D__WIN32__ \
-  -D__MINGW32__ -D__MSVCRT__ -DWINNT  -D_X86_=1 -D__STDC__=1\
+  -D__MINGW32__=0.2 -D__MSVCRT__ -DWINNT  -D_X86_=1 -D__STDC__=1\
   -D__stdcall=__attribute__((__stdcall__)) \
   -D_stdcall=__attribute__((__stdcall__)) \
   -D__cdecl=__attribute__((__cdecl__)) \
@@ -44,6 +44,9 @@ Boston, MA 02111-1307, USA. */
 
 #define STANDARD_INCLUDE_COMPONENT "MINGW32"
 
+#undef CPP_SPEC
+#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
+
 /* For Windows applications, include more libraries, but always include
    kernel32.  */
 #undef LIB_SPEC
index 4b166ebde75f72f6380a91cbff44a67b771fc26b..e877665b47a06d0bacb676d32ab8a579ffa588d4 100644 (file)
@@ -1,6 +1,6 @@
 /* Configuration for GNU C-compiler for hosting on Windows NT.
    using a unix style C library.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -47,9 +47,15 @@ do {                                                                 \
   if (_epath != NULL && *_epath != 0                                   \
       && cygwin32_posix_path_list_p (_epath))                          \
     {                                                                  \
+      char *p;                                                         \
       _win32epath = (char *) xmalloc                                   \
        (cygwin32_posix_to_win32_path_list_buf_size (_epath));          \
       cygwin32_posix_to_win32_path_list (_epath, _win32epath);         \
+      for (p = _win32epath; p && *p; ++p)                              \
+        {                                                              \
+         if (*p == '\\')                                               \
+           *p = '/';                                                   \
+       }                                                               \
     }                                                                  \
   (VAR) = _win32epath;                                                 \
 } while (0)