aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-25 18:11:35 -0400
committerMike Frysinger <vapier@gentoo.org>2021-04-26 22:39:55 -0400
commitbd0918c910b7c4ee056d9c3413f8c680dff11584 (patch)
treeaf087569015bdab3a78c4445c5224c02e7fc1463 /sim
parent66d055c75479e0c51745fc3b40faec6df7a01620 (diff)
downloadgdb-bd0918c910b7c4ee056d9c3413f8c680dff11584.zip
gdb-bd0918c910b7c4ee056d9c3413f8c680dff11584.tar.gz
gdb-bd0918c910b7c4ee056d9c3413f8c680dff11584.tar.bz2
sim: nltvals: unify common syscall tables
Since libgloss provides a default syscall table for arches, use that to provide the default syscall table for ports. Only the exceptions need to be enumerated now with the common logic as the default.
Diffstat (limited to 'sim')
-rw-r--r--sim/ChangeLog4
-rw-r--r--sim/README-HACKING7
-rw-r--r--sim/bfin/ChangeLog4
-rw-r--r--sim/bfin/Makefile.in3
-rw-r--r--sim/common/ChangeLog8
-rwxr-xr-xsim/common/gennltvals.py49
-rw-r--r--sim/common/nltvals.def474
-rw-r--r--sim/cris/ChangeLog4
-rw-r--r--sim/cris/Makefile.in3
-rw-r--r--sim/frv/ChangeLog4
-rw-r--r--sim/frv/Makefile.in3
-rw-r--r--sim/iq2000/ChangeLog4
-rw-r--r--sim/iq2000/Makefile.in3
-rw-r--r--sim/lm32/ChangeLog4
-rw-r--r--sim/lm32/Makefile.in3
-rw-r--r--sim/m32c/ChangeLog4
-rw-r--r--sim/m32c/Makefile.in3
-rw-r--r--sim/m32r/ChangeLog4
-rw-r--r--sim/m32r/Makefile.in3
-rw-r--r--sim/mn10300/ChangeLog4
-rw-r--r--sim/mn10300/Makefile.in3
-rw-r--r--sim/moxie/ChangeLog4
-rw-r--r--sim/moxie/Makefile.in3
-rw-r--r--sim/msp430/ChangeLog4
-rw-r--r--sim/msp430/Makefile.in3
-rw-r--r--sim/pru/ChangeLog4
-rw-r--r--sim/pru/Makefile.in2
-rw-r--r--sim/rx/ChangeLog4
-rw-r--r--sim/rx/Makefile.in3
29 files changed, 117 insertions, 508 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 51ca492..b622f62 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * README-HACKING (nltvals.def): Update to gennltvals.py.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* m4/sim_ac_output.m4 (SIM_AC_OUTPUT): Require SIM_AC_OPTION_HARDWARE.
2021-04-23 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/README-HACKING b/sim/README-HACKING
index 7858058..bd0054f 100644
--- a/sim/README-HACKING
+++ b/sim/README-HACKING
@@ -180,7 +180,7 @@ got one to hand):
$ cd /tmp/$$
$ cvs checkout sim-no-testsuite libgloss-no-testsuite newlib-no-testsuite
-Configure things for an arbitrary simulator target (I've d10v for
+Configure things for an arbitrary simulator target (d10v is used here for
convenience):
$ mkdir /tmp/$$/build
@@ -192,9 +192,10 @@ In the sim/ directory rebuild the headers:
$ cd sim/
$ make nltvals
-To add a new target:
+If the target uses the common syscall table (libgloss/syscall.h), then you're
+all set! If the target has a custom syscall table, you need to declare it:
- devo/sim/common/gennltvals.sh
+ devo/sim/common/gennltvals.py
Add your new processor target (you'll need to grub
around to find where your syscall.h lives).
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 65c96b2..4db4214 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (NL_TARGET): Delete.
+
2021-04-23 Mike Frysinger <vapier@gentoo.org>
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
diff --git a/sim/bfin/Makefile.in b/sim/bfin/Makefile.in
index a5c1676..c53acd1 100644
--- a/sim/bfin/Makefile.in
+++ b/sim/bfin/Makefile.in
@@ -15,9 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This selects the bfin newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_bfin
-
## COMMON_PRE_CONFIG_FRAG
SIM_OBJS = \
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 0a05cf3..838709c 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,11 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * gennltvals.py (TARGETS): Delete. Update comment.
+ (gentvals): Unify common code paths.
+ (gen_targets): Change TARGETS to TARGETS_DIRS. Call gentvals without
+ target argument.
+ * nltvals.def: Regenerate.
+
2021-04-25 Tom Tromey <tom@tromey.com>
* sim-options.c (compare_strings): New function.
diff --git a/sim/common/gennltvals.py b/sim/common/gennltvals.py
index cf23c39..b3e558d 100755
--- a/sim/common/gennltvals.py
+++ b/sim/common/gennltvals.py
@@ -37,12 +37,13 @@ from typing import Iterable, List, TextIO
PROG = Path(__file__).name
-# Unfortunately, each newlib/libgloss port has seen fit to define their own
+# Unfortunately, many newlib/libgloss ports have seen fit to define their own
# syscall.h file. This means that system call numbers can vary for each port.
# Support for all this crud is kept here, rather than trying to get too fancy.
# If you want to try to improve this, please do, but don't break anything.
-# Note that there is a standard syscall.h file (libgloss/syscall.h) now which
-# hopefully more targets can use.
+#
+# If a target isn't listed here, it gets the standard syscall.h file (see
+# libgloss/syscall.h) which hopefully new targets will use.
#
# NB: New ports should use libgloss, not newlib.
TARGET_DIRS = {
@@ -54,32 +55,7 @@ TARGET_DIRS = {
'sh': 'newlib/libc/sys/sh/sys',
'v850': 'libgloss/v850/sys',
}
-TARGETS = {
- 'bfin',
- 'cr16',
- 'd10v',
- 'fr30',
- 'frv',
- 'i960',
- 'iq2000',
- 'lm32',
- 'm32c',
- 'm32r',
- 'mcore',
- 'mn10200',
- 'mn10300',
- 'moxie',
- 'msp430',
- 'pru',
- 'riscv',
- 'rx',
- 'sh',
- 'sparc',
- 'v850',
-}
-# Make sure TARGET_DIRS doesn't gain any typos.
-assert not set(TARGET_DIRS) - TARGETS
# The header for the generated def file.
FILE_HEADER = f"""\
@@ -103,11 +79,9 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
fullpath = srcdir / header
assert fullpath.exists(), f'{fullpath} does not exist'
- if target is None:
- print(f'#ifdef {srctype}_defs', file=output)
- else:
+ if target is not None:
print(f'#ifdef NL_TARGET_{target}', file=output)
- print(f'#ifdef {srctype}_defs', file=output)
+ print(f'#ifdef {srctype}_defs', file=output)
print('\n'.join(f'/* from {x} */' for x in headers), file=output)
@@ -137,13 +111,13 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
if line.startswith('DEFVAL '):
print(line[6:].rstrip(), file=output)
+ print(f'#undef {srctype}_defs', file=output)
if target is None:
print(f'/* end {srctype} target macros */', file=output)
- print('#endif', file=output)
else:
print(f'/* end {target} {srctype} target macros */', file=output)
print('#endif', file=output)
- print('#endif', file=output)
+ print('#endif', file=output)
def gen_common(output: TextIO, newlib: Path, cpp: str):
@@ -163,11 +137,14 @@ def gen_common(output: TextIO, newlib: Path, cpp: str):
def gen_targets(output: TextIO, newlib: Path, cpp: str):
"""Generate the target-specific lists."""
- for target in sorted(TARGETS):
- subdir = TARGET_DIRS.get(target, 'libgloss')
+ for target, subdir in sorted(TARGET_DIRS.items()):
gentvals(output, cpp, 'sys', newlib / subdir, ('syscall.h',),
r'SYS_[_a-zA-Z0-9]*', target=target)
+ # Then output the common syscall targets.
+ gentvals(output, cpp, 'sys', newlib / 'libgloss', ('syscall.h',),
+ r'SYS_[_a-zA-Z0-9]*')
+
def gen(output: TextIO, newlib: Path, cpp: str):
"""Generate all the things!"""
diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def
index 27f1b0d..8ae8839 100644
--- a/sim/common/nltvals.def
+++ b/sim/common/nltvals.def
@@ -89,6 +89,7 @@
{ "ETXTBSY", 26 },
{ "EWOULDBLOCK", 11 },
{ "EXDEV", 18 },
+#undef errno_defs
/* end errno target macros */
#endif
#ifdef signal_defs
@@ -130,6 +131,7 @@
{ "SIGWINCH", 28 },
{ "SIGXCPU", 24 },
{ "SIGXFSZ", 25 },
+#undef signal_defs
/* end signal target macros */
#endif
#ifdef open_defs
@@ -154,39 +156,9 @@
{ "O_SYNC", 0x2000 },
{ "O_TRUNC", 0x0400 },
{ "O_WRONLY", 1 },
+#undef open_defs
/* end open target macros */
#endif
-#ifdef NL_TARGET_bfin
-#ifdef sys_defs
-/* from syscall.h */
-/* begin bfin sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end bfin sys target macros */
-#endif
-#endif
#ifdef NL_TARGET_cr16
#ifdef sys_defs
/* from syscall.h */
@@ -219,6 +191,7 @@
{ "SYS_wait", 202 },
{ "SYS_wait4", 7 },
{ "SYS_write", 0x404 },
+#undef sys_defs
/* end cr16 sys target macros */
#endif
#endif
@@ -253,71 +226,10 @@
{ "SYS_wait", 202 },
{ "SYS_wait4", 7 },
{ "SYS_write", 4 },
+#undef sys_defs
/* end d10v sys target macros */
#endif
#endif
-#ifdef NL_TARGET_fr30
-#ifdef sys_defs
-/* from syscall.h */
-/* begin fr30 sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end fr30 sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_frv
-#ifdef sys_defs
-/* from syscall.h */
-/* begin frv sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end frv sys target macros */
-#endif
-#endif
#ifdef NL_TARGET_i960
#ifdef sys_defs
/* from syscall.h */
@@ -339,133 +251,10 @@
{ "SYS_unlink", 7 },
{ "SYS_utime", 17 },
{ "SYS_write", 232 },
+#undef sys_defs
/* end i960 sys target macros */
#endif
#endif
-#ifdef NL_TARGET_iq2000
-#ifdef sys_defs
-/* from syscall.h */
-/* begin iq2000 sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end iq2000 sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_lm32
-#ifdef sys_defs
-/* from syscall.h */
-/* begin lm32 sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end lm32 sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_m32c
-#ifdef sys_defs
-/* from syscall.h */
-/* begin m32c sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end m32c sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_m32r
-#ifdef sys_defs
-/* from syscall.h */
-/* begin m32r sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end m32r sys target macros */
-#endif
-#endif
#ifdef NL_TARGET_mcore
#ifdef sys_defs
/* from syscall.h */
@@ -481,164 +270,10 @@
{ "SYS_times", 43 },
{ "SYS_unlink", 10 },
{ "SYS_write", 4 },
+#undef sys_defs
/* end mcore sys target macros */
#endif
#endif
-#ifdef NL_TARGET_mn10200
-#ifdef sys_defs
-/* from syscall.h */
-/* begin mn10200 sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end mn10200 sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_mn10300
-#ifdef sys_defs
-/* from syscall.h */
-/* begin mn10300 sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end mn10300 sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_moxie
-#ifdef sys_defs
-/* from syscall.h */
-/* begin moxie sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end moxie sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_msp430
-#ifdef sys_defs
-/* from syscall.h */
-/* begin msp430 sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end msp430 sys target macros */
-#endif
-#endif
-#ifdef NL_TARGET_pru
-#ifdef sys_defs
-/* from syscall.h */
-/* begin pru sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end pru sys target macros */
-#endif
-#endif
#ifdef NL_TARGET_riscv
#ifdef sys_defs
/* from syscall.h */
@@ -685,40 +320,10 @@
{ "SYS_unlink", 1026 },
{ "SYS_write", 64 },
{ "SYS_writev", 66 },
+#undef sys_defs
/* end riscv sys target macros */
#endif
#endif
-#ifdef NL_TARGET_rx
-#ifdef sys_defs
-/* from syscall.h */
-/* begin rx sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end rx sys target macros */
-#endif
-#endif
#ifdef NL_TARGET_sh
#ifdef sys_defs
/* from syscall.h */
@@ -754,40 +359,10 @@
{ "SYS_wait", 202 },
{ "SYS_wait4", 7 },
{ "SYS_write", 4 },
+#undef sys_defs
/* end sh sys target macros */
#endif
#endif
-#ifdef NL_TARGET_sparc
-#ifdef sys_defs
-/* from syscall.h */
-/* begin sparc sys target macros */
- { "SYS_argc", 22 },
- { "SYS_argn", 24 },
- { "SYS_argnlen", 23 },
- { "SYS_argv", 13 },
- { "SYS_argvlen", 12 },
- { "SYS_chdir", 14 },
- { "SYS_chmod", 16 },
- { "SYS_close", 3 },
- { "SYS_exit", 1 },
- { "SYS_fstat", 10 },
- { "SYS_getpid", 8 },
- { "SYS_gettimeofday", 19 },
- { "SYS_kill", 9 },
- { "SYS_link", 21 },
- { "SYS_lseek", 6 },
- { "SYS_open", 2 },
- { "SYS_read", 4 },
- { "SYS_reconfig", 25 },
- { "SYS_stat", 15 },
- { "SYS_time", 18 },
- { "SYS_times", 20 },
- { "SYS_unlink", 7 },
- { "SYS_utime", 17 },
- { "SYS_write", 5 },
-/* end sparc sys target macros */
-#endif
-#endif
#ifdef NL_TARGET_v850
#ifdef sys_defs
/* from syscall.h */
@@ -821,6 +396,37 @@
{ "SYS_wait", 202 },
{ "SYS_wait4", 7 },
{ "SYS_write", 4 },
+#undef sys_defs
/* end v850 sys target macros */
#endif
#endif
+#ifdef sys_defs
+/* from syscall.h */
+/* begin sys target macros */
+ { "SYS_argc", 22 },
+ { "SYS_argn", 24 },
+ { "SYS_argnlen", 23 },
+ { "SYS_argv", 13 },
+ { "SYS_argvlen", 12 },
+ { "SYS_chdir", 14 },
+ { "SYS_chmod", 16 },
+ { "SYS_close", 3 },
+ { "SYS_exit", 1 },
+ { "SYS_fstat", 10 },
+ { "SYS_getpid", 8 },
+ { "SYS_gettimeofday", 19 },
+ { "SYS_kill", 9 },
+ { "SYS_link", 21 },
+ { "SYS_lseek", 6 },
+ { "SYS_open", 2 },
+ { "SYS_read", 4 },
+ { "SYS_reconfig", 25 },
+ { "SYS_stat", 15 },
+ { "SYS_time", 18 },
+ { "SYS_times", 20 },
+ { "SYS_unlink", 7 },
+ { "SYS_utime", 17 },
+ { "SYS_write", 5 },
+#undef sys_defs
+/* end sys target macros */
+#endif
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index 191768d..4f0d2e3 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (NL_TARGET): Delete.
+
2021-04-25 Tom Tromey <tom@tromey.com>
* Makefile.in (SIM_EXTRA_DEPS): Add engv32.h.
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 48a379d..3dcdbb2 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -40,9 +40,6 @@ SIM_EXTRA_DEPS = \
SIM_EXTRA_CLEAN = cris-clean
-# This selects the cris newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_cris
-
## COMMON_POST_CONFIG_FRAG
arch = cris
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 6452399..666aa82 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (NL_TARGET): Delete.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete call.
* configure: Regenerate.
diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in
index 8759961..7d1eaf51 100644
--- a/sim/frv/Makefile.in
+++ b/sim/frv/Makefile.in
@@ -40,9 +40,6 @@ SIM_EXTRA_CFLAGS = @sim_trapdump@
SIM_EXTRA_CLEAN = frv-clean
-# This selects the frv newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_frv
-
## COMMON_POST_CONFIG_FRAG
arch = frv
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index ffb7ab9..71483c1 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (NL_TARGET): Delete.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete call.
* configure: Regenerate.
diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in
index 6047033..dfa0e67 100644
--- a/sim/iq2000/Makefile.in
+++ b/sim/iq2000/Makefile.in
@@ -15,9 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This selects the newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_iq2000
-
## COMMON_PRE_CONFIG_FRAG
IQ2000_OBJS = iq2000.o cpu.o decode.o sem.o model.o mloop.o
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index 6a3287a..bc22fd7 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (NL_TARGET): Delete.
+
2021-04-23 Mike Frysinger <vapier@gentoo.org>
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in
index 51e6269..31c3940 100644
--- a/sim/lm32/Makefile.in
+++ b/sim/lm32/Makefile.in
@@ -22,9 +22,6 @@ SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \
SIM_EXTRA_CLEAN = lm32-clean
-# This selects the lm32 newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_lm32
-
## COMMON_POST_CONFIG_FRAG
arch = lm32
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index c2991c6..28626e2 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (NL_TARGET): Delete.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* aclocal.m4, config.in, configure: Regenerate.
2021-04-22 Tom Tromey <tom@tromey.com>
diff --git a/sim/m32c/Makefile.in b/sim/m32c/Makefile.in
index 7e27eb5..05aa753 100644
--- a/sim/m32c/Makefile.in
+++ b/sim/m32c/Makefile.in
@@ -18,9 +18,6 @@
### You should have received a copy of the GNU General Public License
### along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This selects the newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_m32c
-
## COMMON_PRE_CONFIG_FRAG
SIM_EXTRA_CFLAGS = -Wall -DTIMER_A
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 7fb4761..3cdcc24 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (NL_TARGET): Delete.
+
2021-04-23 Mike Frysinger <vapier@gentoo.org>
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in
index fe470f6..2bb246d 100644
--- a/sim/m32r/Makefile.in
+++ b/sim/m32r/Makefile.in
@@ -44,9 +44,6 @@ SIM_EXTRA_CFLAGS = @sim_extra_cflags@
SIM_EXTRA_CLEAN = m32r-clean
-# This selects the m32r newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_m32r
-
## COMMON_POST_CONFIG_FRAG
arch = m32r
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index aa09b2c..e0fcfcd 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (NL_TARGET): Delete.
+
2021-04-23 Mike Frysinger <vapier@gentoo.org>
* configure.ac (SIM_AC_OPTION_HARDWARE): Delete first two args.
diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in
index 9852f66..39faa30 100644
--- a/sim/mn10300/Makefile.in
+++ b/sim/mn10300/Makefile.in
@@ -29,9 +29,6 @@ SIM_EXTRA_CLEAN = clean-igen
# Extra dependencies for "sim-main.h"
SIM_EXTRA_DEPS = mn10300_sim.h itable.h idecode.h
-# Select mn10300 support in nltvals.def.
-NL_TARGET = -DNL_TARGET_mn10300
-
# List of extra flags to always pass to $(CC).
SIM_EXTRA_CFLAGS = -DPOLL_QUIT_INTERVAL=0x20
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index 3e74d3f..6fb2cdd 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (NL_TARGET): Delete.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* aclocal.m4, config.in, configure: Regenerate.
2021-04-22 Tom Tromey <tom@tromey.com>
diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in
index 3d96188..bd58074 100644
--- a/sim/moxie/Makefile.in
+++ b/sim/moxie/Makefile.in
@@ -15,9 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This selects the newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_moxie
-
## COMMON_PRE_CONFIG_FRAG
DTC = @DTC@
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index 3d14ecb..70997e5 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (NL_TARGET): Delete.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* aclocal.m4, config.in, configure: Regenerate.
2021-04-22 Tom Tromey <tom@tromey.com>
diff --git a/sim/msp430/Makefile.in b/sim/msp430/Makefile.in
index 113f28d..b32a38b 100644
--- a/sim/msp430/Makefile.in
+++ b/sim/msp430/Makefile.in
@@ -41,9 +41,6 @@ SIM_EXTRA_INSTALL =
# Dependency of `clean' to clean any extra files.
SIM_EXTRA_CLEAN =
-# This selects the MSP430 newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_msp430
-
## COMMON_POST_CONFIG_FRAG
# Rules need to build $(SIM_OBJS), plus whatever else the target wants.
diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog
index 926fe2d..437300e 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (NL_TARGET): Delete.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* aclocal.m4, config.in, configure: Regenerate.
2021-04-22 Tom Tromey <tom@tromey.com>
diff --git a/sim/pru/Makefile.in b/sim/pru/Makefile.in
index 7dd79b4..7d4ff7a 100644
--- a/sim/pru/Makefile.in
+++ b/sim/pru/Makefile.in
@@ -24,6 +24,4 @@ SIM_OBJS = \
interp.o \
sim-resume.o
-NL_TARGET = -DNL_TARGET_pru
-
## COMMON_POST_CONFIG_FRAG
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index fbc8516..7541c9d 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,5 +1,9 @@
2021-04-26 Mike Frysinger <vapier@gentoo.org>
+ * Makefile.in (NL_TARGET): Delete.
+
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
+
* aclocal.m4, config.in, configure: Regenerate.
2021-04-22 Tom Tromey <tom@tromey.com>
diff --git a/sim/rx/Makefile.in b/sim/rx/Makefile.in
index 9e83e3a..4008aac 100644
--- a/sim/rx/Makefile.in
+++ b/sim/rx/Makefile.in
@@ -18,9 +18,6 @@
### You should have received a copy of the GNU General Public License
### along with the GNU simulators; if not, see <http://www.gnu.org/licenses/>.
-# This selects the newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_rx
-
## COMMON_PRE_CONFIG_FRAG
SIM_EXTRA_CFLAGS = -Wall