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...

branches:  trunk
changeset: 418245:41519e35fb46
user:      gdt <>
date:      Sat Nov 23 18:55:54 2019 +0000

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:

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.


 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
 CATEGORIES=    textproc
@@ -31,11 +31,22 @@
                        ${OPENJADE_DOC_DIR}/doc \
+# openjade has incorrect code:
+# 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
+# Work around the openjade bug by asking gcc not to eliminate the dead
+# stores that openjade relies on.
 .include "../../mk/"
-# Segfaults building postgresql95-docs. see:
-.if ${PKGSRC_COMPILER} == "gcc"
+.if !empty(PKGSRC_COMPILER:Mgcc)
 CFLAGS+=       -fno-tree-dse

Home | Main Index | Thread Index | Old Index