From b16558271dd6dd9b3b879c9898e270dfd6a36bc4 Mon Sep 17 00:00:00 2001 From: obrien Date: Wed, 26 Aug 1998 09:41:56 +0000 Subject: gcc with bounds checking support for pointers and memory --- lang/bc-gcc/Makefile | 61 +++++++++++++++++++++++++++++++++++ lang/bc-gcc/distinfo | 3 ++ lang/bc-gcc/files/patch-01 | 7 ++++ lang/bc-gcc/files/patch-10 | 79 ++++++++++++++++++++++++++++++++++++++++++++++ lang/bc-gcc/pkg-comment | 1 + lang/bc-gcc/pkg-descr | 11 +++++++ lang/bc-gcc/pkg-plist | 74 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 236 insertions(+) create mode 100644 lang/bc-gcc/Makefile create mode 100644 lang/bc-gcc/distinfo create mode 100644 lang/bc-gcc/files/patch-01 create mode 100644 lang/bc-gcc/files/patch-10 create mode 100644 lang/bc-gcc/pkg-comment create mode 100644 lang/bc-gcc/pkg-descr create mode 100644 lang/bc-gcc/pkg-plist diff --git a/lang/bc-gcc/Makefile b/lang/bc-gcc/Makefile new file mode 100644 index 0000000..87c65b4 --- /dev/null +++ b/lang/bc-gcc/Makefile @@ -0,0 +1,61 @@ +# ex:ts=8 +# Ports collection makefile for: gcc-2.7.2 - Bounds checking gcc +# Version required: gcc-2.7.2 + Bounds checking patches +# Date created: Sun June 08, 1997 +# Whom: David O'Brien (obrien@FreeBSD.org) +# +# $Id: Makefile,v 1.3 1997/06/08 12:58:59 andreas Exp $ +# + +DISTNAME= gcc-2.7.2 +PKGNAME= bc-gcc-2.7.2p1.0.2 +CATEGORIES= lang +MASTER_SITES= ${MASTER_SITE_GNU} \ + ftp://dse.doc.ic.ac.uk/pub/misc/bcc/ \ + ftp://ftp.cs.yale.edu/WWW/pub/bradley/bcc/ \ + ftp://ftp.cs.columbia.edu/archives/gnu/bcc/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} documentation-as-8x11-ps.tgz + +PATCH_SITES= ftp://dse.doc.ic.ac.uk/pub/misc/bcc/ \ + ftp://ftp.cs.yale.edu/WWW/pub/bradley/bcc/ \ + ftp://ftp.cs.columbia.edu/archives/gnu/bcc/ +PATCHFILES= bounds-checking-2.7.2-1.02.tgz +PATCH_DIST_STRIP= -p1 -N -E + +MAINTAINER= obrien@FreeBSD.org + +OSVERSION!= sysctl -n kern.osreldate +.if ${OSVERSION} >= 300000 +BROKEN= "can't find /usr/lib/aout/crt0.o" +.endif + +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} ${PATCHFILES} +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-gnu-as --with-gnu-ld +ALL_TARGET= bootstrap LANGUAGES=c +INSTALL_TARGET= install LANGUAGES=c +GNUHOST= i386-unknown-freebsd${OSREL} +PLIST_SUB= GNUHOST=${GNUHOST} +MAN1= bc-gcc.1 bc-cccp.1 + +pre-patch: + cd ${WRKSRC} ; ${PATCH} -p1 < bounds-checking.diff + +pre-configure: + @( cd ${WRKSRC}/config/i386/ ; \ + MAJ=`sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \ + ${MV} freebsd.h freebsd.h.in ; \ + ${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd.h.in \ + >freebsd.h ) + cd ${WRKSRC} ; ./configure ; make distclean + +post-install: + @mv ${PREFIX}/bin/gcc ${PREFIX}/bin/bc-gcc + @mv ${PREFIX}/bin/${GNUHOST}-gcc ${PREFIX}/bin/${GNUHOST}-bc-gcc + @mv ${PREFIX}/man/man1/gcc.1 ${PREFIX}/man/man1/bc-gcc.1 + @mv ${PREFIX}/man/man1/cccp.1 ${PREFIX}/man/man1/bc-cccp.1 + @( for prog in ${PREFIX}/bin/bc-gcc ${PREFIX}/bin/${GNUHOST}-bc-gcc ; \ + do strip $$prog ; \ + done ) + +.include diff --git a/lang/bc-gcc/distinfo b/lang/bc-gcc/distinfo new file mode 100644 index 0000000..8aa26c3 --- /dev/null +++ b/lang/bc-gcc/distinfo @@ -0,0 +1,3 @@ +MD5 (gcc-2.7.2.tar.gz) = d32bb8fd2fc1d575a4f8b812ff77ec22 +MD5 (documentation-as-8x11-ps.tgz) = 0c1a41f4e184ac0ba45017ddebc6bd08 +MD5 (bounds-checking-2.7.2-1.02.tgz) = 4f44566950f214787253fbf2476d6088 diff --git a/lang/bc-gcc/files/patch-01 b/lang/bc-gcc/files/patch-01 new file mode 100644 index 0000000..befa548 --- /dev/null +++ b/lang/bc-gcc/files/patch-01 @@ -0,0 +1,7 @@ +--- config/i386/x-freebsd.orig Mon Oct 31 04:52:41 1994 ++++ config/i386/x-freebsd Thu Jul 23 19:04:59 1998 +@@ -1,3 +1,3 @@ + # Don't run fixproto + STMP_FIXPROTO = +-CLIB=-lgnumalloc ++#CLIB=-lgnumalloc diff --git a/lang/bc-gcc/files/patch-10 b/lang/bc-gcc/files/patch-10 new file mode 100644 index 0000000..1f8b62d --- /dev/null +++ b/lang/bc-gcc/files/patch-10 @@ -0,0 +1,79 @@ +--- Makefile.in.bc Fri Aug 21 02:44:07 1998 ++++ Makefile.in Fri Aug 21 02:44:08 1998 +@@ -121,7 +121,7 @@ + # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test. + # Usually the one we just built. + # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). +-GCC_FOR_TARGET = ./xgcc -B./ ++GCC_FOR_TARGET = ./xgcc -v -B./ + + # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. + # It omits XCFLAGS, and specifies -B./. +@@ -944,7 +944,7 @@ + cd bounds/lib; \ + $(MAKE) -f $${srcdir1}/bounds/lib/Makefile libcheck.a \ + srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ +- GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \ ++ GCC_FOR_TARGET="$${thisdir1}/xgcc -v -B$${thisdir1}/" \ + GCC_CFLAGS="$(GCC_CFLAGS)" + -rm -f $(LIBCHECK) + ln bounds/lib/libcheck.a . >/dev/null 2>&1 || cp bounds/lib/libcheck.a . +@@ -957,7 +957,7 @@ + cd bounds/lib; \ + $(MAKE) -f $$srcdir1/bounds/lib/Makefile libcheck.a \ + srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ +- GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \ ++ GCC_FOR_TARGET="$$thisdir1/xgcc -v -B$$thisdir1/" \ + GCC_CFLAGS="$(GCC_CFLAGS)" + -rm -f $(LIBCHECK) + ln bounds/lib/libcheck.a . >/dev/null 2>&1 || cp bounds/lib/libcheck.a . +@@ -1029,7 +1029,7 @@ + cd objc; \ + $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \ + srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ +- GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \ ++ GCC_FOR_TARGET="$${thisdir1}/xgcc -v -B$${thisdir1}/" \ + GCC_CFLAGS="$(GCC_CFLAGS)" + -rm -f libobjc.a + ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a . +@@ -1042,7 +1042,7 @@ + cd objc; \ + $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \ + srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ +- GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \ ++ GCC_FOR_TARGET="$$thisdir1/xgcc -v -B$$thisdir1/" \ + GCC_CFLAGS="$(GCC_CFLAGS)" + + # Compile two additional files that are linked with every program +@@ -1828,7 +1828,7 @@ + cd objc; \ + $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \ + srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ +- GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \ ++ GCC_FOR_TARGET="$${thisdir1}/xgcc -v -B$${thisdir1}/" \ + GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include + touch objc-headers + +@@ -2422,17 +2422,17 @@ + # To prevent `make install' from compiling alloca.o and then relinking cc1 + # because alloca.o is newer, we permit these recursive makes to compile + # alloca.o. Then cc1 is newer, so it won't have to be relinked. +- $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" ++ $(MAKE) CC="stage1/xgcc -v -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" + $(MAKE) stage2 +- $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" ++ $(MAKE) CC="stage2/xgcc -v -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" + + bootstrap2: force +- $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" ++ $(MAKE) CC="stage1/xgcc -v -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" + $(MAKE) stage2 +- $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" ++ $(MAKE) CC="stage2/xgcc -v -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" + + bootstrap3: force +- $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" ++ $(MAKE) CC="stage2/xgcc -v -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" + + # Compare the object files in the current directory with those in the + # stage2 directory. diff --git a/lang/bc-gcc/pkg-comment b/lang/bc-gcc/pkg-comment new file mode 100644 index 0000000..58d0a53 --- /dev/null +++ b/lang/bc-gcc/pkg-comment @@ -0,0 +1 @@ +gcc with bounds checking support for pointers and memory diff --git a/lang/bc-gcc/pkg-descr b/lang/bc-gcc/pkg-descr new file mode 100644 index 0000000..d5ab69f --- /dev/null +++ b/lang/bc-gcc/pkg-descr @@ -0,0 +1,11 @@ +More Info: + + share/docs/bc-gcc/documentation-as-8x11-ps.tgz + +For more information, there are WWW pages for this software: + + http://www-dse.doc.ic.ac.uk/~rj3/bounds-checking.html + -or- http://www-ala.doc.ic.ac.uk/~phjk/BoundsChecking.html + +-- David + obrien@cs.ucdavis.edu diff --git a/lang/bc-gcc/pkg-plist b/lang/bc-gcc/pkg-plist new file mode 100644 index 0000000..06c0dfc --- /dev/null +++ b/lang/bc-gcc/pkg-plist @@ -0,0 +1,74 @@ +@comment $Id$ +bin/bc-gcc +bin/%%GNUHOST%%-bc-gcc +@comment @unexec install-info --delete %D/info/cpp.info %D/info/dir +@comment @unexec install-info --delete %D/info/gcc.info %D/info/dir +info/cpp.info +info/cpp.info-1 +info/cpp.info-2 +info/cpp.info-3 +info/gcc.info +info/gcc.info-1 +info/gcc.info-10 +info/gcc.info-11 +info/gcc.info-12 +info/gcc.info-13 +info/gcc.info-14 +info/gcc.info-15 +info/gcc.info-16 +info/gcc.info-17 +info/gcc.info-18 +info/gcc.info-19 +info/gcc.info-2 +info/gcc.info-20 +info/gcc.info-21 +info/gcc.info-22 +info/gcc.info-23 +info/gcc.info-24 +info/gcc.info-25 +info/gcc.info-26 +info/gcc.info-3 +info/gcc.info-4 +info/gcc.info-5 +info/gcc.info-6 +info/gcc.info-7 +info/gcc.info-8 +info/gcc.info-9 +@exec install-info +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/syslimits.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/hash.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/list.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/sarray.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/objc.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/objc-api.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/NXConstStr.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/Object.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/Protocol.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/encoding.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/objc/typedstream.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/stdarg.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/stddef.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/varargs.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-alpha.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-h8300.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-i860.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-i960.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-mips.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-m88k.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-pa.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-pyr.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-sparc.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-clipper.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-spur.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/iso646.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/va-ppc.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/proto.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/limits.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/README +lib/gcc-lib/%%GNUHOST%%/2.7.2/include/float.h +lib/gcc-lib/%%GNUHOST%%/2.7.2/cc1 +lib/gcc-lib/%%GNUHOST%%/2.7.2/specs +lib/gcc-lib/%%GNUHOST%%/2.7.2/cpp +lib/gcc-lib/%%GNUHOST%%/2.7.2/libgcc.a +lib/gcc-lib/%%GNUHOST%%/2.7.2/libcheck.a +%%GNUHOST%%/include/assert.h -- cgit v1.1