I noticed that the __NPS400__ define was not being created properly, when the toolchain is configured with --with-cpu=nps400 then the define will not be created (unless --mcpu=nps400 is also used).
I thought the fix would be easy, __NPS400__ was being created in the CPP_SPEC, in contrast to similar defines like __ARC700__, which are created in arc-c.def, so all I wanted to do was to move the definition into arc-c.def. Turned out this was slihtly more involved than I thought, which is why this ended up as two patches. The first patch restrucures how we track the currently selected cpu, but should not make any user visible changes. The second patch uses the changes in the first patch to create the __NPS400__ properly. I've run the GCC with no regressions, and this should have no impact for any target other than arc. I don't know if you think this will be too much to slip in at this stage in the release, but it would be great if I could.. Thanks, Andrew --- Andrew Burgess (2): ARC: Make arc_selected_cpu global ARC: Better creation of __NPS400__ define gcc/ChangeLog | 31 ++++++++++++++++++++++++++++ gcc/config/arc/arc-arch.h | 50 ++++++++++++++++++++++----------------------- gcc/config/arc/arc-c.def | 1 + gcc/config/arc/arc.c | 35 ++++++++++++++----------------- gcc/config/arc/arc.h | 24 ++++++++++++++-------- gcc/config/arc/driver-arc.c | 2 +- 6 files changed, 88 insertions(+), 55 deletions(-) -- 2.4.11