summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alkondratenko@gmail.com>2017-05-22 18:58:15 -0700
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2017-05-22 18:58:15 -0700
commitf2bae51e7e609855c26095f14ffbb84082694acb (patch)
tree039583f71ef74e4bf53b8b3b6627468b508bc1d5
parent6426c0cc8049dd50a681dc337ac9962577d5fa14 (diff)
downloadgperftools-f2bae51e7e609855c26095f14ffbb84082694acb.tar.gz
Revert "Revert "disable dynamic sized delete support by default""
This reverts commit b82d89cb7c8781a6028f6f5959cabdc5a273aec3. Dynamic sized delete support relies on ifunc handler being able to look up environment variable. The issue is, when stuff is linked with -z now linker flags, all relocations are performed early. And sadly ifunc relocations are not treated specially. So when ifunc handler runs, it cannot rely on any dynamic relocations at all, otherwise crash is real possibility. So we cannot afford doing it until (and if) ifunc is fixed. This was brought to my attention by Fedora people at https://bugzilla.redhat.com/show_bug.cgi?id=1452813
-rw-r--r--configure.ac19
1 files changed, 3 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 5171027..98efd0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,23 +345,10 @@ AM_CONDITIONAL(HAVE_W_NO_UNUSED_RESULT,
test "$perftools_cv_w_no_unused_result" = yes)
AC_ARG_ENABLE([dynamic-sized-delete-support],
- [AS_HELP_STRING([--disable-dynamic-sized-delete-support],
- [don't try to build run-time switch for sized delete operator])],
+ [AS_HELP_STRING([--enable-dynamic-sized-delete-support],
+ [try to build run-time switch for sized delete operator])],
[enable_dyn_sized_delete="$enableval"],
- [enable_dyn_sized_delete=default])
-
-AS_IF([test "x$enable_dyn_sized_delete" = xdefault],
- [AC_CACHE_CHECK(
- [if the compiler supports ifunc attributes for target],
- [perftools_cv_ifunc_result],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
- void *resolve_foo() {return 0;}
- void foo() __attribute__((ifunc("resolve_foo")));
- ],[foo();])],
- [perftools_cv_ifunc_result=yes],
- [perftools_cv_ifunc_result=no])])]
- [enable_dyn_sized_delete=$perftools_cv_ifunc_result])
+ [enable_dyn_sized_delete=no])
AS_IF([test "x$enable_dyn_sized_delete" = xyes],
[AC_DEFINE([ENABLE_DYNAMIC_SIZED_DELETE], 1,