From: Mumit Khan Date: Tue, 9 Feb 1999 23:52:06 +0000 (+0000) Subject: cygwin.h (SUBTARGET_OVERRIDE_OPTIONS): New macro to ignore fpic/fPIC for windows32... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b9f972f5835e362de8040cf6ceb2c231ab09120;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c25d9dbd04a..6db6024724b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -7,6 +7,14 @@ Tue Feb 9 17:27:29 GMT 1999 Nathan Sidwell Tue Feb 9 16:52:22 1999 Mumit Khan + * 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 f7eaf2b71e6..4334da0bd91 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 af0b25e5917..1c235358cbf 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 3ef5c5b849c..f8da4894ad0 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 4b166ebde75..e877665b47a 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)