From 936ee79028e95a369184bb8183a3cf3d5ab82a52 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 11 Mar 2001 00:12:12 +0000 Subject: [PATCH] cygwin.h: Make ../w32api a system directory. * config/i386/cygwin.h: Make ../w32api a system directory. Reorganize mingw includes slightly. From-SVN: r40372 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/cygwin.h | 47 +++++++++++++++++++++------------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fdc1291794..b6d072ab5e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Mar 10 17:52:54 2001 Christopher Faylor + + * config/i386/cygwin.h: Make ../w32api a system directory. Reorganize + mingw includes slightly. + 2001-03-10 Kaveh R. Ghazi * system.h (malloc, realloc, calloc, strdup, bzero, bcmp, rindex): diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index 3dc30354bde..4dbec0224ab 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -81,16 +81,21 @@ Boston, MA 02111-1307, USA. */ #ifdef CROSS_COMPILE #define CYGWIN_INCLUDES "-idirafter " CYGWIN_CROSS_DIR "/include" -#define CYGWIN_W32API "-I" CYGWIN_CROSS_DIR "/include/w32api" +#define CYGWIN_W32API "-idirafter " CYGWIN_CROSS_DIR "/include/w32api" #define CYGWIN_LIB CYGWIN_CROSS_DIR "/lib" #define MINGW_LIBS "-L" CYGWIN_CROSS_DIR "/lib/mingw" -#define MINGW_INCLUDES "-I" CYGWIN_CROSS_DIR "/include/mingw" +#define MINGW_INCLUDES "-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++-3 "\ + "-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++ "\ + "-idirafter " CYGWIN_CROSS_DIR "/include/mingw" #else #define CYGWIN_INCLUDES "-isystem /usr/local/include -idirafter /usr/include" -#define CYGWIN_W32API "-I/usr/include/w32api" +#define CYGWIN_W32API "-idirafter /usr/include/w32api" #define CYGWIN_LIB "/usr/lib" #define MINGW_LIBS "-L/usr/local/lib/mingw -L/usr/lib/mingw" -#define MINGW_INCLUDES "-isystem /usr/local/include/mingw -idirafter /usr/include/mingw" +#define MINGW_INCLUDES "-isystem /usr/include/mingw/g++-3 "\ + "-isystem /usr/include/mingw/g++ "\ + "-isystem /usr/local/include/mingw" \ + "-idirafter /usr/include/mingw" #endif #undef STARTFILE_SPEC @@ -106,16 +111,14 @@ Boston, MA 02111-1307, USA. */ -D_cdecl=__attribute__((__cdecl__))} \ -D__declspec(x)=__attribute__((x)) \ -D__i386__ -D__i386 \ + %{mno-win32: %{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \ + %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ + %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{mthreads:-D_MT} " MINGW_INCLUDES \ + " -mwin32} \ %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix \ " CYGWIN_INCLUDES "} \ - %{mno-win32: %{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \ - %{mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT -D__MSVCRT__ \ - -D__MINGW32__=0.3 %{mthreads:-D_MT} " MINGW_INCLUDES " " CYGWIN_W32API "\ - -iwithprefixbefore ../../../../mingw/include/g++-3 \ - -iwithprefixbefore ../../../../mingw/include \ - -iwithprefixbefore ../../../../mingw32/include/g++-3 \ - -iwithprefixbefore ../../../../mingw32/include } \ - %{!mno-win32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT " CYGWIN_W32API "}" + %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT " CYGWIN_W32API "} \ +" /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition @@ -357,7 +360,7 @@ do { \ #undef ASM_OUTPUT_LABELREF #define ASM_OUTPUT_LABELREF(STREAM, NAME) \ fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \ - I386_PE_STRIP_ENCODING (NAME)) \ + I386_PE_STRIP_ENCODING (NAME)) \ /* Output a common block. */ #undef ASM_OUTPUT_COMMON @@ -445,10 +448,10 @@ do { \ { \ type = SECT_RW; \ if (TREE_CODE (DECL) == VAR_DECL \ - && lookup_attribute ("shared", DECL_MACHINE_ATTRIBUTES (DECL))) \ - mode = "ws"; \ + && lookup_attribute ("shared", DECL_MACHINE_ATTRIBUTES (DECL))) \ + mode = "ws"; \ else \ - mode = "w"; \ + mode = "w"; \ } \ \ if (s == 0) \ @@ -461,12 +464,12 @@ do { \ sections = s; \ fprintf (STREAM, ".section\t%s,\"%s\"\n", NAME, mode); \ /* Functions may have been compiled at various levels of \ - optimization so we can't use `same_size' here. Instead, \ - have the linker pick one. */ \ + optimization so we can't use `same_size' here. Instead, \ + have the linker pick one. */ \ if ((DECL) && DECL_ONE_ONLY (DECL)) \ - fprintf (STREAM, "\t.linkonce %s\n", \ - TREE_CODE (DECL) == FUNCTION_DECL \ - ? "discard" : "same_size"); \ + fprintf (STREAM, "\t.linkonce %s\n", \ + TREE_CODE (DECL) == FUNCTION_DECL \ + ? "discard" : "same_size"); \ } \ else \ { \ @@ -527,7 +530,7 @@ do { \ && MAIN_NAME_P (DECL_NAME (current_function_decl))) \ { \ emit_call_insn (gen_rtx (CALL, VOIDmode, \ - gen_rtx_MEM (FUNCTION_MODE, \ + gen_rtx_MEM (FUNCTION_MODE, \ gen_rtx_SYMBOL_REF (Pmode, "_monstartup")), \ const0_rtx)); \ }