diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-01 18:51:03 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-01 18:51:03 +0000 |
commit | d256bbd5ed917bbd6eb1b6aff25daa4965b27b02 (patch) | |
tree | cde2ec064388fc10f55b4616476808b4987e0983 /usr.bin/pcc/cc | |
parent | 5a93b7b14326715c9e05692f21723cbd2531f8ee (diff) |
pull fro ragge's repo:
-C support for cc and deljumps optimization; both by Stefan Kempf
Diffstat (limited to 'usr.bin/pcc/cc')
-rw-r--r-- | usr.bin/pcc/cc/cc/cc.1 | 6 | ||||
-rw-r--r-- | usr.bin/pcc/cc/cc/cc.c | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/usr.bin/pcc/cc/cc/cc.1 b/usr.bin/pcc/cc/cc/cc.1 index 299b5d810fa..0512a9b8ca3 100644 --- a/usr.bin/pcc/cc/cc/cc.1 +++ b/usr.bin/pcc/cc/cc/cc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cc.1,v 1.3 2007/09/27 19:56:48 otto Exp $ +.\" $OpenBSD: cc.1,v 1.4 2007/10/01 18:51:02 otto Exp $ ."\ .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net> .\" @@ -23,7 +23,7 @@ .Nd front-end to the C compiler .Sh SYNOPSIS .Nm -.Op Fl cdEgkLMPOStvxX +.Op Fl CcdEgkLMPOStvxX .Op Fl B Ar prefix .Op Fl fPIC .Op Fl include Ar path @@ -86,6 +86,8 @@ or .Xr ld 1 executables. .\" TODO: provide an example of -B +.lt Fl C +Do not discard comments in the preprocessor. .It Fl c Only compile or assemble and then stop. Do not link. diff --git a/usr.bin/pcc/cc/cc/cc.c b/usr.bin/pcc/cc/cc/cc.c index e523fdd863d..4d827a24f73 100644 --- a/usr.bin/pcc/cc/cc/cc.c +++ b/usr.bin/pcc/cc/cc/cc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cc.c,v 1.14 2007/09/28 08:48:58 ragge Exp $ */ +/* $OpenBSD: cc.c,v 1.15 2007/10/01 18:51:02 otto Exp $ */ /* * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. * @@ -100,6 +100,7 @@ char *llist[MAXLIB]; char alist[20]; char *xlist[100]; int xnum; +int Cflag; int dflag; int pflag; int sflag; @@ -283,16 +284,18 @@ main(int argc, char *argv[]) } break; #endif + case 'C': + Cflag = 1; + break; case 'D': case 'I': case 'U': - case 'C': *pv++ = argv[i]; if (argv[i][2] == 0) *pv++ = argv[++i]; if (pv >= ptemp+MAXOPT) { - error("Too many DIUC options"); + error("Too many DIU options"); --pv; } break; @@ -411,6 +414,8 @@ main(int argc, char *argv[]) av[na++] = "-D__ASSEMBLER__"; if (pthreads) av[na++] = "-D_PTHREADS"; + if (Cflag) + av[na++] = "-C"; if (Mflag) av[na++] = "-M"; if (dflag) @@ -457,6 +462,7 @@ main(int argc, char *argv[]) av[na++] = "-k"; if (Oflag) { av[na++] = "-xtemps"; + av[na++] = "-xdeljumps"; } for (j = 0; j < xnum; j++) av[na++] = xlist[j]; |