This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] GNU libc __stack_chk_fail detection
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 Apr 2007 23:49:38 +0200
- Subject: Re: [PATCH] GNU libc __stack_chk_fail detection
- References: <20070428212647.GA17787@shockley.aurel32.net>
On Sat, Apr 28, 2007 at 11:26:49PM +0200, Aurelien Jarno wrote:
> I think the current test to detect GNU libc __stack_chk_fail is not
> correct. It uses *-*linux* to match the Linux targets, but they are not
> necessarily using a GNU libc (think of uClibc for example). On the
> contrary a GNU libc on Hurd or on GNU/kFreeBSD.
>
> Please find below a trivial patch to fix that.
>
> Index: gcc/configure.ac
> ===================================================================
> --- gcc/configure.ac (révision 124260)
> +++ gcc/configure.ac (copie de travail)
> @@ -3394,7 +3394,7 @@
> gcc_cv_libc_provides_ssp,
> [gcc_cv_libc_provides_ssp=no
> case "$target" in
> - *-*-linux*)
> + *-*-*-gnu*)
I have just been pointed that Hurd is actually *-*-gnu (my primary goal
was to match GNU/kFreeBSD). Please find an updated patch below.
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (révision 124260)
+++ gcc/configure.ac (copie de travail)
@@ -3394,7 +3394,7 @@
gcc_cv_libc_provides_ssp,
[gcc_cv_libc_provides_ssp=no
case "$target" in
- *-*-linux*)
+ *-*-*-gnu* | *-*-gnu)
if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
if test "x$with_sysroot" = x; then
glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net