This is the mail archive of the gcc-patches@gcc.gnu.org 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 1/6] Andes nds32: configure settings for nds32 target.


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
joseph@codesourcery.com


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