Hi I currently apply this to clang when building mingw-w64-crt for x64 when building with clang. This is not exactly a blocker for me because my focus is x86 and arm but maybe someone has a better work around.
jon_y? Thoughts >From 38ff74f5679980d7a251049b53554404d46006bb Mon Sep 17 00:00:00 2001 From: Martell Malone <[email protected]> Date: Tue, 4 Aug 2015 21:56:45 +0100 Subject: [PATCH] crt: crtexe avoid seh because of .rva when using clang diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c index ade4124..6a2e2c7 100644 --- a/mingw-w64-crt/crt/crtexe.c +++ b/mingw-w64-crt/crt/crtexe.c @@ -170,7 +170,7 @@ int WinMainCRTStartup (void); int WinMainCRTStartup (void) { int ret = 255; -#ifdef __SEH__ +#if defined(__SEH__) && !defined(__clang__) asm ("\t.l_startw:\n" "\t.seh_handler __C_specific_handler, @except\n" "\t.seh_handlerdata\n" @@ -182,7 +182,7 @@ int WinMainCRTStartup (void) mingw_app_type = 1; __security_init_cookie (); ret = __tmainCRTStartup (); -#ifdef __SEH__ +#if defined(__SEH__) && !defined(__clang__) asm ("\tnop\n" "\t.l_endw: nop\n"); #endif @@ -198,7 +198,7 @@ int __mingw_init_ehandler (void); int mainCRTStartup (void) { int ret = 255; -#ifdef __SEH__ +#if defined(__SEH__) && !defined(__clang__) asm ("\t.l_start:\n" "\t.seh_handler __C_specific_handler, @except\n" "\t.seh_handlerdata\n" @@ -210,7 +210,7 @@ int mainCRTStartup (void) mingw_app_type = 0; __security_init_cookie (); ret = __tmainCRTStartup (); -#ifdef __SEH__ +#if defined(__SEH__) && !defined(__clang__) asm ("\tnop\n" "\t.l_end: nop\n"); #endif -- 2.4.5
------------------------------------------------------------------------------
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
