Alexandre Julliard : winegcc: Hardcode the various gcc tool names when cross-compiling.
Alexandre Julliard
julliard at winehq.org
Thu Feb 12 11:14:39 CST 2009
Module: wine
Branch: master
Commit: b58ef6bff66f09fb8e4e23ebb4cb463d649445ef
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b58ef6bff66f09fb8e4e23ebb4cb463d649445ef
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Feb 12 11:41:56 2009 +0100
winegcc: Hardcode the various gcc tool names when cross-compiling.
---
tools/winegcc/winegcc.c | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index d216d9b..2ac08f2 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -285,17 +285,38 @@ static char* get_temp_file(const char* prefix, const char* suffix)
static const strarray* get_translator(struct options *opts)
{
const char *str;
+ strarray *ret;
switch(opts->processor)
{
- case proc_cpp: str = CPP; break;
- case proc_cc: str = CC; break;
- case proc_cxx: str = CXX; break;
- case proc_as: str = AS; break;
- default: assert(0);
+ case proc_cpp:
+ if (opts->target) str = strmake( "%s-cpp", opts->target );
+ else str = CPP;
+ break;
+ case proc_cc:
+ if (opts->target) str = strmake( "%s-gcc", opts->target );
+ else str = CC;
+ break;
+ case proc_cxx:
+ if (opts->target) str = strmake( "%s-g++", opts->target );
+ else str = CXX;
+ break;
+ case proc_as:
+ if (opts->target) str = strmake( "%s-as", opts->target );
+ else str = AS;
+ break;
+ default:
+ assert(0);
+ }
+ ret = strarray_fromstring( str, " " );
+ if (opts->force_pointer_size)
+ {
+ if (opts->processor == proc_as)
+ strarray_add( ret, strmake("--%u", 8 * opts->force_pointer_size ));
+ else
+ strarray_add( ret, strmake("-m%u", 8 * opts->force_pointer_size ));
}
- if (opts->target) str = strmake( "%s-%s", opts->target, str );
- return strarray_fromstring( str, " " );
+ return ret;
}
static void compile(struct options* opts, const char* lang)
More information about the wine-cvs
mailing list