Commit 883dc335 authored by Nick Mathewson's avatar Nick Mathewson 🏃
Browse files

Fix configure script build with autoconf < 2.63

We added some AS_VAR_IF-based checks to detect whether we have
managed to compile (but not link) with stack-protector.  On autoconf
before 2.63, we don't have AS_VAR_IF, so we just have to let the
user get a compile error rather than a helpful "find libssp" error.

Fixes bug 12693; bugfix on 0.2.5.2-alpha (commit 21ac2928)
parent fcac4b44
o Build fixes:
- Allow our configure script to build correctly with autoconf 2.62
again. Fixes bug 12693; bugfix on 0.2.5.2-alpha.
...@@ -626,11 +626,12 @@ if test x$enable_gcc_hardening != xno; then ...@@ -626,11 +626,12 @@ if test x$enable_gcc_hardening != xno; then
TOR_CHECK_CFLAGS(-fstack-protector-all, also_link) TOR_CHECK_CFLAGS(-fstack-protector-all, also_link)
AS_VAR_PUSHDEF([can_compile], [tor_cv_cflags_-fstack-protector-all]) AS_VAR_PUSHDEF([can_compile], [tor_cv_cflags_-fstack-protector-all])
AS_VAR_PUSHDEF([can_link], [tor_can_link_-fstack-protector-all]) AS_VAR_PUSHDEF([can_link], [tor_can_link_-fstack-protector-all])
m4_ifdef([AS_VAR_IF],[
AS_VAR_IF(can_compile, [yes], AS_VAR_IF(can_compile, [yes],
AS_VAR_IF(can_link, [yes], AS_VAR_IF(can_link, [yes],
[], [],
AC_MSG_ERROR([We tried to build with stack protection; it looks like your compiler supports it but your libc does not provide it. Are you missing libssp? (You can --disable-gcc-hardening to ignore this error.)])) AC_MSG_ERROR([We tried to build with stack protection; it looks like your compiler supports it but your libc does not provide it. Are you missing libssp? (You can --disable-gcc-hardening to ignore this error.)]))
) )])
AS_VAR_POPDEF([can_link]) AS_VAR_POPDEF([can_link])
AS_VAR_POPDEF([can_compile]) AS_VAR_POPDEF([can_compile])
TOR_CHECK_CFLAGS(-Wstack-protector) TOR_CHECK_CFLAGS(-Wstack-protector)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment