diff --git a/gnu/dist/gcc4/gcc/configure.ac b/gnu/dist/gcc4/gcc/configure.ac index 5f6cda9f3fe6..179d36fa000d 100644 --- a/gnu/dist/gcc4/gcc/configure.ac +++ b/gnu/dist/gcc4/gcc/configure.ac @@ -3124,12 +3124,16 @@ 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) | \ 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 0382014756df..c8e5fe158e7d 100644 --- a/tools/gcc/Makefile +++ b/tools/gcc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2007/03/31 05:55:43 matt Exp $ +# $NetBSD: Makefile,v 1.25 2007/06/07 08:58:58 he Exp $ .include @@ -23,6 +23,8 @@ 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 + MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \ CC_FOR_BUILD=${HOST_CC:Q} \ CC=${CC:Q}' '${CCADDFLAGS:Q} \