------- Comment #3 from joseph at codesourcery dot com 2010-02-07 22:58 ------- Subject: Re: Status of using both -m32 and -m64 on the same command line
On Sun, 7 Feb 2010, pinskia at gcc dot gnu dot org wrote: > >I think that this behavior should be unified across gcc's supported arches, > > Why -m* means it is a target specific option? It's a lot less confusing for people using GCC for multiple targets (and the wide range of target support is one of the major advantages of GCC) if when multiple targets do similar things, they do so the same way where possible. Unfortunate inconsistencies include: * The combination of -march, -mcpu and -mtune options available, and what -mcpu means where it is available (also, some targets have yet other options for specifying target processors). * The options used for selecting endianness where applicable (-mbig-endian, -meb, -mb, -EB). * Whether interrupt handlers use the "interrupt" or "interrupt_handler" attribute. It's not that code using one of these options would do so in a cross-platform way; it's that having consistency would be beneficial to users doing similar things for multiple targets. > x86_64 and powerpc64 both have the same behavior of having the last one being > the used one which is like options act like. So really this is a sparc64 > issue > only. Yes, similar to the above there should be consistency in how options overriding each other work, and I describe a proposed model for this in <http://gcc.gnu.org/ml/gcc/2010-01/msg00063.html> (Appendix 1) which means the last option specified wins in cases like this of options that are exact opposites. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42994