From 20bc850757a10ab289370e9e46d11f25f43fb5d7 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 28 Nov 2008 09:40:47 +0000 Subject: [PATCH] crude implementation of -Wp [r24098] --- main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index b9b62e1..fefaa38 100644 --- a/main.c +++ b/main.c @@ -828,13 +828,19 @@ int main(int argc, char **argv) strncpy(cpu_arch, opt, sizeof(cpu_arch)); } } else if (option[0] == 'W') { - if (strstart(option + 1, "l,")) // a gcc-style linker option - { + if (option[1] == 'p') { + // pass options directly to the preprocessor + const char *opt; + GET_ARG_AFTER(opt, "-Wp,"); + add_flag(&cppflags_obst, "-Wp,%s", opt); + } else if (strstart(option + 1, "l,")) { + // pass options directly to the linker const char *opt; GET_ARG_AFTER(opt, "-Wl,"); add_flag(&ldflags_obst, "-Wl,%s", opt); + } else { + set_warning_opt(&option[1]); } - else set_warning_opt(&option[1]); } else if (option[0] == 'm') { /* -m options */ const char *opt; -- 2.20.1