a7ed5d35e0
`A Retargetable C Compiler: Design and Implementation' (Addison-Wesley, 1995, ISBN 0-8053-1670-1). lcc is a production compiler with a hand crafted lexical analyzer and a hand-coded recursive decent parser. The lexer and parser code is well written and very easy to read (and learn from :-)). lcc compiles much faster than FreeBSD's stock [gcc] compiler. However, it does not under stand FreeBSD's "long long" data type. Contributions by: Soren Schmidt
29 lines
954 B
Plaintext
29 lines
954 B
Plaintext
--- etc/lcc.c.orig Fri Oct 18 17:37:14 1996
|
|
+++ etc/lcc.c Sun Dec 8 19:42:38 1996
|
|
@@ -433,9 +433,9 @@
|
|
" unrecognized options are taken to be linker options\n",
|
|
"-A warn about nonANSI usage; 2nd -A warns more\n",
|
|
"-b emit expression-level profiling code; see bprint(1)\n",
|
|
-#ifdef sparc
|
|
+#if defined(sparc) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
"-Bstatic -Bdynamic specify static or dynamic libraries\n",
|
|
-#endif
|
|
+#endif
|
|
"-Bdir/ use the compiler named `dir/rcc'\n",
|
|
"-c compile only\n",
|
|
"-dn set switch statement density to `n'\n",
|
|
@@ -535,11 +535,11 @@
|
|
plist = append(arg, plist);
|
|
return;
|
|
case 'B': /* -Bdir -Bstatic -Bdynamic */
|
|
-#ifdef sun
|
|
+#if defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
if (strcmp(arg, "-Bstatic") == 0 || strcmp(arg, "-Bdynamic") == 0)
|
|
llist[1] = append(arg, llist[1]);
|
|
else
|
|
-#endif
|
|
+#endif
|
|
{
|
|
static char *path;
|
|
if (path)
|