]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
pass our compiler -fasynchronous-unwind-tables by default
authorNick Mathewson <nickm@torproject.org>
Mon, 24 Feb 2014 16:41:53 +0000 (11:41 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 24 Feb 2014 16:45:03 +0000 (11:45 -0500)
This should make more platforms (in particular, ones with compilers
where -fomit-frame-pointer is on by default but table generation
isn't) support backtrace generation.  Thanks to cypherpunks for this
one.

Fixes bug 11047; bugfix on 0.2.5.2-alpha.

changes/bug11047 [new file with mode: 0644]
configure.ac

diff --git a/changes/bug11047 b/changes/bug11047
new file mode 100644 (file)
index 0000000..25acd8e
--- /dev/null
@@ -0,0 +1,9 @@
+  o Minor bugfixes:
+
+    - Build using the -fasynchronous-unwind-tables option so that more
+      platforms (in particular, ones like 32-bit Intel where the
+      -fomit-frame-pointer option is on by default and table
+      generation is not) will support generating backtraces. This
+      doesn't yet add Windows support yet; only Linux, OSX, and some BSD
+      are affected. Reported by 'cypherpunks'; fixes bug 11047; bugfix
+      on 0.2.5.2-alpha.
index 871ca5613c2fe41818b0629fabbb2c3373754c7c..187fadc3b04698acea26bbb5c4f991159a0549c5 100644 (file)
@@ -648,6 +648,13 @@ fi
 CFLAGS="$saved_CFLAGS"
 AC_SUBST(F_OMIT_FRAME_POINTER)
 
+dnl ------------------------------------------------------
+dnl If we are adding -fomit-frame-pointer (or if the compiler's doing it
+dnl for us, as GCC 4.6 and later do at many optimization levels), then
+dnl we should try to add -fasynchronous-unwind-tables so that our backtrace
+dnl code will work.
+TOR_CHECK_CFLAGS(-fasynchronous-unwind-tables)
+
 dnl ------------------------------------------------------
 dnl Where do you live, libnatpmp?  And how do we call you?
 dnl There are no packages for Debian or Redhat as of this patch