From 028b640f0bd8372cb2924b9db4e174bb1493a622 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Mon, 17 Sep 2007 05:33:08 +0000 Subject: [PATCH] Fixen for PPC. Exclude relocation. We'll be situated properly by the ELF layer anyway, and it's x86 specific. Tweak definitions in _mingw.h svn path=/trunk/; revision=29072 --- reactos/lib/3rdparty/mingw/crt1.c | 7 ++++++- reactos/lib/3rdparty/mingw/include/_mingw.h | 13 +++++++++---- reactos/lib/3rdparty/mingw/mingw.rbuild | 4 +++- reactos/lib/3rdparty/mingw/wcrt1.c | 2 ++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/reactos/lib/3rdparty/mingw/crt1.c b/reactos/lib/3rdparty/mingw/crt1.c index 6c54bebe9b2..a26cd0cb58b 100644 --- a/reactos/lib/3rdparty/mingw/crt1.c +++ b/reactos/lib/3rdparty/mingw/crt1.c @@ -41,7 +41,10 @@ extern int main (int, char **, char **); #define __UNKNOWN_APP 0 #define __CONSOLE_APP 1 #define __GUI_APP 2 -__MINGW_IMPORT void __set_app_type(int); +#ifndef _M_PPC +__MINGW_IMPORT +#endif +void __set_app_type(int); #endif /* __MSVCRT__ */ /* Global _fmode for this .exe, not the one in msvcrt.dll, @@ -213,7 +216,9 @@ __mingw_CRTStartup (void) _mingw32_init_fmode (); /* Adust references to dllimported data that have non-zero offsets. */ +#if defined(__i386__) _pei386_runtime_relocator (); +#endif #if defined(__i386__) /* Align the stack to 16 bytes for the sake of SSE ops in main diff --git a/reactos/lib/3rdparty/mingw/include/_mingw.h b/reactos/lib/3rdparty/mingw/include/_mingw.h index 59f4f39b6f7..5fb26f2ac69 100644 --- a/reactos/lib/3rdparty/mingw/include/_mingw.h +++ b/reactos/lib/3rdparty/mingw/include/_mingw.h @@ -72,11 +72,16 @@ # endif # define __DECLSPEC_SUPPORTED # else /* __declspec */ -# undef __DECLSPEC_SUPPORTED -# undef __MINGW_IMPORT -# ifndef _CRTIMP +# ifndef __PowerPC__ +# undef __DECLSPEC_SUPPORTED +# undef __MINGW_IMPORT +# ifndef _CRTIMP +# define _CRTIMP +# endif +# else /* __PowerPC__ */ +# define __declspec(x) # define _CRTIMP -# endif +# endif /* __PowerPC__ */ # endif /* __declspec */ # ifndef __cdecl # define __cdecl __attribute__ ((__cdecl__)) diff --git a/reactos/lib/3rdparty/mingw/mingw.rbuild b/reactos/lib/3rdparty/mingw/mingw.rbuild index 676bb7bc08a..70f3c8ee870 100644 --- a/reactos/lib/3rdparty/mingw/mingw.rbuild +++ b/reactos/lib/3rdparty/mingw/mingw.rbuild @@ -14,12 +14,14 @@ isascii.c iscsym.c iscsymf.c - pseudo-reloc.c strcasecmp.c strncasecmp.c toascii.c wcscmpi.c _wgetopt.c + + pseudo-reloc.c + include/crt diff --git a/reactos/lib/3rdparty/mingw/wcrt1.c b/reactos/lib/3rdparty/mingw/wcrt1.c index 2f163cb0791..f2b04ffff3c 100644 --- a/reactos/lib/3rdparty/mingw/wcrt1.c +++ b/reactos/lib/3rdparty/mingw/wcrt1.c @@ -214,7 +214,9 @@ __mingw_wCRTStartup (void) _mingw32_init_fmode (); /* Adust references to dllimported data that have non-zero offsets. */ +#if defined(__i386__) _pei386_runtime_relocator (); +#endif #if defined(__i386__) /* Align the stack to 16 bytes for the sake of SSE ops in main