From a270615fdb0377d60eee8611594cf47eb6021fa4 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Tue, 25 May 2004 18:03:19 +0000 Subject: [PATCH] Always use $(CC) for building the generated .spec.c file. --- tools/winegcc/winegcc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 00dbcd6e96f..1d94fe42f09 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -345,6 +345,7 @@ static void build(struct options* opts) const char *output_name, *spec_file, *lang; const char* winebuild = getenv("WINEBUILD"); int generate_app_loader = 1; + int old_processor; int j; /* NOTE: for the files array we'll use the following convention: @@ -532,8 +533,12 @@ static void build(struct options* opts) spawn(opts->prefix, spec_args); /* compile the .spec.c file into a .spec.o file */ + old_processor = opts->processor; + /* Always compile spec.c as c, even if linking with g++ */ + opts->processor = proc_cc; spec_o_name = compile_to_object(opts, spec_c_name, 0); - + opts->processor = old_processor; + /* link everything together now */ link_args = strarray_alloc(); strarray_addall(link_args, get_translator(opts));