Skip to content
Snippets Groups Projects
Commit a7986755 authored by George Kadianakis's avatar George Kadianakis
Browse files

Merge branch 'tor-github/pr/1060'

parents e5ad6fb0 66eae4af
No related branches found
No related tags found
No related merge requests found
o Minor features (compilation):
- Log a more useful error message when we are compiling and one of the
compile-time hardening options we have selected can be linked but
not executed. Closes ticket 27530.
......@@ -1188,6 +1188,17 @@ m4_ifdef([AS_VAR_IF],[
TOR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
fi
TOR_TRY_COMPILE_WITH_CFLAGS(-fwrapv, also_link, CFLAGS_FWRAPV="-fwrapv", true)
AC_MSG_CHECKING([whether we can run hardened binaries])
AC_RUN_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([dnl
We can link with compiler hardening options, but we can't run with them.
That's a bad sign! If you must, you can pass --disable-gcc-hardening to
configure, but it would be better to figure out what the underlying problem
is.])],
[AC_MSG_RESULT([cross])])
fi
if test "$fragile_hardening" = "yes"; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment