From 678b5429b3a0d125b6cf21b940c7d217f79f2e33 Mon Sep 17 00:00:00 2001 From: he Date: Thu, 7 Jun 2007 14:36:27 +0000 Subject: [PATCH] Instead of inventing a new environment variable to override the SSP functionality location test, use gcc_cv_libc_provides_ssp instead, as hinted by freza@ and uwe@. --- gnu/dist/gcc4/gcc/configure.ac | 10 ++++------ tools/gcc/Makefile | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gnu/dist/gcc4/gcc/configure.ac b/gnu/dist/gcc4/gcc/configure.ac index 179d36fa000d..3b9efff47051 100644 --- a/gnu/dist/gcc4/gcc/configure.ac +++ b/gnu/dist/gcc4/gcc/configure.ac @@ -3124,16 +3124,14 @@ case "$target" in fi fi]) ;; *-*-netbsd*) - if test x$TARGET_LIBC_PROVIDES_SSP != x; then - gcc_cv_libc_provides_ssp=$TARGET_LIBC_PROVIDES_SSP - else - if $gcc_cv_nm $($CC -print-file-name=libc.a) | \ + AC_CACHE_CHECK(__stack_chk_guard in C library, + gcc_cv_libc_provides_ssp, + [if $gcc_cv_nm $($CC -print-file-name=libc.a) | \ grep 'B __stack_chk_guard' > /dev/null; then gcc_cv_libc_provides_ssp=yes else gcc_cv_libc_provides_ssp=no - fi - fi ;; + fi]) ;; *) gcc_cv_libc_provides_ssp=no ;; esac if test x$gcc_cv_libc_provides_ssp = xyes; then diff --git a/tools/gcc/Makefile b/tools/gcc/Makefile index c8e5fe158e7d..644b73e918ff 100644 --- a/tools/gcc/Makefile +++ b/tools/gcc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2007/06/07 08:58:58 he Exp $ +# $NetBSD: Makefile,v 1.26 2007/06/07 14:36:27 he Exp $ .include @@ -23,7 +23,7 @@ MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \ EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS \ AR=${HOST_AR:Q} RANLIB=${HOST_RANLIB:Q} -CONFIGURE_ENV+= TARGET_LIBC_PROVIDES_SSP=yes +CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \ CC_FOR_BUILD=${HOST_CC:Q} \