f36b17368a
- gcc 2.95.2 -> 3.3.3 - binutils 030425 -> 2.15.90 (20040222)
71 lines
2.6 KiB
Text
71 lines
2.6 KiB
Text
$NetBSD: patch-pe,v 1.3 2004/03/09 12:19:12 kent Exp $
|
|
|
|
--- gcc/config/i386/netbsdpe.h.orig 2003-11-03 05:34:46.000000000 +0900
|
|
+++ gcc/config/i386/netbsdpe.h
|
|
@@ -21,16 +21,11 @@ the Free Software Foundation, 59 Temple
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
#undef TARGET_VERSION
|
|
-#define TARGET_VERSION fprintf (stderr, " (x86 MinGW)");
|
|
+#define TARGET_VERSION fprintf (stderr, " (x86 NetBSD-PE)");
|
|
|
|
#define EXTRA_OS_CPP_BUILTINS() \
|
|
do \
|
|
{ \
|
|
- builtin_define ("__MSVCRT__"); \
|
|
- builtin_define ("__MINGW32__"); \
|
|
- builtin_define ("_WIN32"); \
|
|
- builtin_define_std ("WIN32"); \
|
|
- builtin_define_std ("WINNT"); \
|
|
} \
|
|
while (0)
|
|
|
|
@@ -41,15 +36,19 @@ Boston, MA 02111-1307, USA. */
|
|
#define STANDARD_INCLUDE_DIR "/mingw/include"
|
|
#undef STANDARD_INCLUDE_COMPONENT
|
|
#define STANDARD_INCLUDE_COMPONENT "MINGW"
|
|
+#undef GPLUSPLUS_INCLUDE_DIR
|
|
+#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
|
|
|
|
#undef CPP_SPEC
|
|
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT}"
|
|
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} \
|
|
+%{!mwindows:-D__NetBSD__ -D__PECOFF__ -D__NetBSDPE__} \
|
|
+%{mwindows:-D_WIN32 -DWINNT} -idirafter /usr/include"
|
|
|
|
/* For Windows applications, include more libraries, but always include
|
|
kernel32. */
|
|
#undef LIB_SPEC
|
|
-#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
|
|
- -luser32 -lkernel32 -ladvapi32 -lshell32"
|
|
+#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32 -luser32 -ladvapi32 -lshell32} \
|
|
+ -lkernel32 -lpthread -lc %{mdll:-lpeasu}"
|
|
|
|
/* Include in the mingw32 libraries with libgcc */
|
|
#undef LINK_SPEC
|
|
@@ -62,15 +61,13 @@ Boston, MA 02111-1307, USA. */
|
|
|
|
/* Include in the mingw32 libraries with libgcc */
|
|
#undef LIBGCC_SPEC
|
|
-#define LIBGCC_SPEC \
|
|
- "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt"
|
|
+#define LIBGCC_SPEC "-lgcc"
|
|
|
|
#undef STARTFILE_SPEC
|
|
-#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
|
|
- %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s} %{!fno-exceptions:crtbegin%O%s}"
|
|
+#define STARTFILE_SPEC "%{mdll:crt0dll%O%s} %{!mdll: %{!mwindows:crt0%O%s} %{mwindows:crt0win%O%s}}"
|
|
|
|
#undef ENDFILE_SPEC
|
|
-#define ENDFILE_SPEC "%{!fno-exceptions:crtend%O%s}"
|
|
+#define ENDFILE_SPEC ""
|
|
|
|
/* An additional prefix to try after the standard prefixes. */
|
|
#undef MD_STARTFILE_PREFIX
|
|
@@ -111,3 +108,6 @@ do { \
|
|
/* When we are ready for Dwarf2 EH handling */
|
|
#undef DWARF2_UNWIND_INFO
|
|
#define DWARF2_UNWIND_INFO 1
|
|
+
|
|
+#undef BIGGEST_FIELD_ALIGNMENT
|
|
+#define BIGGEST_FIELD_ALIGNMENT 32
|