public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: nltvals: unify common syscall tables
@ 2021-04-27  3:08 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2021-04-27  3:08 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bd0918c910b7c4ee056d9c3413f8c680dff11584

commit bd0918c910b7c4ee056d9c3413f8c680dff11584
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Apr 25 18:11:35 2021 -0400

    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.

Diff:
---
 sim/ChangeLog            |   4 +
 sim/README-HACKING       |   7 +-
 sim/bfin/ChangeLog       |   4 +
 sim/bfin/Makefile.in     |   3 -
 sim/common/ChangeLog     |   8 +
 sim/common/gennltvals.py |  49 ++---
 sim/common/nltvals.def   | 474 ++++-------------------------------------------
 sim/cris/ChangeLog       |   4 +
 sim/cris/Makefile.in     |   3 -
 sim/frv/ChangeLog        |   4 +
 sim/frv/Makefile.in      |   3 -
 sim/iq2000/ChangeLog     |   4 +
 sim/iq2000/Makefile.in   |   3 -
 sim/lm32/ChangeLog       |   4 +
 sim/lm32/Makefile.in     |   3 -
 sim/m32c/ChangeLog       |   4 +
 sim/m32c/Makefile.in     |   3 -
 sim/m32r/ChangeLog       |   4 +
 sim/m32r/Makefile.in     |   3 -
 sim/mn10300/ChangeLog    |   4 +
 sim/mn10300/Makefile.in  |   3 -
 sim/moxie/ChangeLog      |   4 +
 sim/moxie/Makefile.in    |   3 -
 sim/msp430/ChangeLog     |   4 +
 sim/msp430/Makefile.in   |   3 -
 sim/pru/ChangeLog        |   4 +
 sim/pru/Makefile.in      |   2 -
 sim/rx/ChangeLog         |   4 +
 sim/rx/Makefile.in       |   3 -
 29 files changed, 117 insertions(+), 508 deletions(-)

diff --git a/sim/ChangeLog b/sim/ChangeLog
index 51ca4926c73..b622f62e635 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/README-HACKING b/sim/README-HACKING
index 78580588bf2..bd0054fd22e 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 65c96b2f7b9..4db4214867a 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 a5c16764682..c53acd11030 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 0a05cf3b04b..838709ce984 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 cf23c392699..b3e558d580a 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 27f1b0d43b2..8ae88397249 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 191768d4642..4f0d2e3693d 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 48a379d7887..3dcdbb2da02 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 645239900f3..666aa825db9 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in
index 87599614020..7d1eaf51e02 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 ffb7ab9da54..71483c14163 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in
index 6047033b305..dfa0e67a767 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 6a3287a0540..bc22fd73a90 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 51e6269d27c..31c39400df8 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 c2991c60f86..28626e2e49e 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/m32c/Makefile.in b/sim/m32c/Makefile.in
index 7e27eb57da0..05aa75309fa 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 7fb4761a1a5..3cdcc24debe 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 fe470f6fc26..2bb246d2524 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 aa09b2cca14..e0fcfcdd7ff 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 9852f663ecb..39faa30efc2 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 3e74d3fbd57..6fb2cddd04a 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in
index 3d9618846cc..bd58074491f 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 3d14ecbbd59..70997e5e8dc 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/msp430/Makefile.in b/sim/msp430/Makefile.in
index 113f28d3c90..b32a38b07e4 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 926fe2dd1ac..437300e9dea 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/pru/Makefile.in b/sim/pru/Makefile.in
index 7dd79b4bba6..7d4ff7a4dca 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 fbc85161528..7541c9d7141 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/sim/rx/Makefile.in b/sim/rx/Makefile.in
index 9e83e3aad85..4008aac2619 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-27  3:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27  3:08 [binutils-gdb] sim: nltvals: unify common syscall tables Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).