mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-23 09:10:43 +00:00
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@
This commit is contained in:
parent
cf686a0152
commit
4b2a51b2c6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=352517
@ -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}
|
||||
|
18
lang/guile/files/patch-libguile_c-tokenize.c
Normal file
18
lang/guile/files/patch-libguile_c-tokenize.c
Normal file
@ -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
|
12
lang/guile/files/patch-libguile_guile-snarf.in
Normal file
12
lang/guile/files/patch-libguile_guile-snarf.in
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user