[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] Use a compile-time test for -fstack-protector
- To: Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>
- Subject: Re: [patches] Use a compile-time test for -fstack-protector
- From: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Date: Wed, 11 Nov 2009 01:17:11 +0000 (UTC)
On Sun, 8 Nov 2009, Thomas Schwinge wrote:
> if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Werror -fstack-protector
> - -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
> + -o /dev/null -c -x c /dev/null 1>&AS_MESSAGE_LOG_FD])
Does this still work if you remove $LDFLAGS from the compilation line?
It's generally only included in link tests, and some GCC versions
(including at least 4.1, which is supported for building EGLIBC) give
warnings when -Wl options (which could be in $LDFLAGS) are used when not
linking. As this is just testing exit status and -Werror doesn't act on
that warning, this *shouldn't* cause problems - nevertheless, it seems
better to remove $LDFLAGS when making it no longer a link test.
--
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx