aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMumit Khan <khan@xraylith.wisc.edu>1999-02-09 23:52:06 +0000
committerJeff Law <law@gcc.gnu.org>1999-02-09 16:52:06 -0700
commit2b9f972f5835e362de8040cf6ceb2c231ab09120 (patch)
tree831a4ecca51800bd58326c80f3fdd0517625144a /gcc
parent82281fc2c1ac0709fe8ee1e425e647355b733a74 (diff)
downloadgcc-2b9f972f5835e362de8040cf6ceb2c231ab09120.zip
gcc-2b9f972f5835e362de8040cf6ceb2c231ab09120.tar.gz
gcc-2b9f972f5835e362de8040cf6ceb2c231ab09120.tar.bz2
cygwin.h (SUBTARGET_OVERRIDE_OPTIONS): New macro to ignore fpic/fPIC for windows32 targets.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/crtdll.h4
-rw-r--r--gcc/config/i386/cygwin.h16
-rw-r--r--gcc/config/i386/mingw32.h7
-rw-r--r--gcc/config/i386/xm-cygwin.h8
5 files changed, 37 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c25d9db..6db6024 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/i386/crtdll.h b/gcc/config/i386/crtdll.h
index f7eaf2b..4334da0 100644
--- a/gcc/config/i386/crtdll.h
+++ b/gcc/config/i386/crtdll.h
@@ -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__)) \
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index af0b25e..1c23535 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -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).
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index 3ef5c5b..f8da489 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -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
diff --git a/gcc/config/i386/xm-cygwin.h b/gcc/config/i386/xm-cygwin.h
index 4b166eb..e877665 100644
--- a/gcc/config/i386/xm-cygwin.h
+++ b/gcc/config/i386/xm-cygwin.h
@@ -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)