public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] cygwin: disable -Wframe-address warning only on GCC 6 or later
@ 2017-10-09 16:09 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2017-10-09 16:09 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7346a162f2956c53f36a0cabf969e7b8186d81b0

commit 7346a162f2956c53f36a0cabf969e7b8186d81b0
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Oct 9 18:08:10 2017 +0200

    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>

Diff:
---
 winsup/cygwin/crt0.c  | 4 ++++
 winsup/cygwin/init.cc | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c
index 271f5b9..fee4b2e 100644
--- a/winsup/cygwin/crt0.c
+++ b/winsup/cygwin/crt0.c
@@ -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
 
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 2d4299e..aeeeac7 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-09 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 16:09 [newlib-cygwin] cygwin: disable -Wframe-address warning only on GCC 6 or later Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).