pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/openjade textproc/openjade: Work around buggy...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/41519e35fb46
branches:  trunk
changeset: 418245:41519e35fb46
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Sat Nov 23 18:55:54 2019 +0000

description:
textproc/openjade: Work around buggy openjade code harder!

openjade has some buggy code, which relies on storage remaining valid
when the C++ standard says that it is undefined:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69534#c9

Recent gcc removes code that writes to this about-to-be-undefined
storage, shrinking the openjade binary.  Some versions further result
in a binary which crashes.

pkgsrc had a workaround to add -fno-tree-dse when PKGSRC_COMPILER was
equal to gcc.  That is buggy, because "ccache gcc", "distcc gcc",
etc. should also get the workaround.  This commit replaces the exact
test with a pattern match.

Now, the workaround gcc flag is passed when compiling with ccache.

Fixes pkg/54134.  Note that the comments in the PR which implicate
ccache as buggy turned out to be untrue.

diffstat:

 textproc/openjade/Makefile |  23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r de30bf7c99bd -r 41519e35fb46 textproc/openjade/Makefile
--- a/textproc/openjade/Makefile        Sat Nov 23 17:55:01 2019 +0000
+++ b/textproc/openjade/Makefile        Sat Nov 23 18:55:54 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.33 2019/08/11 13:23:26 wiz Exp $
+# $NetBSD: Makefile,v 1.34 2019/11/23 18:55:54 gdt Exp $
 
 DISTNAME=      openjade-1.3.2
-PKGREVISION=   14
+PKGREVISION=   15
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=openjade/}
 
@@ -31,11 +31,22 @@
                        ${OPENJADE_DOC_DIR}/doc \
                        ${OPENJADE_DOC_DIR}/jadedoc/images
 
+# openjade has incorrect code:
+#   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69534#c9
+#
+# Because of code in openjade that does not conform to standards, some
+# versions of gcc produce an openjade binary that segfaults.  Examples
+# are building postgresql95-docs (gcc version ?) and building the
+# pkgsrc guide (gcc included with netbsd-9).
+#
+# Bug report about openjade built with gcc crashing for postgresql
+#   https://bugzilla.redhat.com/show_bug.cgi?id=1306162
+#
+# Work around the openjade bug by asking gcc not to eliminate the dead
+# stores that openjade relies on.
+#
 .include "../../mk/compiler.mk"
-# Segfaults building postgresql95-docs. see:
-# https://bugzilla.redhat.com/show_bug.cgi?id=1306162
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69534#c9
-.if ${PKGSRC_COMPILER} == "gcc"
+.if !empty(PKGSRC_COMPILER:Mgcc)
 CFLAGS+=       -fno-tree-dse
 .endif
 



Home | Main Index | Thread Index | Old Index