Am 02.01.2013 02:56, schrieb Charles Davis:
--- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -345,10 +345,22 @@ struct strarray *get_as_command(void)
if (!as_command) {
+#ifdef CLANG_AS
/* The native assembler might not support CFI pseudo-ops,
* but clang does. So if we were compiled with
* clang, we should assemble with clang, too.
*/
static const char * const commands[] = { CLANG_AS, "clang", NULL };
as_command = find_tool( "clang", commands );
+#else static const char * const commands[] = { "gas", "as", NULL }; as_command = find_tool( "as", commands ); +#endif } strarray_add_one( args, as_command ); +#ifdef CLANG_AS
- strarray_add( args, "-xassembler", "-c", NULL );
+#endif
if (force_pointer_size) {
Not sure if you can do it like that, as i understand it winebuild should always be able to crosscompile something, these ifdefs would destroy that feature.
On Wed, Jan 2, 2013 at 5:05 PM, André Hentschel nerv@dawncrow.de wrote:
Not sure if you can do it like that, as i understand it winebuild should always be able to crosscompile something, these ifdefs would destroy that feature.
I suppose the correct way is to always use clang without target_alias prefix, but with the proper arch parameter. A combination of this patch and mine for llvm-mc.
Either -arch or -Xassembler -triple -Xassembler target_alias
Regards,
On Jan 2, 2013, at 11:23 AM, Per Johansson wrote:
On Wed, Jan 2, 2013 at 5:05 PM, André Hentschel nerv@dawncrow.de wrote:
Not sure if you can do it like that, as i understand it winebuild should always be able to crosscompile something, these ifdefs would destroy that feature.
Only on Mac OS :).
I suppose the correct way is to always use clang without target_alias prefix,
But Clang actually supports target triple prefixes. I'll just avoid passing $CC to winebuild and make it invoke Clang directly instead.
Chip