crude -g implementation
authorMatthias Braun <matze@braunis.de>
Sat, 16 Feb 2008 16:13:23 +0000 (16:13 +0000)
committerMatthias Braun <matze@braunis.de>
Sat, 16 Feb 2008 16:13:23 +0000 (16:13 +0000)
[r18882]

Makefile
main.c

index 7f489c7..aaadd3e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,7 @@ build/adt build/driver build/cpb build/cpb/adt build/cpb/driver:
 
 build/cpb/%.o: %.c
        @echo '===> CPARSER $<'
-       $(Q)./cparser $(CPPFLAGS) -Wall -c $< -o $@
+       $(Q)./cparser $(CPPFLAGS) -Wall -g -c $< -o $@
 
 build/%.o: %.c
        @echo '===> CC $<'
diff --git a/main.c b/main.c
index 7777ead..a529a03 100644 (file)
--- a/main.c
+++ b/main.c
@@ -412,6 +412,8 @@ int main(int argc, char **argv)
                        const char *option = &arg[1];
                        if(option[0] == 'o') {
                                GET_ARG_AFTER(outname, "-o");
+                       } else if(option[0] == 'g') {
+                               firm_be_option("stabs=yes");
                        } else if(SINGLE_OPTION('c')) {
                                mode = CompileAssemble;
                        } else if(SINGLE_OPTION('S')) {
@@ -500,7 +502,7 @@ int main(int argc, char **argv)
                                }
                        } else if(strcmp(option, "pedantic") == 0) {
                                fprintf(stderr, "warning: ignoring gcc option '%s'\n", arg);
-                       } else if(option[0] == 'g' || strncmp(option, "std=", 4) == 0) {
+                       } else if(strncmp(option, "std=", 4) == 0) {
                                fprintf(stderr, "warning: ignoring gcc option '%s'\n", arg);
                        } else if (option[0] == '-') {
                                /* double dash option */