newer gcc need filetype for preprocessing .s apparently
authorMatthias Braun <matze@braunis.de>
Fri, 28 Nov 2008 13:13:08 +0000 (13:13 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 28 Nov 2008 13:13:08 +0000 (13:13 +0000)
[r24115]

main.c

diff --git a/main.c b/main.c
index 5c83317..0a5837b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1207,9 +1207,17 @@ int main(int argc, char **argv)
 
                FILE *preprocessed_in = NULL;
                switch (filetype) {
-                       case FILETYPE_C:         filetype = FILETYPE_PREPROCESSED_C;         goto preprocess;
-                       case FILETYPE_CXX:       filetype = FILETYPE_PREPROCESSED_CXX;       goto preprocess;
-                       case FILETYPE_ASSEMBLER: filetype = FILETYPE_PREPROCESSED_ASSEMBLER; goto preprocess;
+                       case FILETYPE_C:
+                               filetype = FILETYPE_PREPROCESSED_C;
+                               goto preprocess;
+                       case FILETYPE_CXX:
+                               filetype = FILETYPE_PREPROCESSED_CXX;
+                               goto preprocess;
+                       case FILETYPE_ASSEMBLER:
+                               filetype = FILETYPE_PREPROCESSED_ASSEMBLER;
+                               add_flag(&cppflags_obst, "-x");
+                               add_flag(&cppflags_obst, "assembler-with-cpp");
+                               goto preprocess;
 preprocess:
                                /* no support for input on FILE* yet */
                                if (in != NULL)