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] darwin configure test for TARGET_LIBC_PROVIDES_SSP


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


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