Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Apr 2014 15:58:06 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r352517 - in head/lang/guile: . files
Message-ID:  <201404281558.s3SFw6lo011394@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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