For the exit processing only members of _GLOBAL_REENT were used by default. If
the _REENT_GLOBAL_ATEXIT option was enabled, then the data structures were
provided through dedicated global objects. Make this option the default.
Remove the option. Rename struct _reent members _atexit and _atexit0 to
_reserved_6 and _reserved_7, respectively. Provide them only if
_REENT_BACKWARD_BINARY_COMPAT is defined.
For about half the ports, we don't need a subdir configure script.
They're using the config/default.m[ht] rules, and they aren't doing
any unique configure tests, so they exist just to pass top-level
settings down to create the arch Makefile. We can just as easily
do that from the top-level Mkaefile directly and skip configure.
Most of the remaining configure scripts could be migrated up to
the top-level too, but that would require care in each subdir.
So let's be lazy and put that off to another day.
Use standard AC_MSG_WARN macro in the top-level configure, and delete
the message from all the subdirs. There's no need to issue this more
than once per libgloss build.
The newlib & libgloss dirs are already generated using autoconf-2.69.
To avoid merging new code and/or accidental regeneration using diff
versions, leverage config/override.m4 to pin to 2.69 exactly. This
matches what gcc/binutils/gdb are already doing.
The README file already says to use autoconf-2.69.
To accomplish this, it's just as simple as adding -I flags to the
top-level config/ dir when running aclocal. This is because the
override.m4 file overrides AC_INIT to first require the specific
autoconf version before calling the real AC_INIT.
In order to transition to automake, we have to use hardcoded paths in
the AC_CONFIG_AUX_DIR macro call (since automake evaluates the path
itself, and doesn't expand vars), so simplify all the calls here.
Regenerate the files using automake-1.15 & autoconf-2.69 to match the
binutils/gdb/gcc projects. Ran:
libgloss $ find -name configure.ac -printf '%h\n' | while read d; do
(cd $d; export WANT_AUTOCONF=2.69 WANT_AUTOMAKE=1.15;
aclocal-1.15 -I.. && autoconf-2.69); done
ARCompact processors (ARC 600 and ARC 700) require three "nop"s after the
"flag 1" instruction. Later ARC processors do not have this requirement, so
it is possible to reduce size of "_exit_halt" for them.
libgloss/
2016-05-24 Anton Kolesov <Anton.Kolesov@synopsys.com>
* arc/crt0.S (_exit_halt): Insert nops only for ARCompact.
Initially crt0.S used a special function, declared as weak as a default
exception handler in interrupt vector table. To let user override individual
handlers, this function had multiple names - one for each IVT entry, which,
however, was terribly confusing for the debugger and user - because it
wasn't clear which symbol will be used as a function name in debugger.
Defining multiple separate functions - one for each handler, would resolve
the mess, but would increase code size of crt0.o.
To clean this up, this patch defines exception handlers as weak symbols as
well, but those are defined as just symbols, not functions, hence there
would be less confusion over what is what. At the same time, users still can
redefine exception handlers symbol by creating functions with respective
names.
libgloss/
2016-05-24 Anton Kolesov <Anton.Kolesov@synopsys.com>
* arc/crt0.S: Convert memory_error and friends to non-function
symbols.
crt0.S for ARC used to use instruction "asr.f lp_count, r3, 2" for all cores
except ARC601. However instructions which shift more than 1 bit are
optional, so this crt0.S didn't worked for all ARC cores.
Luckily this is a shift just by 2 bits on all occassions, so fix is trivial
- use two single-bit shifts.
libgloss/ChangeLog
2016-04-29 Anton Kolesov <anton.kolesov@synopsys.com>
* arc/crt0.S: Fix support for processors without barrel-shifter.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
This is similar to commit 06537f05d4 to the
newlib for ARC.
GCC for ARC has been updated to provide consistent naming of preprocessor
definitions for different optional architecture features:
* __ARC_BARREL_SHIFTER__ instead of __Xbarrel_shifter for
-mbarrel-shifter
* __ARCEM__ instead of __EM__ for ARC EM cores
* __ARCHS__ instead of __HS__ for ARC HS cores
* etc (not used in libgloss)
This patch updates crt0.S for ARC to use new definitions instead of a
deprecated ones. To ensure compatibility with older compiler new definitions
are also defined in crt0.S if needed, based on presence of deprecated
preprocessor definitions.
libgloss/ChangeLog
2016-04-29 Anton Kolesov <Anton.Kolesov@synopsys.com>
* arc/crt0.S: Use new GCC defines to detect processor features.
ARC aproach to this feature is similiar to ARM's one here.
2016-04-29 Anton Kolesov <anton.kolesov@synopsys.com>
* arc/nano.specs: New file.
* arc/Makefile.in: Support nano.specs.
* arc/nsim.specs: Likewise.