This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] GNU libc __stack_chk_fail detection


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]