aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <cgf@cygnus.com>2001-04-09 02:50:34 +0000
committerChristopher Faylor <cgf@gcc.gnu.org>2001-04-09 02:50:34 +0000
commit9a33d5056dcffee8f04c9e7f9c9f7d301f1d70d1 (patch)
tree28cec12a4fd36bc610acd83ddf6d13f94334ff76
parent9b38026f1840853f0ed034af677ab2d8628d7dc2 (diff)
downloadgcc-9a33d5056dcffee8f04c9e7f9c9f7d301f1d70d1.zip
gcc-9a33d5056dcffee8f04c9e7f9c9f7d301f1d70d1.tar.gz
gcc-9a33d5056dcffee8f04c9e7f9c9f7d301f1d70d1.tar.bz2
cygwin.h (STARTFILE_SPEC): search */lib/w32api by default.
* config/i386/cygwin.h (STARTFILE_SPEC): search */lib/w32api by default. (CPP_SPEC): Always search */include/w32api for header files. (ASM_OUTPUT_SECTION_NAME): Avoid testing NULL DECL. (LINK_SPEC): Add "cyg" to the library search prefixes. From-SVN: r41196
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/cygwin.h70
2 files changed, 43 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4c2a710..7347947 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Sun Apr 8 22:20:27 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * config/i386/cygwin.h (STARTFILE_SPEC): search */lib/w32api by default.
+ (CPP_SPEC): Always search */include/w32api for header files.
+ (ASM_OUTPUT_SECTION_NAME): Avoid testing NULL DECL.
+ (LINK_SPEC): Add "cyg" to the library search prefixes.
+
2001-04-08 Philip Blundell <philb@gnu.org>
* config/arm/arm.h (ASM_OUTPUT_LABELREF): Use asm_fprintf.
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index ed2995b..a2dac94 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -60,29 +60,13 @@ Boston, MA 02111-1307, USA. */
{ "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \
{ "threads", 0, N_("Use Mingw-specific thread support") },
-
-/* Support the __declspec keyword by turning them into attributes.
- We currently only support: dllimport and dllexport.
- Note that the current way we do this may result in a collision with
- predefined attributes later on. This can be solved by using one attribute,
- say __declspec__, and passing args to it. The problem with that approach
- is that args are not accumulated: each new appearance would clobber any
- existing args. */
-
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D_X86_=1 -Asystem=winnt"
-/* Normally, -lgcc is not needed since everything in it is in the DLL, but we
- want to allow things to be added to it when installing new versions of
- GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled
- by calling the init function from the prologue. */
-
-#undef LIBGCC_SPEC
-#define LIBGCC_SPEC "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmsvcrt}"
-
#ifdef CROSS_COMPILE
#define CYGWIN_INCLUDES "-idirafter " CYGWIN_CROSS_DIR "/include"
-#define CYGWIN_W32API "-idirafter " CYGWIN_CROSS_DIR "/include/w32api"
+#define W32API_INC "-idirafter " CYGWIN_CROSS_DIR "/include/w32api"
+#define W32API_LIB "-L" CYGWIN_CROSS_DIR "/lib/w32api/"
#define CYGWIN_LIB CYGWIN_CROSS_DIR "/lib"
#define MINGW_LIBS "-L" CYGWIN_CROSS_DIR "/lib/mingw"
#define MINGW_INCLUDES "-isystem " CYGWIN_CROSS_DIR "/include/mingw/g++-3 "\
@@ -90,7 +74,8 @@ Boston, MA 02111-1307, USA. */
"-idirafter " CYGWIN_CROSS_DIR "/include/mingw"
#else
#define CYGWIN_INCLUDES "-isystem /usr/local/include -idirafter /usr/include"
-#define CYGWIN_W32API "-idirafter /usr/include/w32api"
+#define W32API_INC "-idirafter /usr/include/w32api"
+#define W32API_LIB "-L/usr/lib/w32api/"
#define CYGWIN_LIB "/usr/lib"
#define MINGW_LIBS "-L/usr/local/lib/mingw -L/usr/lib/mingw"
#define MINGW_INCLUDES "-isystem /usr/include/mingw/g++-3 "\
@@ -99,10 +84,13 @@ Boston, MA 02111-1307, USA. */
"-idirafter /usr/include/mingw"
#endif
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{shared|mdll: %{mno-cygwin:dllcrt2%O%s}} \
- %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:" MINGW_LIBS " mingw/crt2%O%s} \
- %{pg:gcrt0%O%s}}}"
+/* Support the __declspec keyword by turning them into attributes.
+ We currently only support: dllimport and dllexport.
+ Note that the current way we do this may result in a collision with
+ predefined attributes later on. This can be solved by using one attribute,
+ say __declspec__, and passing args to it. The problem with that approach
+ is that args are not accumulated: each new appearance would clobber any
+ existing args. */
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
@@ -112,14 +100,30 @@ 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}} \
- %{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 "} \
- %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT " CYGWIN_W32API "} \
+ %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \
+ %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{mthreads:-D_MT} "\
+ MINGW_INCLUDES "} \
+ %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix "\
+ CYGWIN_INCLUDES "}\
+ %{mwin32|no-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT}\
+ %{!mno-win32:" W32API_INC "}\
+"
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC W32API_LIB "\
+ %{shared|mdll: %{mno-cygwin:" MINGW_LIBS " mingw/dllcrt2%O%s}}\
+ %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:" MINGW_LIBS " mingw/crt2%O%s}\
+ %{pg:gcrt0%O%s}}}\
"
+/* Normally, -lgcc is not needed since everything in it is in the DLL, but we
+ want to allow things to be added to it when installing new versions of
+ GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled
+ by calling the init function from the prologue. */
+
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC "%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmsvcrt}"
+
/* This macro defines names of additional specifications to put in the specs
that can be used in various specifications like CC1_SPEC. Its definition
is an initializer with a subgrouping for each command option.
@@ -154,7 +158,8 @@ Boston, MA 02111-1307, USA. */
%{static:-Bstatic} %{!static:-Bdynamic} \
%{shared|mdll: -e \
%{mno-cygwin:_DllMainCRTStartup@12} \
- %{!mno-cygwin:__cygwin_dll_entry@12}}"
+ %{!mno-cygwin:__cygwin_dll_entry@12}}\
+ --dll-search-prefix=cyg"
#undef MATH_LIBRARY
#define MATH_LIBRARY ""
@@ -451,7 +456,7 @@ do { \
else \
{ \
type = SECT_RW; \
- if (TREE_CODE (DECL) == VAR_DECL \
+ if (DECL && TREE_CODE (DECL) == VAR_DECL \
&& lookup_attribute ("shared", DECL_MACHINE_ATTRIBUTES (DECL))) \
mode = "ws"; \
else \
@@ -523,9 +528,6 @@ do { \
#undef ASM_COMMENT_START
#define ASM_COMMENT_START " #"
-/* DWARF2 Unwinding doesn't work with exception handling yet. */
-#define DWARF2_UNWIND_INFO 0
-
/* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C