From owner-svn-ports-head@freebsd.org Wed Aug 1 08:03:52 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A2EC105D702; Wed, 1 Aug 2018 08:03:52 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD5B18752C; Wed, 1 Aug 2018 08:03:51 +0000 (UTC) (envelope-from tobik@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A92381FC7A; Wed, 1 Aug 2018 08:03:51 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7183pnb092509; Wed, 1 Aug 2018 08:03:51 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7183p9H092508; Wed, 1 Aug 2018 08:03:51 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201808010803.w7183p9H092508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Wed, 1 Aug 2018 08:03:51 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r476164 - in head/devel/ncc: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/devel/ncc: . files X-SVN-Commit-Revision: 476164 X-SVN-Commit-Repository: ports 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.27 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: Wed, 01 Aug 2018 08:03:52 -0000 Author: tobik Date: Wed Aug 1 08:03:51 2018 New Revision: 476164 URL: https://svnweb.freebsd.org/changeset/ports/476164 Log: devel/ncc: Fix build with Clang 6 preproc.C:275:7: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] "ncc "NCC_VERSION" - The new/next generation C compiler\n" ^ http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475478_s336801/logs/errors/ncc-2.8_2.log nccnav.C:334:15: error: constant expression evaluates to -1 which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing] } NoChunk = { ~0, ~0 }; ^~ Added: head/devel/ncc/files/ head/devel/ncc/files/patch-preproc.C (contents, props changed) Modified: head/devel/ncc/Makefile Modified: head/devel/ncc/Makefile ============================================================================== --- head/devel/ncc/Makefile Wed Aug 1 07:55:19 2018 (r476163) +++ head/devel/ncc/Makefile Wed Aug 1 08:03:51 2018 (r476164) @@ -15,9 +15,12 @@ LICENSE_FILE= ${WRKSRC}/doc/LICENSE ALL_TARGET= # empty MAKE_ARGS= CC="${CXX}" LCFLAGS="${CFLAGS}" -USES= ncurses python:run shebangfix +USES= compiler ncurses python:run shebangfix SHEBANG_FILES= scripts/*.py -CFLAGS+= -DNOGNU='\"${PREFIX}/include/ncc/nognu\"' -fpermissive +# build ignores CXXFLAGS +CFLAGS+= -DNOGNU='\"${PREFIX}/include/ncc/nognu\"' -fpermissive \ + ${CFLAGS_${CHOSEN_COMPILER_TYPE}} +CFLAGS_clang= -Wno-c++11-narrowing PORTDOCS= * Added: head/devel/ncc/files/patch-preproc.C ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ncc/files/patch-preproc.C Wed Aug 1 08:03:51 2018 (r476164) @@ -0,0 +1,74 @@ +preproc.C:275:7: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] +"ncc "NCC_VERSION" - The new/next generation C compiler\n" + ^ + +--- preproc.C.orig 2008-10-11 15:18:56 UTC ++++ preproc.C +@@ -47,7 +47,7 @@ static void openout (char *f, char *mode = "w") + if (!f) return; + char *c = (char*) alloca (strlen (f) + sizeof OUTPUT_EXT); + report_stream = fopen (strcat (strcpy (c, f), OUTPUT_EXT), mode); +- fprintf (stderr, "ncc: output file is ["COLS"%s"COLE"]\n", c); ++ fprintf (stderr, "ncc: output file is [" COLS "%s" COLE "]\n", c); + } + + static void stripout (char *f) +@@ -55,7 +55,7 @@ static void stripout (char *f) + if (report_stream != stdout) { + fclose (report_stream); + char tmp [1024]; +- sprintf (tmp, "nccstrip2.py %s"OUTPUT_EXT" %s"OUTPUT_EXT, f, f); ++ sprintf (tmp, "nccstrip2.py %s" OUTPUT_EXT " %s" OUTPUT_EXT, f, f); + system (tmp); + } + report_stream = stdout; +@@ -86,7 +86,7 @@ static void LINK (char **obj, int objn) + strcat (strcpy (ncobj, obj [i]), OUTPUT_EXT); + load_file L (ncobj); + if (L.success == ZC_OK) { +- fprintf (stderr, "ncc: Linking object file ["COLS"%s"COLE"] (%i bytes)\n", ++ fprintf (stderr, "ncc: Linking object file [" COLS "%s" COLE "] (%i bytes)\n", + ncobj, L.len); + PRINTF (NCCOBJ"%s\n", ncobj); + CATFILE (L.data, L.len, report_stream); +@@ -157,7 +157,7 @@ static void nccar_x (int argc, char **argv) + n [strlen (n) - 1] = 0; + if (OUTF) fclose (OUTF); + OUTF = fopen (n, "w"); +- fprintf (stderr, "ncc: extract ["COLS"%s"COLE"]\n", n); ++ fprintf (stderr, "ncc: extract [" COLS "%s" COLE "]\n", n); + } + if (OUTF) + fputs (tmp, OUTF); +@@ -272,7 +272,7 @@ static void emubinutils (int argc, char **argv) + } + + const char help [] = +-"ncc "NCC_VERSION" - The new/next generation C compiler\n" ++"ncc " NCC_VERSION " - The new/next generation C compiler\n" + "The user is the only one responsible for any damages\n" + "Written by Stelios Xanthakis\n" + "Homepage: http://students.ceid.upatras.gr/~sxanth/ncc/\n" +@@ -282,10 +282,10 @@ const char help [] = + " -ncgcc=PROG : use PROG instead of \"gcc\"\n" + " -nccpp=PROG : use PROG for preprocessing\n" + " Files:\n" +-" -ncld : emulate object file output: write the output to "OUTPUT_EXT"\n" +-" -ncoo : write the output to sourcefile.c"OUTPUT_EXT"\n" ++" -ncld : emulate object file output: write the output to " OUTPUT_EXT "\n" ++" -ncoo : write the output to sourcefile.c" OUTPUT_EXT "\n" + " -ncspp : keep sourcefile.i preprocessor output instead of " +- PREPROCESSOR_OUTPUT"\n" ++ PREPROCESSOR_OUTPUT "\n" + " Output:\n" + " -nccc : compile and produce virtual bytecode\n" + " -ncmv : display multiple uses of functions and variables\n" +@@ -301,7 +301,7 @@ const char help [] = + " -nc- : ignored option\n" + "\nncc can also be called as 'nccar', 'nccld', 'nccc++', 'nccg++'\n" + "In these cases it will invoke the programs 'ar', 'ld', 'c++' and 'g++'\n" +-"and then attempt to collect and link object files with the extension "OUTPUT_EXT"\n" ++"and then attempt to collect and link object files with the extension " OUTPUT_EXT "\n" + ; + + void preproc (int argc, char**argv)