From owner-svn-ports-head@freebsd.org Sat Dec 3 13:36:13 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1881AC64AF2; Sat, 3 Dec 2016 13:36:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD5D31FBE; Sat, 3 Dec 2016 13:36:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uB3DaCbP021484; Sat, 3 Dec 2016 13:36:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uB3DaBlT021477; Sat, 3 Dec 2016 13:36:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612031336.uB3DaBlT021477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Dec 2016 13:36:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r427613 - in head/sysutils: cdrtools-devel/files cdrtools/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 13:36:13 -0000 Author: dim (src committer) Date: Sat Dec 3 13:36:11 2016 New Revision: 427613 URL: https://svnweb.freebsd.org/changeset/ports/427613 Log: 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) Added: head/sysutils/cdrtools-devel/files/patch-inc_avoffset.c (contents, props changed) head/sysutils/cdrtools-devel/files/patch-inc_getfp.c (contents, props changed) head/sysutils/cdrtools-devel/files/patch-libschily_getfp.c (contents, props changed) head/sysutils/cdrtools/files/patch-inc_avoffset.c (contents, props changed) head/sysutils/cdrtools/files/patch-inc_getfp.c (contents, props changed) head/sysutils/cdrtools/files/patch-libschily_getfp.c (contents, props changed) Added: head/sysutils/cdrtools-devel/files/patch-inc_avoffset.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/cdrtools-devel/files/patch-inc_avoffset.c Sat Dec 3 13:36:11 2016 (r427613) @@ -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; + Added: head/sysutils/cdrtools-devel/files/patch-inc_getfp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/cdrtools-devel/files/patch-inc_getfp.c Sat Dec 3 13:36:11 2016 (r427613) @@ -0,0 +1,37 @@ +########################################################################### +# 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/getfp.c.orig 2015-12-23 20:18:33 UTC ++++ inc/getfp.c +@@ -80,7 +80,7 @@ getfp() + * We need this function to fool GCCs check for returning addresses + * from outside the functions local address space. + */ +-EXPORT void ** ++EXPORT __noinline void ** + ___fpoff(cp) + char *cp; + { +@@ -104,7 +104,7 @@ flush_reg_windows(n) + + #else /* HAVE_SCANSTACK */ + +-EXPORT void ** ++EXPORT __noinline void ** + getfp() + { + raisecond("getfp", 0); Added: head/sysutils/cdrtools-devel/files/patch-libschily_getfp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/cdrtools-devel/files/patch-libschily_getfp.c Sat Dec 3 13:36:11 2016 (r427613) @@ -0,0 +1,37 @@ +########################################################################### +# 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/. +########################################################################### + +--- libschily/getfp.c.orig 2015-12-23 20:18:33 UTC ++++ libschily/getfp.c +@@ -80,7 +80,7 @@ getfp() + * We need this function to fool GCCs check for returning addresses + * from outside the functions local address space. + */ +-EXPORT void ** ++EXPORT __noinline void ** + ___fpoff(cp) + char *cp; + { +@@ -104,7 +104,7 @@ flush_reg_windows(n) + + #else /* HAVE_SCANSTACK */ + +-EXPORT void ** ++EXPORT __noinline void ** + getfp() + { + raisecond("getfp", 0); Added: head/sysutils/cdrtools/files/patch-inc_avoffset.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/cdrtools/files/patch-inc_avoffset.c Sat Dec 3 13:36:11 2016 (r427613) @@ -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; + Added: head/sysutils/cdrtools/files/patch-inc_getfp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/cdrtools/files/patch-inc_getfp.c Sat Dec 3 13:36:11 2016 (r427613) @@ -0,0 +1,37 @@ +########################################################################### +# 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/getfp.c.orig 2008-06-13 22:32:03 UTC ++++ inc/getfp.c +@@ -52,7 +52,7 @@ + + EXPORT void **___fpoff __PR((char *cp)); + +-EXPORT void ** ++EXPORT __noinline void ** + getfp() + { + long **dummy[1]; +@@ -69,7 +69,7 @@ getfp() + * We need this function to fool GCCs check for returning addresses + * from outside the functions local address space. + */ +-EXPORT void ** ++EXPORT __noinline void ** + ___fpoff(cp) + char *cp; + { Added: head/sysutils/cdrtools/files/patch-libschily_getfp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/cdrtools/files/patch-libschily_getfp.c Sat Dec 3 13:36:11 2016 (r427613) @@ -0,0 +1,37 @@ +########################################################################### +# 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/. +########################################################################### + +--- libschily/getfp.c.orig 2008-06-13 22:32:03 UTC ++++ libschily/getfp.c +@@ -52,7 +52,7 @@ + + EXPORT void **___fpoff __PR((char *cp)); + +-EXPORT void ** ++EXPORT __noinline void ** + getfp() + { + long **dummy[1]; +@@ -69,7 +69,7 @@ getfp() + * We need this function to fool GCCs check for returning addresses + * from outside the functions local address space. + */ +-EXPORT void ** ++EXPORT __noinline void ** + ___fpoff(cp) + char *cp; + {