diff options
author | gerald <gerald@FreeBSD.org> | 2003-06-18 05:17:12 +0800 |
---|---|---|
committer | gerald <gerald@FreeBSD.org> | 2003-06-18 05:17:12 +0800 |
commit | 7d956f2965ce4fd734b5905cf3e19a6442c2b1d1 (patch) | |
tree | 9404eea82d74cbc1d3acfe364fa32024b8b27a4d /lang/gcc-ooo/Makefile | |
parent | 8a3c8787f68a16ddcc362308b5e0260e3aa2a454 (diff) | |
download | freebsd-ports-graphics-7d956f2965ce4fd734b5905cf3e19a6442c2b1d1.tar.gz freebsd-ports-graphics-7d956f2965ce4fd734b5905cf3e19a6442c2b1d1.tar.zst freebsd-ports-graphics-7d956f2965ce4fd734b5905cf3e19a6442c2b1d1.zip |
Add bounds-checking support using Herman ten Brugge's patches.
PR: 53395
Submitted by: Dan Nelson <dnelson@allantgroup.com>
Diffstat (limited to 'lang/gcc-ooo/Makefile')
-rw-r--r-- | lang/gcc-ooo/Makefile | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lang/gcc-ooo/Makefile b/lang/gcc-ooo/Makefile index 5f5893001f6..88019578708 100644 --- a/lang/gcc-ooo/Makefile +++ b/lang/gcc-ooo/Makefile @@ -14,7 +14,8 @@ PORTVERSION= 3.3 PORTREVISION= ${SNAPDATE:S/-//g} CATEGORIES= lang java VERSIONSTRING= ${PORTVERSION} -MASTER_SITES= ${MASTER_SITE_GCC} +MASTER_SITES= ${MASTER_SITE_GCC} \ + http://web.inter.NL.net/hcc/Haj.Ten.Brugge/:bc MASTER_SITE_SUBDIR= releases/gcc-${VERSIONSTRING} .if !defined(CVS_DATE) DISTFILES= \ @@ -29,6 +30,14 @@ DISTFILES= \ MAINTAINER?= ports@FreeBSD.org COMMENT?= GNU Compiler Collection 3.3 +.if defined (WITH_BOUNDSCHECKING) +# Fetch another file, but don't extract it. Also add another patchfile. +BCPATCH= bounds-checking-gcc-3.3-1.00.patch.bz2 +DISTFILES+= ${BCPATCH}:bc +EXTRACT_ONLY= ${DISTFILES:S/${BCPATCH}:bc//} +EXTRA_PATCHES= ${FILESDIR}/opt.patch-bc +.endif + LATEST_LINK?= gcc33${PKGNAMESUFFIX} USE_BZIP2= yes @@ -82,6 +91,11 @@ MAN7= fsf-funding.7 gfdl.7 gpl.7 pre-fetch: @${ECHO} "Making GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} ${OSREL} ${PORTOBJFORMAT} target ${CONFIGURE_TARGET}" +.if !defined(WITH_BOUNDSCHECKING) + @${ECHO_MSG} "You can enable fine-grained bounds-checking support for compiled C programs" + @${ECHO_MSG} "by defining WITH_BOUNDSCHECKING. Compile and link with \"-fbounds-checking\"" + @${ECHO_MSG} "to use." +.endif .if defined(CVS_DATE) NO_CHECKSUM= yes @@ -111,6 +125,15 @@ do-extract: cd ${DISTDIR}/${DIST_SUBDIR}/${DIST_SUBDIR ; pax -pe -rwt . ${SRCDIR} .endif # CVS_DATE +.if defined(WITH_BOUNDSCHECKING) +# Extract bounds-checking patch, removing the ada parts of the patch with sed. +pre-patch: + cd ${_DISTDIR} ; \ + ${BZCAT} ${BCPATCH} | \ + ${SED} -e '/^--- .*ada/,/^diff/d' | \ + ${PATCH} -d ${PATCH_WRKSRC} -E -p1 --quiet +.endif + post-patch: @${REINPLACE_CMD} -e 's#\(const char version_string.*\)";#\1 [FreeBSD]";#' \ ${SRCDIR}/gcc/version.c |