cygwin: disable -Wframe-address warning only on GCC 6 or later
This is required as long as we don't have a GCC 6.x cross compiler on Linux. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
15de9da0b9
commit
7346a162f2
|
@ -20,9 +20,13 @@ void
|
||||||
mainCRTStartup ()
|
mainCRTStartup ()
|
||||||
{
|
{
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
|
#if __GNUC_PREREQ(6,0)
|
||||||
#pragma GCC diagnostic ignored "-Wframe-address"
|
#pragma GCC diagnostic ignored "-Wframe-address"
|
||||||
|
#endif
|
||||||
(void)__builtin_return_address(1);
|
(void)__builtin_return_address(1);
|
||||||
|
#if __GNUC_PREREQ(6,0)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
asm volatile ("andl $-16,%%esp" ::: "%esp");
|
asm volatile ("andl $-16,%%esp" ::: "%esp");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,14 @@ static bool dll_finished_loading;
|
||||||
static void WINAPI
|
static void WINAPI
|
||||||
threadfunc_fe (VOID *arg)
|
threadfunc_fe (VOID *arg)
|
||||||
{
|
{
|
||||||
#ifndef __x86_64__
|
#ifdef __i386__
|
||||||
|
#if __GNUC_PREREQ(6,0)
|
||||||
#pragma GCC diagnostic ignored "-Wframe-address"
|
#pragma GCC diagnostic ignored "-Wframe-address"
|
||||||
|
#endif
|
||||||
(void)__builtin_return_address(1);
|
(void)__builtin_return_address(1);
|
||||||
|
#if __GNUC_PREREQ(6,0)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
asm volatile ("andl $-16,%%esp" ::: "%esp");
|
asm volatile ("andl $-16,%%esp" ::: "%esp");
|
||||||
#endif
|
#endif
|
||||||
_cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg);
|
_cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg);
|
||||||
|
|
Loading…
Reference in New Issue