This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] gas/arc: Allow --with-cpu configure option to change default cpu
- From: Nick Clifton <nickc at redhat dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, binutils at sourceware dot org
- Cc: Claudiu dot Zissulescu at synopsys dot com
- Date: Tue, 14 Jun 2016 13:18:41 +0100
- Subject: Re: [PATCH] gas/arc: Allow --with-cpu configure option to change default cpu
- Authentication-results: sourceware.org; auth=none
- References: <1465319268-8131-1-git-send-email-andrew dot burgess at embecosm dot com>
(Sorry for the delay in reviewing this patch).
> The solution I propose is to add a --with-cpu=NAME configure option (a
> similar flag is already used by other targets in GCC) that sets up a
> default value in config.h, this default is then used in
> config/tc-arc.c if the user of the built tools does not explicitly
> select a cpu type.
This makes sense, but there is a caveat:
> If there's a better solution, or if I've gone wrong with the autotools
> side of things, then all suggestions for improvements are welcome.
Your current implementation, I believe, adds the -with-cpu option as a
general configure option. Which means that other, non-ARC users, are going
to start complaining that it does not work for their particular architecture.
(Unless of course you would like to propose a giant patch that does
implement --with-cpu for all target architectures).
Instead, I think that following the direction of the NDS32 port would be
better. This implements a --with-arch= option, but only if the target is
the NDS32. (See gas/configure.ac around line 436). You could add --with-cpu
support for the ARC in a similar fashion.
There is also the question of where to document this feature. The gas/README,
gas/NEWS and gas/doc/c-arc.texi files spring to mind.