On Mon, 8 Jul 2013, Chung-Ju Wu wrote:

> +     nds32*-*-*)
> +             supported_defaults="arch nds32_lib"
> +
> +             # process --with-arch
> +             # the 'with_arch' will be analyzed and then set its ISA and 
> FLAGS

I don't think this approach for processing --with-arch and setting 
target_cpu_default in a complicated way based on it is a good idea.

The normal handling of --with-arch is to generate a -march= option via 
OPTION_DEFAULT_SPECS.  If you do that, then the conversion from -march= 
strings to sets of options enabled internally is done within the compiler 
proper.

> +nds32*-elf*)
> +     # Basic makefile fragment and extra_parts for crt stuff.
> +     tmake_file="${tmake_file} nds32/t-nds32"
> +     extra_parts="crtbegin1.o crtend1.o"
> +     # Append extra c-isr library according to --with-arch=X setting.

Now, given that you add a -march= option, there's the possibility that 
someone might do a build with multilibs for different -march= values.  So 
the choice here (libgcc configuration) needs to depend on the actual 
configuration of the compiler for the multilib being built, probably via 
configure tests in libgcc/configure.ac.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to