This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] darwin configure test for TARGET_LIBC_PROVIDES_SSP
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Eric Christopher <echristo at apple dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 05 Jan 2007 20:24:29 +0100
- Subject: Re: [patch] darwin configure test for TARGET_LIBC_PROVIDES_SSP
- References: <4185B111-9ADB-43D5-B923-06146963D82A@apple.com>
Bootstrapped and tested on darwin8 and darwin9 (with and without the
functions) and tested that it either tries to link in ssp or not.
I'd rather wrap the entire check in AC_CACHE_CHECK, like this:
AC_CACHE_CHECK(__stack_chk_fail in target C library,
gcc_cv_libc_provides_ssp,
[gcc_cv_libc_provides_ssp=no
case "$target" in
*-*-linux*)
...
;;
*-*-darwin*)
gcc_cv_libc_provides_ssp=no
AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes])
;;
esac])
The reason other targets don't do the same is because there is nothing
like AC_CHECK_TARGET_FUNC: this works for Darwin only because it's
always compiled native.
Thanks for doing this change.
Paolo