[PATCH] winsup: disable fortify source

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Mar 16 07:47:39 GMT 2022


On Mar 14 23:20, Mike Frysinger wrote:
> When using a compiler that automatically enables -D_FORTIFY_SOURCE,
> building winsup fails with errors like below.  Since winsup is not
> setup to compile itself with _FORTIFY_SOURCE, disable it for now.

Yeah, the Windows headers are a problem.  Who would have expected that...

> diff --git a/winsup/acinclude.m4 b/winsup/acinclude.m4
> index 7c900d70719a..ffd15aaaa86b 100644
> --- a/winsup/acinclude.m4
> +++ b/winsup/acinclude.m4
> @@ -16,7 +16,7 @@ if test -z "$newlib_headers"; then
>  fi
>  newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
>  
> -AM_CPPFLAGS="-I${winsup_srcdir}/cygwin -I${target_builddir}/winsup/cygwin"
> +AM_CPPFLAGS="-U_FORTIFY_SOURCE -I${winsup_srcdir}/cygwin -I${target_builddir}/winsup/cygwin"
>  AM_CPPFLAGS="${AM_CPPFLAGS} -isystem ${cygwin_headers}"
>  for h in ${newlib_headers}; do
>      AM_CPPFLAGS="${AM_CPPFLAGS} -isystem $h"
> -- 
> 2.34.1

Thanks, please push.


Corinna


More information about the Cygwin-patches mailing list