summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-10-03 08:10:39 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-10-03 08:10:39 +0000
commitff022fbf64b28b0a5ce933da8fd3ce64ed234af1 (patch)
tree767a3b7b3b84647ec9fd94461af10bc861cc92d4
parentdbc0d520e40baab9cdbaac473cde95e1e2aa4cf7 (diff)
pull form ragge's repo:
Pass -g onto linker. From Laurent Desnogues.
-rw-r--r--usr.bin/pcc/cc/cc/cc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/pcc/cc/cc/cc.c b/usr.bin/pcc/cc/cc/cc.c
index 4d827a24f73..54006f558fc 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.15 2007/10/01 18:51:02 otto Exp $ */
+/* $OpenBSD: cc.c,v 1.16 2007/10/03 08:10:38 otto Exp $ */
/*
* Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
*
@@ -227,7 +227,7 @@ main(int argc, char *argv[])
case 'n': /* handle -n flags */
if (strcmp(argv[i], "-nostdinc") == 0)
nostdinc++;
- if (strcmp(argv[i], "-nostdlib") == 0) {
+ else if (strcmp(argv[i], "-nostdlib") == 0) {
nostdlib++;
nostartfiles++;
} else if (strcmp(argv[i], "-nostartfiles") == 0)
@@ -559,6 +559,8 @@ nocom:
if (j >= MAXAV)
error("Too many ld options");
}
+ if (gflag)
+ av[j++] = "-g";
#if 0
if (gflag)
av[j++] = "-lg";