public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: Makefile.in: add -fno-builtin-execve CFLAG when building exec.o
Date: Wed, 26 Feb 2020 16:06:00 -0000	[thread overview]
Message-ID: <20200226160611.123908.qmail@sourceware.org> (raw)

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

commit 5f66c2c756c2b3b43e565e471c82ee4ed05a4adb
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Feb 26 17:02:01 2020 +0100

    Cygwin: Makefile.in: add -fno-builtin-execve CFLAG when building exec.o
    
    gcc-9.2.0 has an execve builtin which uses the nothrow attribute.
    This results in an error when aliasing execve to _execve for newlib:
    
    exec.cc:88:23: error: 'int _execve(const char*, char* const*, char*
    const*)' specifies less restrictive attribute than its target
    'int execve(const char*, char* const*, char* const*)': 'nothrow'
    [-Werror=missing-attributes]
       88 | EXPORT_ALIAS (execve, _execve) /* For newlib */
    
    Add the -fno-builtin-execve CFLAGS when building exec.o to override
    the gcc builtin.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/Makefile.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index ca0633e..f273ba7 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -567,6 +567,8 @@ ifeq ($(target_cpu),i686)
 exceptions_CFLAGS:=-fno-omit-frame-pointer
 endif
 endif
+# required since gcc 9.x
+exec_CFLAGS:=-fno-builtin-execve
 
 fhandler_proc_CFLAGS+=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\""
 fhandler_proc_CFLAGS+=-DGCC_VERSION="\"`$(CC) -v 2>&1 | tail -n 1`\""


                 reply	other threads:[~2020-02-26 16:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200226160611.123908.qmail@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).