From owner-svn-ports-all@FreeBSD.ORG Mon Apr 28 15:58:07 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88C1D73C; Mon, 28 Apr 2014 15:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 68B371E77; Mon, 28 Apr 2014 15:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SFw75m011397; Mon, 28 Apr 2014 15:58:07 GMT (envelope-from kwm@svn.freebsd.org) Received: (from kwm@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3SFw6lo011394; Mon, 28 Apr 2014 15:58:06 GMT (envelope-from kwm@svn.freebsd.org) Message-Id: <201404281558.s3SFw6lo011394@svn.freebsd.org> From: Koop Mast Date: Mon, 28 Apr 2014 15:58:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r352517 - in head/lang/guile: . 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 15:58:07 -0000 Author: kwm Date: Mon Apr 28 15:58:06 2014 New Revision: 352517 URL: http://svnweb.freebsd.org/changeset/ports/352517 QAT: https://qat.redports.org/buildarchive/r352517/ Log: This is a three-part for building guile with clang (or with any other modern compiler): 1) Use -fwrap in CFLAGS, since guile depends on integer overflows. 2) Fix grep + sed logic in guile-snarf.in to be compatible with the output of clang's preprocessor. This is achieved by adding additional newlines before the ^^ delimiters, which guile-snarf depends on. 3) Similarly, in c-tokenize.c, clang's preprocessor outputs EOLs and hash marks in different places, confusing the lexer. Simply don't output them to fix the problem. While here strip binaries and libraries. Submitted by: dim@ Added: head/lang/guile/files/patch-libguile_c-tokenize.c (contents, props changed) head/lang/guile/files/patch-libguile_guile-snarf.in (contents, props changed) Modified: head/lang/guile/Makefile Modified: head/lang/guile/Makefile ============================================================================== --- head/lang/guile/Makefile Mon Apr 28 15:55:51 2014 (r352516) +++ head/lang/guile/Makefile Mon Apr 28 15:58:06 2014 (r352517) @@ -4,6 +4,7 @@ PORTNAME= guile PORTVERSION= 1.8.8 +PORTREVISION= 1 CATEGORIES= lang scheme MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= guile @@ -19,6 +20,8 @@ GNU_CONFIGURE= yes USE_LDCONFIG= yes LDFLAGS+= -L${LOCALBASE}/lib CPPFLAGS+= -I${LOCALBASE}/include +CFLAGS+= -fwrapv +INSTALL_TARGET= install-strip GUILE_VER= 1.8 PLIST_SUB= GUILE_VER=${GUILE_VER} Added: head/lang/guile/files/patch-libguile_c-tokenize.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/guile/files/patch-libguile_c-tokenize.c Mon Apr 28 15:58:06 2014 (r352517) @@ -0,0 +1,18 @@ +--- libguile/c-tokenize.c 2010-12-13 20:24:04.000000000 +0100 ++++ libguile/c-tokenize.c 2014-04-13 22:20:33.000000000 +0200 +@@ -898,13 +898,13 @@ case 3: + /* rule 3 can match eol */ + YY_RULE_SETUP + #line 71 "./c-tokenize.lex" +-{ OUT(eol); } ++{ /*OUT(eol);*/ } + YY_BREAK + case 4: + /* rule 4 can match eol */ + YY_RULE_SETUP + #line 73 "./c-tokenize.lex" +-{ OUT(hash); IS_NOT_COOKIE; } ++{ /*OUT(hash);*/ IS_NOT_COOKIE; } + YY_BREAK + case 5: + YY_RULE_SETUP Added: head/lang/guile/files/patch-libguile_guile-snarf.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/guile/files/patch-libguile_guile-snarf.in Mon Apr 28 15:58:06 2014 (r352517) @@ -0,0 +1,12 @@ +--- libguile/guile-snarf.in 2010-12-13 18:24:40.000000000 +0100 ++++ libguile/guile-snarf.in 2014-04-13 21:05:42.000000000 +0200 +@@ -51,7 +51,8 @@ modern_snarf () + ## empty file. + echo "/* cpp arguments: $@ */" ; + ${cpp} -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} && cpp_ok_p=true +- grep "^ *\^ *\^" ${temp} | sed -e "s/^ *\^ *\^//" -e "s/\^\ *:\ *\^.*/;/" ++ sed -e 's/\^ *\^/\ ++^^/g' ${temp} | grep "^.*\^ *\^" | sed -e "s/^.*\^ *\^//" -e "s/\^\ *:\ *\^.*/;/" + } + + ## main