summaryrefslogtreecommitdiff
path: root/sysutils/cdrtools-devel/files/patch-inc_avoffset.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-12-03 13:36:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-12-03 13:36:11 +0000
commit9fa95ead62b58cb4c8342c0ce9db1d31aa53e84b (patch)
tree0c02d5424645c77fad41beb408976cf1a65bc52f /sysutils/cdrtools-devel/files/patch-inc_avoffset.c
parent- Update to latest GitHub version (diff)
Make frame pointer tracing in cdrtools(-devel) work correctly
The cdrtools ports compile and run a small program ('avoffset') after their configuration phase, which is supposed to figure out the stack direction, frame pointer offset to main(), and so on. This program relies on the compiler not optimizing away certain constructs, so after the import of clang 3.9.0 into base, it got stuck in an endless loop. Fix it by marking a few functions as noinline, and making one particular variable volatile. Reported by: antoine Approved by: marius (maintainer)
Notes
Notes: svn path=/head/; revision=427613
Diffstat (limited to 'sysutils/cdrtools-devel/files/patch-inc_avoffset.c')
-rw-r--r--sysutils/cdrtools-devel/files/patch-inc_avoffset.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/sysutils/cdrtools-devel/files/patch-inc_avoffset.c b/sysutils/cdrtools-devel/files/patch-inc_avoffset.c
new file mode 100644
index 000000000000..ab1af624da6d
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-inc_avoffset.c
@@ -0,0 +1,28 @@
+###########################################################################
+# This patch was contributed by Dimitry Andric.
+###########################################################################
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# See the file CDDL.Schily.txt in this distribution for details.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file CDDL.Schily.txt from this distribution.
+###########################################################################
+# The file CDDL.Schily.txt can be found in the original cdrtools tarball,
+# which is mirrored at ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/.
+###########################################################################
+
+--- inc/avoffset.c.orig 2011-11-28 19:28:41 UTC
++++ inc/avoffset.c
+@@ -60,7 +60,7 @@ main(ac, av)
+ {
+ int stdir;
+ #ifdef HAVE_SCANSTACK
+- register struct frame *fp;
++ volatile struct frame *fp;
+ register int i = 0;
+ register int o = 0;
+