This is the mail archive of the mailing list for the binutils 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] gas/arc: Allow --with-cpu configure option to change default cpu

Hi Andrew,

  (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/ 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.


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