diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2007-09-18 02:48:52 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2007-09-18 02:48:52 +0000 |
commit | 3ce1c8f7cce2dceeec090bdcb3bfd85c15e0adff (patch) | |
tree | a7de7f9326a4089f54a349cddab5b8b80d60a271 /lang/pcc | |
parent | cddc55bd066c9e61f0a785bbca69dcd7be5cee48 (diff) | |
download | ports-3ce1c8f7cce2dceeec090bdcb3bfd85c15e0adff.tar.gz ports-3ce1c8f7cce2dceeec090bdcb3bfd85c15e0adff.zip |
Notes
Diffstat (limited to 'lang/pcc')
-rw-r--r-- | lang/pcc/Makefile | 32 | ||||
-rw-r--r-- | lang/pcc/distinfo | 3 | ||||
-rw-r--r-- | lang/pcc/files/ccconfig.h | 48 | ||||
-rw-r--r-- | lang/pcc/files/f77config.h | 55 | ||||
-rw-r--r-- | lang/pcc/files/patch-configure | 15 | ||||
-rw-r--r-- | lang/pcc/files/patch-cpp-Makefile.in | 5 | ||||
-rw-r--r-- | lang/pcc/pkg-descr | 8 |
7 files changed, 166 insertions, 0 deletions
diff --git a/lang/pcc/Makefile b/lang/pcc/Makefile new file mode 100644 index 000000000000..4afdfe79e55f --- /dev/null +++ b/lang/pcc/Makefile @@ -0,0 +1,32 @@ +# ex:ts=8 +# Ports collection makefile for: pcc +# Date created: Mon Sept 17, 2007 +# Whom: David O'Brien (obrien@NUXI.org) +# +# $FreeBSD$ +# + +PORTNAME= pcc +PORTVERSION= 0.9.8 +PORTREVISION?= 0 +CATEGORIES= lang +MASTER_SITES= ftp://226.net120.skekraft.net/pcc/ +DISTNAME= pcc-current +EXTRACT_SUFX= .tgz + +MAINTAINER= obrien@FreeBSD.org +COMMENT= S.C.Johnson's Portable C Compiler brought into the C99 world. + +ONLY_FOR_ARCHS= i386 + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +GNU_CONFIGURE= YES +CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} + +PLIST_FILES= bin/pcc libexec/ccom libexec/cpp + +pre-configure: + ${MKDIR} ${WRKSRC}/os/freebsd + ${LN} -sf ${FILESDIR}/*.h ${WRKSRC}/os/freebsd + +.include <bsd.port.mk> diff --git a/lang/pcc/distinfo b/lang/pcc/distinfo new file mode 100644 index 000000000000..54ef9751fbb4 --- /dev/null +++ b/lang/pcc/distinfo @@ -0,0 +1,3 @@ +MD5 (pcc-current.tgz) = 7c1b4ceaf5cc710e3cf23047e329c07a +SHA256 (pcc-current.tgz) = 3aa2e353ebc61712b81c34b26a744b29810e196063b66c6fa334a80fe455b171 +SIZE (pcc-current.tgz) = 299675 diff --git a/lang/pcc/files/ccconfig.h b/lang/pcc/files/ccconfig.h new file mode 100644 index 000000000000..29bcbdb33b1a --- /dev/null +++ b/lang/pcc/files/ccconfig.h @@ -0,0 +1,48 @@ +/* $FreeBSD$ */ +/* $Id: ccconfig.h,v 1.2 2004/12/02 21:32:25 ragge Exp $ */ + +/* + * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Various settings that controls how the C compiler works. + */ + +/* common cpp predefines */ +#define CPPADD { "-D__FreeBSD__", "-D__ELF__", NULL, } +#define DYNLINKER { "-dynamic-linker", "/libexec/ld-elf.so.1", NULL } +#define CRT0FILE "/usr/lib/crt0.o" +#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/crtbegin.o", NULL } +#define ENDFILES { "/usr/lib/crtend.o", "/usr/lib/crtn.o", NULL } + +#if defined(mach_x86) +#define CPPMDADD { "-D__i386__", NULL, } +#else +#error defines for arch missing +#endif + +#define STABS diff --git a/lang/pcc/files/f77config.h b/lang/pcc/files/f77config.h new file mode 100644 index 000000000000..0367d78e431d --- /dev/null +++ b/lang/pcc/files/f77config.h @@ -0,0 +1,55 @@ +/* $FreeBSD$ */ +/* $Id: f77config.h,v 1.1 2005/04/17 20:22:18 ragge Exp $ */ + +/* + * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Various settings that controls how the f77 compiler works. + */ + +#if 0 +/* common cpp predefines */ +#define CPPADD { "-D__FreeBSD__", "-D__ELF__", NULL, } +#define DYNLINKER { "-dynamic-linker", "/libexec/ld-elf.so.1", NULL } +#define CRT0FILE "/usr/lib/crt0.o" +#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/crtbegin.o", NULL } +#define ENDFILES { "/usr/lib/crtend.o", "/usr/lib/crtn.o", NULL } +#endif +#define PASS1NAME "/usr/lib/f77pass1" +#define PASS2NAME "/lib/f1" +#define PASS2OPT "/lib/c2" +#define NOFLPASS2 "/lib/fc1" + +#define ASMNAME "/usr/bin/as" +#define LDNAME "/usr/bin/ld" +#define FOOTNAME "/usr/lib/crt0.o" +#define PROFFOOT "/usr/lib/mcrt0.o" +#define NOFLFOOT "/usr/lib/fcrt0.o" +#define NOFLPROFFOOT "/usr/lib/fmcrt0.o" +#define LIBLIST { "-lF77", "-lI77", "-lm", "-lc", "-l", NULL }; + diff --git a/lang/pcc/files/patch-configure b/lang/pcc/files/patch-configure new file mode 100644 index 000000000000..1ba6287c6adc --- /dev/null +++ b/lang/pcc/files/patch-configure @@ -0,0 +1,15 @@ +--- configure.orig 2007-09-09 10:42:33.000000000 -0700 ++++ configure 2007-09-17 19:12:41.000000000 -0700 +@@ -1997,6 +1997,12 @@ case "$target_os" in + i?86) targmach=x86 ;; + esac + ;; ++ freebsd*) ++ targos=freebsd ++ case "$target_cpu" in ++ i?86) targmach=x86 ;; ++ esac ++ ;; + linux*) + targos=linux + case "$target_cpu" in diff --git a/lang/pcc/files/patch-cpp-Makefile.in b/lang/pcc/files/patch-cpp-Makefile.in new file mode 100644 index 000000000000..9e9b831c787b --- /dev/null +++ b/lang/pcc/files/patch-cpp-Makefile.in @@ -0,0 +1,5 @@ +--- cc/cpp/Makefile.in.orig 2007-01-02 11:49:40.000000000 -0800 ++++ cc/cpp/Makefile.in 2007-09-17 19:30:58.000000000 -0700 +@@ -18 +18 @@ LEX = @LEX@ +-YACC = @YACC@ ++#YACC = @YACC@ diff --git a/lang/pcc/pkg-descr b/lang/pcc/pkg-descr new file mode 100644 index 000000000000..6b826c1e47f2 --- /dev/null +++ b/lang/pcc/pkg-descr @@ -0,0 +1,8 @@ +This compiler is based on the original Portable C Compiler by S. C. Johnson, +written in the late 70's. Even though much of the compiler has been +rewritten, some of the basics still remain. + +The intention is to write a C99 compiler while still keeping it small, simple, +fast and understandable. I think of it as if it shall be able to compile and +run on PDP11 (even if it may not happen in reality). But with this in mind it +becomes important to think twice about what algorithms are used. |