about summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-19 15:35:50 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-19 15:35:50 +0000
commit401a9ec9cad6fe21a6471f926152dbaff64d2212 (patch)
treeda140fef4d5b44878ceea97383512f64c25818a3 /configure.in
parentbe686f1876c5ebbf95801b270522066bfebb0905 (diff)
downloadglibc-401a9ec9cad6fe21a6471f926152dbaff64d2212.tar.gz
glibc-401a9ec9cad6fe21a6471f926152dbaff64d2212.tar.xz
glibc-401a9ec9cad6fe21a6471f926152dbaff64d2212.zip
* configure.in: Check for -fstack-protector gcc option.
	* config.make.in (have-ssp): Add template.
	* nscd/Makefile (nscd-cflags): Add -fstack-protector if supported.

	* nscd/nscd.c (main): Don't ignore result of chdir call.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 4396891db5..21756e00a8 100644
--- a/configure.in
+++ b/configure.in
@@ -1508,6 +1508,21 @@ if test $libc_cv_fno_unit_at_a_time = yes; then
 fi
 AC_SUBST(fno_unit_at_a_time)
 
+AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
+cat > conftest.c <<EOF
+int foo;
+main () { return 0;}
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
+			    -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+  libc_cv_ssp=yes
+else
+  libc_cv_ssp=no
+fi
+rm -f conftest*])
+AC_SUBST(libc_cv_ssp)
+
 if test $elf != yes; then
   AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
 		 [AC_TRY_COMPILE(, [asm (".section .init");