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>
This commit is contained in:
Corinna Vinschen 2020-02-26 17:02:01 +01:00
parent 28382c97a5
commit 5f66c2c756
1 changed files with 2 additions and 0 deletions

View File

@ -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`\""