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:
Corinna Vinschen 2017-10-09 18:08:10 +02:00
parent 15de9da0b9
commit 7346a162f2
2 changed files with 9 additions and 1 deletions

View File

@ -20,9 +20,13 @@ void
mainCRTStartup ()
{
#ifdef __i386__
#if __GNUC_PREREQ(6,0)
#pragma GCC diagnostic ignored "-Wframe-address"
#endif
(void)__builtin_return_address(1);
#if __GNUC_PREREQ(6,0)
#pragma GCC diagnostic pop
#endif
asm volatile ("andl $-16,%%esp" ::: "%esp");
#endif

View File

@ -22,10 +22,14 @@ static bool dll_finished_loading;
static void WINAPI
threadfunc_fe (VOID *arg)
{
#ifndef __x86_64__
#ifdef __i386__
#if __GNUC_PREREQ(6,0)
#pragma GCC diagnostic ignored "-Wframe-address"
#endif
(void)__builtin_return_address(1);
#if __GNUC_PREREQ(6,0)
#pragma GCC diagnostic pop
#endif
asm volatile ("andl $-16,%%esp" ::: "%esp");
#endif
_cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg);