diff options
author | joerg <joerg@FreeBSD.org> | 1995-03-27 02:08:54 +0800 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-03-27 02:08:54 +0800 |
commit | 5b58816989576b0225237058ece5972845c2baf7 (patch) | |
tree | e1dc25a9f52ecfdd6d712c661af1ea0d1a53772b /devel | |
parent | 3ad1ddc19d54250629aa1441014881dd415758a0 (diff) | |
download | freebsd-ports-gnome-5b58816989576b0225237058ece5972845c2baf7.tar.gz freebsd-ports-gnome-5b58816989576b0225237058ece5972845c2baf7.tar.zst freebsd-ports-gnome-5b58816989576b0225237058ece5972845c2baf7.zip |
Bruce Evans' bcc C compiler.
It is able to handle 16-bit code as well, and comes with an own
assembler and loader. (They are already known from Minix and Linux as
the `bin86' package.)
With a bit of `dd' magic, bcc can be used to compile messdos programs.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/bcc/Makefile | 10 | ||||
-rw-r--r-- | devel/bcc/distinfo | 1 | ||||
-rw-r--r-- | devel/bcc/files/Makefile.bcc | 18 | ||||
-rw-r--r-- | devel/bcc/files/as86.1 | 158 | ||||
-rw-r--r-- | devel/bcc/files/bcc-cc1.1 | 128 | ||||
-rw-r--r-- | devel/bcc/files/bcc.1 | 233 | ||||
-rw-r--r-- | devel/bcc/files/ld86.1 | 138 | ||||
-rw-r--r-- | devel/bcc/files/patch-aa | 66 | ||||
-rw-r--r-- | devel/bcc/files/patch-ab | 75 | ||||
-rw-r--r-- | devel/bcc/files/patch-ac | 86 | ||||
-rw-r--r-- | devel/bcc/pkg-comment | 1 | ||||
-rw-r--r-- | devel/bcc/pkg-descr | 17 | ||||
-rw-r--r-- | devel/bcc/pkg-plist | 14 | ||||
-rw-r--r-- | devel/bcc/scripts/configure | 49 |
14 files changed, 994 insertions, 0 deletions
diff --git a/devel/bcc/Makefile b/devel/bcc/Makefile new file mode 100644 index 000000000000..d9876aeb0b7c --- /dev/null +++ b/devel/bcc/Makefile @@ -0,0 +1,10 @@ +# New ports collection makefile for: bcc +# Date created: 26 March 1995 +# Whom: joerg +# +# $Id: Makefile,v 1.1.1.1 1994/12/28 11:53:41 joerg Exp $ +# + +DISTNAME= bcc + +.include <bsd.port.mk> diff --git a/devel/bcc/distinfo b/devel/bcc/distinfo new file mode 100644 index 000000000000..14cf819e0fe0 --- /dev/null +++ b/devel/bcc/distinfo @@ -0,0 +1 @@ +MD5 (bcc.tar.gz) = b372eb6c6c709f1fba62098def3d4096 diff --git a/devel/bcc/files/Makefile.bcc b/devel/bcc/files/Makefile.bcc new file mode 100644 index 000000000000..0e9d44f53dd0 --- /dev/null +++ b/devel/bcc/files/Makefile.bcc @@ -0,0 +1,18 @@ +.include "../Makefile.inc" + +.PATH: ../bcc-cc1 + +CFLAGS += -DNSIG=32 +CFLAGS += -Wall +CFLAGS += -DLOCALPREFIX=\"${LOCALPREFIX}\" +LDFLAGS = + + +SRCS = bcc.c + +PROG = bcc + +BINDIR = ${LOCALPREFIX}/bin +MANDIR = ${LOCALPREFIX}/man/man + +.include <bsd.prog.mk> diff --git a/devel/bcc/files/as86.1 b/devel/bcc/files/as86.1 new file mode 100644 index 000000000000..e4441d3fa89c --- /dev/null +++ b/devel/bcc/files/as86.1 @@ -0,0 +1,158 @@ +.\" +.\" This manual page has been assembled after Bruce's original bcc.doc +.\" file by Jörg Wunsch <joerg@FreeBSD.org>. +.\" It is redistributed under the same conditions as the whole bcc +.\" package itself. +.\" +.Dd March 26, 1995 +.Os +.Dt AS86 1 +.Sh NAME +.Nm as86 +.Nd assembler for 8086/80386 +.Sh SYNOPSIS +.Nm as86 +.Op Fl 03agjuw +.Op Fl b Op Ar bin +.Op Fl lm Op Ar list +.Op Fl n Ar name +.Op Fl o Ar obj +.Op Fl s Ar sym +.Ar src +.Sh DESCRIPTION + +.Ss Overview +.Nm As86 +is an assembler for 8086 or 80386 CPUs. Its syntax resembles rather +the usual 8086 assembler syntax than the AT&T-like syntax as used by +the system's assembler +.Xr as 1 . + +It can also be compiled to support the Motorola 6809 CPU. The name +.Nm as86 +has only been chosen to make it distinct from the system's assembler. + +.Ss Options + +.Bl -tag -width indent -compact + +.It Fl 0 +.Pq the digit 0 +start with 16-bit code segment + +.It Fl 3 +start with 32-bit code segment + +.It Fl a +enable partial compatibility with asld + +.It Fl b +produce binary file, filename may follow +.Pq obsolete + +.It Fl g +only put global symbols in object file + +.It Fl j +force all jumps to be long + +.It Fl l +produce list file, filename may follow + +.It Fl m +print macro expansions in listing + +.It Fl n +name of module follows +.Pq goes in object instead of source name + +.It Fl o +produce object file, filename follows + +.It Fl s +produce symbol file, filename follows +.Pq obsolete + +.It Fl u +take undefined symbols as imported-with-unspecified segment + +.It Fl w +don't print warnings + +.El + +The 6809 version does not support +.Fl 0 , +.Fl 3 , +.Fl a +or +.Fl j . + + +.Ss Defaults +Off or none except for these; no output is produced without a flag: + +.Bl -tag -width indenct -compact + +.It Fl 0 | Fl 3 +native, i.\& e. 80386 + +.It Ar list +stdout +.Pq beware of clobbering next arg + +.It Ar name +basename of the source name + +.El + +.Ss Input syntax + +The following lists all acceptable names except the CPU instructions: + +.Bl -tag -width "XXXXXXX" -compact -offset indent + +.It Register names + +bp, bx, di, si, eax, ebp, ecx, edi, edx, esi, esp, +ax, cx, dx, sp, ah, al, bh, bl, ch, cl, dh, dl, +cs, ds, es, fs, gs, ss, cr0, cr2, cr3, dr0, dr1, +dr3, dr6, dr7, tr3, tr4, tr5, tr6, tr7, st. + +.It Type sizes + +byte, dword, fword, far, ptr, pword, qword, tbyte, word. + +.It Pseudo-operations + +else, elseif, elseifc, endif, if, ifc; +\&.align, .ascii, .blkb, .blkw, block, .bss, .byte, comm, .comm, +\&.data, .data1, .data2, .data4, db, dd, .define, dw, end, endb, +enter, entry, equ, .even, export, extern, .extern, extrn, fail, .fail, +fcb, fcc, fdb, get, .globl, ident, import, include, lcomm, .lcomm, +\&.list, loc, .long, .maclist, macro, .map, org, .org, public, +rmb, .rom, .sect, set, setdp, .short, .space, .text, use16, +use32, .warn, .word, .zero. + +.El +.Sh SEE ALSO + +.Xr as 1 ; +.Xr ld86 1 , +.Xr bcc 1 . + +.Sh AUTHORS + +This program has been developed by Bruce Evans. + +.Sh BUGS + +The +.Fl u +and +.Fl w +options are perhaps back to front because they are needed for cc1 +output and Minix's make does the wrong thing with .s files left +around. However, all assembler code not written by compilers should +assemble with them turned off. + diff --git a/devel/bcc/files/bcc-cc1.1 b/devel/bcc/files/bcc-cc1.1 new file mode 100644 index 000000000000..ff9ffa5c0c99 --- /dev/null +++ b/devel/bcc/files/bcc-cc1.1 @@ -0,0 +1,128 @@ +.\" +.\" This manual page has been assembled after Bruce's original bcc.doc +.\" file by Jörg Wunsch <joerg@FreeBSD.org>. +.\" It is redistributed under the same conditions as the whole bcc +.\" package itself. +.\" +.Dd March 26, 1995 +.Os +.Dt BCC-CC1 1 +.Sh NAME +.Nm bcc-cc1 +.Nd C compiler backend +.Sh SYNOPSIS +.Nm bcc-cc1 +.Op Fl 03EPcdfltw Ns Op - +.Op Fl D Ns Ar define +.Op Fl I Ns Ar include_dir +.Op Fl U Ns Ar undef +.Op Fl o Ar outfile +.Op Ar infile + +.Sh DESCRIPTION + +.Nm Bcc-cc1 +is the backend for the +.Xr bcc 1 +C compiler. + +It understands the following options: + +.Bl -tag -width indent -compact + +.It Fl 0 +.Pq the digit 0 +8086 target +.Pq works even on 80386 host + +.It Fl 3 +80386 target +.Pq works even on 8086 host + +.It Fl D +define + +.It Fl E +produce preprocessor output + +.It Fl I +include search path + +.It Fl P +produce preprocessor output with no line numbers + +.It Fl c +produce code with caller saving regs before function calls + +.It Fl d +print debugging information in assembly output + +.It Fl f +produce code with 1st argument passed in a register + +.It Fl l +produce code for 2 3 1 0 long byte order +.Pq only works in 16-bit versions + +.It Fl o +assembler output file name follows + +.It Fl p +produce +.Pq almost +position-independent code + +.It Fl t +print source code in assembly output + +.It Fl w +print what cc1 thinks is the location counter in assembly output + +.El + +All the options except +.Fl D , +.Fl I +and +.Fl o +may be turned off by following the +option letter by a +.Sq - . +Options are processed left to right so the last setting has precedence. + +The following is defined before option processing: + +.Bd -literal +__BCC__ 1 +.Ed + +The following may be defined after option processing: + +.Bd -literal +__AS09__ 1 if 6809 version +__AS386_16__ 1 if -0 option on 80*86 +__AS386_32__ 1 if -3 option on 80*86 +__CALLER_SAVES__ 1 if -c option +__FIRST_ARG_IN_AX__ 1 if -f option on 80*86 +__FIRST_ARG_IN_X__ 1 if -f option on 6809 +__LONG_BIG_ENDIAN__ 1 if -l option +__POS_INDEPENDENT__ 1 if -p option on 6809 +.Ed + +The following are standard builtins: + +.Bd +__FILE__ stringized name of current input file +__LINE__ current line number +.Ed + +.Sh FILES +.Pa /usr/local/lib/bcc/bcc-cc1 + +.Sh SEE ALSO + +.Xr bcc 1 . + +.Sh AUTHORS + +This program has been written by Bruce Evans. diff --git a/devel/bcc/files/bcc.1 b/devel/bcc/files/bcc.1 new file mode 100644 index 000000000000..c1ee9a9ac6fb --- /dev/null +++ b/devel/bcc/files/bcc.1 @@ -0,0 +1,233 @@ +.\" +.\" This manual page has been assembled after Bruce's original bcc.doc +.\" file by Jörg Wunsch <joerg@FreeBSD.org>. +.\" It is redistributed under the same conditions as the whole bcc +.\" package itself. +.\" +.Dd March 26, 1995 +.Os +.Dt BCC 1 +.Sh NAME +.Nm bcc +.Nd Bruce's C compiler +.Sh SYNOPSIS +.Nm bcc +.Op Fl 03EGOPSVcegv +.Op Fl A Ns Ar as_option +.Op Fl B Ns Ar executable_prefix +.Op Fl C Ns Ar cc1_option +.Op Fl D Ns Ar define +.Op Fl I Ns Ar include_dir +.Op Fl L Ns Ar ld_option +.Op Fl Q Ns Ar c386_option +.Op Fl T Ns Ar tmpdir +.Op Fl U Ns Ar undef +.Op Fl o Ar outfile +.Op Fl fpt Ar error +.Op ld_options +.Op Ar infiles + +.Sh DESCRIPTION + +.Ss Overview + +.Nm Bcc +is a simple C compiler suitable for generating 8086 or 80386 code. +It basically understands the old K&R C input syntax, with some +restrictions on bit fields. It interacts with the programs +.Xr as86 1 +and +.Xr ld86 1 . + +As a compile-time option, it is also possible to convince +.Nm bcc +to generate code for the Motorola 6809 CPU. + +.Ss Options + +.Bl -tag -width indent -compact + +.It Fl 0 +.Pq the digit 0 +8086 target +.Pq works even on 80386 host + +.It Fl 3 +80386 target +.Pq works even on 8086 host + +.It Fl A +pass remainder of option to assembler; e.\& g. +.Ql -A-l -Alistfile +for a listing + +.It Fl B +prefix for executable search path; the search order is all paths +specified using +.Fl B , +in order, then the path given in the environment variable +.Ev BCC_EXEC_PREFIX +if that is set, then the compiled-in defaults +.Pa /usr/local/lib/bcc , +followed by +.Pa /usr/local/bin + +.It Fl C +pass remainder of option to bcc-cc1; e.\& g. +.Ql -C-c +for caller-saves + +.It Fl D +define + +.It Fl E +produce preprocessor output + +.It Fl G +produce gnu-Minix objects +.Pq link with gnu ld + +.It Fl I +include search path + +.It Fl L +pass remainder of option to linker + +.It Fl O +optimize +.Pq does nothing + +.It Fl P +produce preprocessor output with no line numbers + +.It Fl Q +pass full option to c386 + +.It Fl S +produce assembler file + +.It Fl T +temporary directory; +overrides previous value and default; default is +from the environment variable +.Ev TMPDIR +if that is set, otherwise +.Pa /tmp + +.It Fl U +undefine + +.It Fl V +print names of files being compiled + +.It Fl c +produce object file + +.It Fl e +run the preprocess pass separately. This takes less memory, and may +help or harm by giving more traditional semantics like token pasting +with +.Ql /**/ +\&. + +.It Fl f +error +.Pq float emulation not supported + +.It Fl g +produce debugging info +.Pq does nothing + +.It Fl o +output file name follows +.Pq assembler, object or executable + +.It Fl p +error +.Pq profiling not supported + +.It Fl t +error +.Pq substitution of some cc passes not supported + +.It Fl v +print names and args of subprocesses being run. +.Pp +Two or more +.Fl v +\&'s: print names of files being unlinked. +.Pp +Three or more +.Fl v +\&'s: print names of paths being searched. + +.El + +The 6809 version does not support +.Fl 0 , +.Fl 3 +or +.Fl G. + +Only the c386 version supports +.Fl Q . + +.Ss Defaults +Off or none except for these: + +.Bl -tag -width indent -compact + +.It Fl 0 | Fl 3 +native, i.\& e. 80386 + +.It Ar outfile +stdout for preprocessor output +.Pp +.Pa somewhere/file.[ci] +\&-> +.Pa file.s +for compiler output +.Pp +.Pa somewhere/file.[cis] +\&-> +.Pa file.o +for assembler output +.Pp +.Pa a.out +for ld output + +.El + +Other options are passed to the linker, in particular +.Fl i- , +.Fl l Ns Ar x , +.Fl M , +.Fl m , +.Fl s . +The +.Fl i +option is always passed to the linker but can be cancelled using +.Fl i- . + +.Sh ENVIRONMENT + +.Bl -tag -width indent -compact + +.It Ev BCC_EXEC_PREFIX +directory to search for compiler passes + +.It Ev TMPDIR +where to place temporary files + +.El + +.Sh SEE ALSO + +.Xr as86 1 , +.Xr ld86 1 , +.Xr bcc-cc1 1 ; +.Xr cc 1 . + +.Sh AUTHORS + +This program has been written by Bruce Evans. diff --git a/devel/bcc/files/ld86.1 b/devel/bcc/files/ld86.1 new file mode 100644 index 000000000000..914be158c8e7 --- /dev/null +++ b/devel/bcc/files/ld86.1 @@ -0,0 +1,138 @@ +.\" +.\" This manual page has been assembled after Bruce's original bcc.doc +.\" file by Jörg Wunsch <joerg@FreeBSD.org>. +.\" It is redistributed under the same conditions as the whole bcc +.\" package itself. +.\" +.Dd March 26, 1995 +.Os +.Dt LD86 1 +.Sh NAME +.Nm ld86 +.Nd loader for as86 +.Sh SYNOPSIS +.Nm ld86 +.Op Fl 03Mimrstz Ns Op - +.Op Fl l Ns Ar lib_extension +.Op Fl o outfile +.Op Fl C crtfile +.Op Fl L Ns libdir +.Op Fl O Ns libfile +.Op Fl T textaddr +.Ar infile +.Op Ar ... +.Sh DESCRIPTION + +.Ss Overview + +.Nm Ld86 +is the loader that understands how to link the output of +.Xr as86 1 +together. + +.Ss Options + +.Bl -tag -width indent -compact + +.It Fl 0 +.Pq the digit 0 +produce header with 16-bit magic and use library subdir +.Pa i86 +for +.Fl l Ns Ar x + +.It Fl 3 +produce header with 32-bit magic and use library subdir +.Pa i386 +for +.Fl l Ns Ar x + +.It Fl C Ns Ar x +add file +.Pa libdir-from-search/crt Ns Ar x Ns \&.o +to list of files linked + +.It Fl L Ns Ar x +add dir name +.Ar x +to the head of the list of library dirs searched + +.It Fl M +print symbols linked on stdout + +.It Fl O Ns Ar x +add library +.Pa libdir-from-search/ Ns Ar x +to list of files linked + +.It Fl T +text base address follows +.Pq in format suitable for strtoul + +.It Fl i +separate I&D output + +.It Fl l Ns Ar x +add library +.Pa libdir-from-search/lib Ns Ar x Ns \&.a +to list of files linked + +.It Fl m +print modules linked on stdout + +.It Fl o +output file name follows + +.It Fl r +produce output suitable for further relocation + +.It Fl s +strip symbols + +.It Fl t +trace modules being looked at on stdout + +.It Fl z +produce +.Dq unmapped zero page +executables + + +.El + +The 6809 version does not support -i or -r. + +All the options not taking an argument may be turned off by following the +option letter by a +.Sq \&- , +as for bcc-cc1. + +.Ss Defaults + +Off or none except for these: + +.Bl -tag -width indent -compact + +.It Fl 0 | Fl 3 +native, i.\& e. 80386 + +.It Fl L Ns Pa /usr/local/lib/bcc/ Ns Ar m/ +.Po +.Ar m +is machine dependent +.Pc + +.It Ar outfile +.Pa a.out + +.El + +.Sh SEE ALSO + +.Xr as86 1 , +.Xr bcc 1 . + +.Sh AUTHORS + +This programm has been written by Bruce Evans. + diff --git a/devel/bcc/files/patch-aa b/devel/bcc/files/patch-aa new file mode 100644 index 000000000000..af63cb038c09 --- /dev/null +++ b/devel/bcc/files/patch-aa @@ -0,0 +1,66 @@ +*** ld/Makefile.orig Sat Feb 19 23:32:12 1994 +--- ld/Makefile Sun Mar 26 12:31:37 1995 +*************** +*** 1,18 **** +! CFLAGS =-O -DBSD_A_OUT -DSTANDARD_GNU_A_OUT +! LDFLAGS =-N -s + +! OBJS =dumps.o io.o ld.o readobj.o table.o typeconv.o writebin.o + +! ld: $(OBJS) +! $(CC) $(LDFLAGS) $(OBJS) -o $@ + +! clean: +! rm -f $(OBJS) ld +! +! dumps.o: dumps.c const.h config.h obj.h type.h globvar.h +! io.o: io.c const.h config.h obj.h type.h globvar.h +! ld.o: ld.c const.h config.h byteord.h type.h globvar.h +! readobj.o: readobj.c const.h config.h byteord.h obj.h type.h globvar.h +! table.o: table.c const.h config.h align.h obj.h type.h globvar.h +! typeconv.o: typeconv.c const.h config.h type.h globvar.h +! writebin.o: writebin.c const.h config.h obj.h type.h globvar.h +--- 1,18 ---- +! .include "../Makefile.inc" + +! CFLAGS +=-DBSD_A_OUT -DSTANDARD_GNU_A_OUT +! CFLAGS +=-Wall +! LDFLAGS = + +! SRCS =dumps.c io.c ld.c readobj.c table.c typeconv.c writebin.c + +! PROG =ld86 +! +! BINDIR =${LOCALPREFIX}/bin +! MANDIR =${LOCALPREFIX}/man/man +! +! beforeinstall: +! -mkdir -p ${BINDIR} +! -mkdir -p ${MANDIR}1 +! +! .include <bsd.prog.mk> +*** ld/ld.c.orig Sat Feb 19 23:36:05 1994 +--- ld/ld.c Sun Mar 26 11:59:47 1995 +*************** +*** 3,9 **** + /* Copyright (C) 1994 Bruce Evans */ + + #include "const.h" +- #include "byteord.h" + #include "type.h" + #include "globvar.h" + +--- 3,8 ---- +*************** +*** 25,30 **** +--- 24,33 ---- + #undef NULL + #include <unistd.h> + #endif ++ ++ /* BSD #defines this in <machine/endian.h>, but with another sense */ ++ #undef BIG_ENDIAN ++ #include "byteord.h" + + #define MAX_LIBS (NR_STDLIBS + 5) + #define NR_STDLIBS 1 diff --git a/devel/bcc/files/patch-ab b/devel/bcc/files/patch-ab new file mode 100644 index 000000000000..e2e766db0dc5 --- /dev/null +++ b/devel/bcc/files/patch-ab @@ -0,0 +1,75 @@ +*** as/Makefile.orig Thu Apr 23 06:04:42 1992 +--- as/Makefile Sun Mar 26 12:31:17 1995 +*************** +*** 1,27 **** +! CFLAGS =-O + LDFLAGS = + +! OBJS =as.o assemble.o error.o express.o \ +! genbin.o genlist.o genobj.o gensym.o \ +! macro.o mops.o pops.o readsrc.o \ +! scan.o table.o typeconv.o +! +! as: $(OBJS) +! $(CC) $(LDFLAGS) $(OBJS) -o as +! chmem =182000 as +! +! as.o: const.h type.h byteord.h macro.h file.h flag.h globvar.h +! assemble.o: const.h type.h address.h globvar.h opcode.h scan.h +! error.o: const.h type.h +! express.o: const.h type.h address.h globvar.h scan.h source.h +! genbin.o: const.h type.h address.h file.h globvar.h +! genlist.o: const.h type.h address.h flag.h file.h globvar.h macro.h scan.h \ +! source.h +! genobj.o: const.h type.h address.h file.h globvar.h +! gensym.o: const.h type.h flag.h file.h globvar.h +! macro.o: const.h type.h globvar.h scan.h macro.h +! mops.o: const.h type.h globvar.h opcode.h scan.h address.h +! pops.o: const.h type.h address.h flag.h globvar.h opcode.h scan.h +! readsrc.o: const.h type.h flag.h file.h globvar.h macro.h scan.h source.h +! scan.o: const.h type.h globvar.h scan.h +! table.o: const.h type.h globvar.h opcode.h scan.h +--- 1,18 ---- +! .include "../Makefile.inc" +! .PATH: ../ld +! +! CFLAGS +=-Wall + LDFLAGS = + +! SRCS =as.c assemble.c error.c express.c \ +! genbin.c genlist.c genobj.c gensym.c \ +! macro.c mops.c pops.c readsrc.c \ +! scan.c table.c typeconv.c +! +! PROG =as86 +! +! BINDIR = ${LOCALPREFIX}/bin +! MANDIR = ${LOCALPREFIX}/man/man +! +! +! .include <bsd.prog.mk> +*** as/as.c.orig Sat Jul 10 21:03:52 1993 +--- as/as.c Sun Mar 26 12:11:09 1995 +*************** +*** 7,13 **** + + #include "const.h" + #include "type.h" +- #include "byteord.h" + #include "macro.h" + #undef EXTERN + #define EXTERN +--- 7,12 ---- +*************** +*** 36,41 **** +--- 35,44 ---- + #include <fcntl.h> + #include <unistd.h> + #endif ++ ++ /* BSD #defines this in <machine/endian.h>, but with another sense */ ++ #undef BIG_ENDIAN ++ #include "byteord.h" + + PUBLIC char hexdigit[] = "0123456789ABCDEF"; /* XXX - ld uses lower case */ + diff --git a/devel/bcc/files/patch-ac b/devel/bcc/files/patch-ac new file mode 100644 index 000000000000..7edb98ea93de --- /dev/null +++ b/devel/bcc/files/patch-ac @@ -0,0 +1,86 @@ +*** bcc/Makefile.orig Thu Mar 9 11:43:29 1995 +--- bcc/Makefile Sun Mar 26 12:23:06 1995 +*************** +*** 1,14 **** +! CFLAGS =-O -DNSIG=32 + LDFLAGS = + +! bcc: bcc.c +! $(CC) $(CFLAGS) $(LDFLAGS) $@.c -o $@ + +! bcc09: bcc.c +! $(CC) -DMC6809 $(CFLAGS) $(LDFLAGS) bcc.c -o $@ + +! ccc: bcc.c +! $(CC) -DCCC $(CFLAGS) $(LDFLAGS) bcc.c -o $@ + +! clean: +! rm -f bcc bcc09 ccc +--- 1,22 ---- +! .include "../Makefile.inc" +! +! CFLAGS +=-DNSIG=32 +! #CFLAGS +=-Wall # too many warnings + LDFLAGS = + +! PROG =bcc-cc1 +! +! SRCS =assign.c declare.c gencode.c label.c preserve.c type.c \ +! bcc-cc1.c express.c genloads.c loadexp.c scan.c \ +! exptree.c glogcode.c longop.c softop.c codefrag.c \ +! floatop.c hardop.c output.c state.c debug.c function.c \ +! input.c preproc.c table.c +! + +! BINDIR = ${LOCALPREFIX}/lib/bcc +! MANDIR = ${LOCALPREFIX}/man/man + +! beforeinstall: +! -mkdir -p ${LOCALPREFIX}/lib/bcc + +! .include <bsd.prog.mk> +*** bcc/bcc.c.orig Sat Jul 17 14:49:49 1993 +--- bcc/bcc.c Sun Mar 26 12:27:58 1995 +*************** +*** 27,46 **** + #define P(x) () + #endif + +! #define AS "as" + #define BAS86 + #define BCC86 +! #define CC1 "cc1" + #define CC1_MINUS_O_BROKEN FALSE +! #define CPP "cpp" /* normally a link to /usr/bin/bcc-cc1 */ + #define CPPFLAGS "-E" + #define CRT0 "crt0.o" + #define GCC "gcc" +! #define LD "ld" +! #define STANDARD_CRT0_0_PREFIX "/usr/local/lib/i86/" +! #define STANDARD_CRT0_3_PREFIX "/usr/local/lib/i386/" +! #define STANDARD_EXEC_PREFIX "/usr/local/libexec/i386/bcc/" +! #define STANDARD_EXEC_PREFIX_2 "/usr/bin/" + + #ifdef CCC + #undef BCC86 +--- 27,46 ---- + #define P(x) () + #endif + +! #define AS "as86" + #define BAS86 + #define BCC86 +! #define CC1 "bcc-cc1" + #define CC1_MINUS_O_BROKEN FALSE +! #define CPP "bcc-cc1" /* normally a link to /usr/bin/bcc-cc1 */ + #define CPPFLAGS "-E" + #define CRT0 "crt0.o" + #define GCC "gcc" +! #define LD "ld86" +! #define STANDARD_CRT0_0_PREFIX LOCALPREFIX "/lib/bcc/i86/" +! #define STANDARD_CRT0_3_PREFIX LOCALPREFIX "/lib/bcc/i386/" +! #define STANDARD_EXEC_PREFIX LOCALPREFIX "/lib/bcc/" +! #define STANDARD_EXEC_PREFIX_2 LOCALPREFIX "/bin/" + + #ifdef CCC + #undef BCC86 diff --git a/devel/bcc/pkg-comment b/devel/bcc/pkg-comment new file mode 100644 index 000000000000..b297908a409b --- /dev/null +++ b/devel/bcc/pkg-comment @@ -0,0 +1 @@ +bcc - Bruce's C compiler (with assembler and loader); can do 16-bit code diff --git a/devel/bcc/pkg-descr b/devel/bcc/pkg-descr new file mode 100644 index 000000000000..02a08e1c77fc --- /dev/null +++ b/devel/bcc/pkg-descr @@ -0,0 +1,17 @@ +This is Bruce Evans' C compiler and binutils package. + + +Either the compiler as the assembler are able to generate 16-bit code. +Hence it's possible to compile BIOS and DOS code under unix. + +The C compiler does understand K&R1 syntax, with a few restrictions +regarding bitfields. See the file work/bcc/bcc-cc1/bcc.bugs for +Bruce's bug list. + +The binutils (assembler and loader) have been renamed to as86 and ld86 +to not conflict with the system's assembler and loader, but they are +also available in the regular BINDIR (normally /usr/local/bin). + +It's also possible to generate MC 6809 code with bcc/as. (This is a +compile-time option however, and not supported by the binary package +as it comes with FreeBSD.) diff --git a/devel/bcc/pkg-plist b/devel/bcc/pkg-plist new file mode 100644 index 000000000000..d808b7aaae84 --- /dev/null +++ b/devel/bcc/pkg-plist @@ -0,0 +1,14 @@ +@cwd /usr/local +@mode 755 +@owner bin +@group bin +bin/as86 +bin/ld86 +bin/bcc +lib/bcc +lib/bcc/bcc-cc1 +@mode 644 +man/man1/as86.1.gz +man/man1/bcc.1.gz +man/man1/bcc-cc1.1.gz +man/man1/ld86.1.gz diff --git a/devel/bcc/scripts/configure b/devel/bcc/scripts/configure new file mode 100644 index 000000000000..8e3c5cfaa798 --- /dev/null +++ b/devel/bcc/scripts/configure @@ -0,0 +1,49 @@ +#!/bin/sh +# +# $Id$ +# +# Author: Jörg Wunsch <joerg@FreeBSD.org> +# Date of creation: Mar 26, 1995 +# + +# we don't need Bruce's symlink, since bmake knows about .PATH + +rm -f ${WRKSRC}/as/typeconv.o + +# since we like the ease of BSD's fancy .include <> files, we wish to +# have an own directory for the compiler driver + +mv ${WRKSRC}/bcc ${WRKSRC}/bcc-cc1 +mkdir ${WRKSRC}/bcc +cp -p ${FILESDIR}/Makefile.bcc ${WRKSRC}/bcc/Makefile + +# i wrote some man pages after Bruce's bcc.doc +cp -p ${FILESDIR}/ld86.1 ${WRKSRC}/ld/ +cp -p ${FILESDIR}/as86.1 ${WRKSRC}/as/ +cp -p ${FILESDIR}/bcc.1 ${WRKSRC}/bcc/ +cp -p ${FILESDIR}/bcc-cc1.1 ${WRKSRC}/bcc-cc1/ + +# create a Makefile.inc to pass the local prefix down to +# the build stage: + +cat > ${WRKSRC}/Makefile.inc <<*EOF* +# +# Makefile.inc +# +# This file has been created by the "configure" script; DO NOT EDIT. +# +# Edit the port's Makefile \${PREFIX} variable should you wish to +# override this, and reconfigure. +# + +LOCALPREFIX = ${PREFIX} +*EOF* + +# a simple Makefile to make all the subdirs + +cat > ${WRKSRC}/Makefile <<*EOF* + +SUBDIR = ld as bcc-cc1 bcc + +.include <bsd.subdir.mk> +*EOF* |