This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix mv8plus, allow targetting Linux or Solaris from other sparc host.

From: Eric Botcazou <>
Date: Sun, 23 Oct 2011 00:22:14 +0200

> This breaks -mcpu on Solaris though because TARGET_DEFAULT has MASK_V8PLUS.
> So any setting below or equal to -mcpu=v8 triggers an architecture mismatch 
> between assembler and compiler.
> I think we need to go the specs route.  I'd just add a mv8plus rule to CC1_SPEC 
> in config/sparc/linux64.h similar to the one present in config/sparc/sol2.h.
> This works as OPTION_DEFAULT_SPECS shouldn't prepend anything if you pass -m32.

This is precisely what I tried initially, and my posting was
explicitly trying to explain that this kind of approach cannot
work. :-)

> But I presume this still leaves us with the problem for the 32-bit compiler.

I tried these kinds of things.  No matter what you do the OPTION_DEFAULT_SPECS
either get in the way of the native bitness or the non-native bitness of
compiler's default target.

Personally, I tend to build a 32-bit compiler and test 64-bit things by
giving -m64.  Richard has been building 64-bit compilers and using -m32
to test 32-bit stuff.

Furthermore, consider that we need to solve this issue for things
other than MASK_V8PLUS.  For example VIS2, VIS3, and FMAF all need
similar treatment.

Given that, I don't think we want to keep banging the specs for every
new MASK we add, even if it could work.  I think the specs are quite
convoluted as-is.

I'll try to brainstorm on this, thanks for letting me know about the
Solaris target problem.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]