Module: wine Branch: master Commit: 3e30306bb38171da0d38250dd49cda6b6f6ef562 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e30306bb38171da0d38250dd4...
Author: Juan Lang juan.lang@gmail.com Date: Fri Oct 9 10:14:52 2009 -0700
winegcc: Examine each argument of compile command rather than only the first.
---
tools/winegcc/winegcc.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index f81b7ea..b3e58e0 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -320,7 +320,12 @@ static void compile(struct options* opts, const char* lang) /* mixing different C and C++ compilers isn't supported in configure anyway */ case proc_cc: case proc_cxx: - gcc_defs = strendswith(comp_args->base[0], "gcc") || strendswith(comp_args->base[0], "g++"); + for ( j = 0; !gcc_defs && j < comp_args->size; j++ ) + { + const char *cc = comp_args->base[j]; + + gcc_defs = strendswith(cc, "gcc") || strendswith(cc, "g++"); + } break; }