diff options
author | Christopher Faylor <cgf@cygnus.com> | 2001-01-30 01:41:27 +0000 |
---|---|---|
committer | Christopher Faylor <cgf@gcc.gnu.org> | 2001-01-30 01:41:27 +0000 |
commit | f6fc3552eeb12e56bbcf49853fae1548da74d6c9 (patch) | |
tree | a6b1d5e94942a81b25a345c907243f3186f181e2 | |
parent | 2b5f2501ea98677dd265291c4032d89fe1d1641f (diff) | |
download | gcc-f6fc3552eeb12e56bbcf49853fae1548da74d6c9.zip gcc-f6fc3552eeb12e56bbcf49853fae1548da74d6c9.tar.gz gcc-f6fc3552eeb12e56bbcf49853fae1548da74d6c9.tar.bz2 |
cygwin.h: Add w32api to include search.
* config/i386/cygwin.h: Add w32api to include search. Search different
directories in a cross-build environment.
From-SVN: r39341
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/cygwin.h | 58 |
2 files changed, 51 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc4af5f..18a2458 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 29 20:38:19 2001 Christopher Faylor <cgf@cygnus.com> + + * config/i386/cygwin.h: Add w32api to include search. Search different + directories in a cross-build environment. + 2001-11-29 Tim Josling <tej@melbpc.org.au> * tree.h (TYPE_STUB_DECL): Add documentation. diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index b29c66c..825afb0 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -52,6 +52,7 @@ Boston, MA 02111-1307, USA. */ N_("Use the Mingw32 interface") }, \ { "windows", MASK_WINDOWS, N_("Create GUI application") }, \ { "no-win32", -MASK_WIN32, N_("Don't set Windows defines") },\ +{ "win32", 0, N_("Set Windows defines") }, \ { "console", -MASK_WINDOWS, \ N_("Create console application") }, \ { "dll", MASK_DLL, N_("Generate code for a DLL") }, \ @@ -78,14 +79,15 @@ Boston, MA 02111-1307, USA. */ by calling the init function from the prologue. */ #undef LIBGCC_SPEC -#define LIBGCC_SPEC "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lcrtdll}" +#define LIBGCC_SPEC "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmsvcrt}" #undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{shared|mdll: %{mno-cygwin:dllcrt1%O%s}} \ - %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:crt1%O%s} \ +#define STARTFILE_SPEC "%{shared|mdll: %{mno-cygwin:dllcrt2%O%s}} \ + %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:-L/usr/local/lib/mingw -L/usr/lib/mingw crt2%O%s} \ %{pg:gcrt0%O%s}}}" #undef CPP_SPEC +#ifdef CROSS_COMPILE #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ -D__stdcall=__attribute__((__stdcall__)) \ -D__cdecl=__attribute__((__cdecl__)) \ @@ -93,18 +95,45 @@ Boston, MA 02111-1307, USA. */ -D_cdecl=__attribute__((__cdecl__))} \ -D__declspec(x)=__attribute__((x)) \ -D__i386__ -D__i386 \ - %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix -D__unix__} \ + %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix \ + -isystem /usr/local/native-include \ + -idirafter /usr/native-include} \ + %{mno-win32: %{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \ %{!mno-win32:-D_WIN32 -DWINNT -isystem /usr/include/w32api} \ + %{mno-cygwin:-DWIN32 -D__WIN32__ -D__MINGW32__=0.2 \ + %{mthreads:-D_MT} \ + -isystem /usr/local/native-include/mingw \ + -idirafter /usr/native-include/mingw \ + -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 \ + -idirafter /usr/include/w32api}" +#else +#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ + -D__stdcall=__attribute__((__stdcall__)) \ + -D__cdecl=__attribute__((__cdecl__)) \ + %{!ansi:-D_stdcall=__attribute__((__stdcall__)) \ + -D_cdecl=__attribute__((__cdecl__))} \ + -D__declspec(x)=__attribute__((x)) \ + -D__i386__ -D__i386 \ + %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix \ + -isystem /usr/local/include \ + -idirafter /usr/include} \ %{mno-win32: %{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \ - %{mno-cygwin:-DWIN32 -D__WIN32__ -D_WIN32 -D__MINGW32__=0.2 \ + %{mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT \ + -D__MINGW32__=0.3 -D__MSVCRT__ \ %{mthreads:-D_MT} \ - -isystem /usr/include/mingw32 \ - -isystem /usr/include/mingw \ + -isystem /usr/local/include/mingw \ + -idirafter /usr/include/mingw \ -iwithprefixbefore ../../../../mingw/include/g++-3 \ -iwithprefixbefore ../../../../mingw/include \ -iwithprefixbefore ../../../../mingw32/include/g++-3 \ - -iwithprefixbefore ../../../../mingw32/include }" - + -iwithprefixbefore ../../../../mingw32/include } \ + %{!mno-win32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT \ + -idirafter /usr/include/w32api}" +#endif /* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition @@ -559,15 +588,20 @@ extern void i386_pe_record_exported_symbol PARAMS ((char *, int)); #define INT_ASM_OP "\t.long\t" #endif -#undef STANDARD_INCLUDE_DIR -#define STANDARD_INCLUDE_DIR "/usr/include" - #undef MD_STARTFILE_PREFIX #define MD_STARTFILE_PREFIX "/usr/lib/" #undef STANDARD_STARTFILE_PREFIX #define STANDARD_STARTFILE_PREFIX "/usr/lib/mingw/" +#ifndef CROSS_COMPILE +#undef LOCAL_INCLUDE_DIR +#undef TOOL_INCLUDE_DIR +#undef SYSTEM_INCLUDE_DIR +#undef STANDARD_INCLUDE_DIR +#define STANDARD_INCLUDE_DIR 0 +#endif + #undef TREE #ifndef BUFSIZ |