Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2023 16:05:22 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 230c626fee35 - main - textproc/groff: fix build with clang 16
Message-ID:  <202304241605.33OG5M9B017364@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=230c626fee35527dfaf32285c60b09a4e5922a7d

commit 230c626fee35527dfaf32285c60b09a4e5922a7d
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-04-23 19:30:52 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-04-24 16:02:54 +0000

    textproc/groff: fix build with clang 16
    
    Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
    Because textproc/groff's Makefile does not explicitly set its C++
    standard, this leads to several errors:
    
      src/preproc/grn/hdb.cpp:38:15: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int DBGetType(register char *s);
                    ^~~~~~~~~
      src/preproc/grn/hdb.cpp:64:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
        register ELT *temp;
        ^~~~~~~~~
      src/preproc/grn/hdb.cpp:83:8: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      DBRead(register FILE *file)
             ^~~~~~~~~
      src/preproc/grn/hdb.cpp:85:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
        register int i;
        ^~~~~~~~~
      src/preproc/grn/hdb.cpp:86:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
        register int done;            /* flag for input exhausted */
        ^~~~~~~~~
      src/preproc/grn/hdb.cpp:87:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
        register double nx;           /* x holder so x is not set before orienting */
        ^~~~~~~~~
      src/preproc/grn/hdb.cpp:212:11: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      DBGetType(register char *s)
                ^~~~~~~~~
    
    Add USE_CXXSTD=gnu++98 to avoid these errors.
    
    Approved by:    bapt (maintainer)
    MFH:            2023Q2
---
 textproc/groff/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/textproc/groff/Makefile b/textproc/groff/Makefile
index bb93769a15a6..ddefcaf8b7ec 100644
--- a/textproc/groff/Makefile
+++ b/textproc/groff/Makefile
@@ -17,6 +17,7 @@ RUN_DEPENDS:=	psselect:print/psutils
 MAKE_JOBS_UNSAFE=	yes
 
 USES=		cpe gmake iconv:wchar_t perl5 makeinfo
+USE_CXXSTD=	gnu++98
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=	--with-urw-fonts-dir=${LOCALBASE}/share/ghostscript/fonts/ \
 			--with-awk=/usr/bin/awk \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304241605.33OG5M9B017364>