2 # Generate nltvals.def, a file that describes various newlib/libgloss
3 # target values used by the host/target interface.
5 # Syntax: /bin/sh gennltvals.sh shell srcroot cpp
11 srccom
=$srcroot/sim
/common
12 if [ -d "${srcroot}/newlib" ]; then
13 # If newlib is manually in the same source tree, use it.
16 # Else assume it's alongside the gdb/binutils repo.
17 newlibroot
=${srcroot}/..
/newlib
20 echo '/* Newlib/libgloss macro values needed by remote target support. */'
21 echo '/* This file is machine generated by gennltvals.sh. */'
23 $shell ${srccom}/gentvals.sh
"" errno
${newlibroot}/newlib
/libc
/include \
24 "errno.h sys/errno.h" 'E[[:upper:][:digit:]]*' "${cpp}"
26 $shell ${srccom}/gentvals.sh
"" signal
${newlibroot}/newlib
/libc
/include \
27 "signal.h sys/signal.h" 'SIG[[:upper:][:digit:]]*' "${cpp}"
29 $shell ${srccom}/gentvals.sh
"" open
${newlibroot}/newlib
/libc
/include \
30 "fcntl.h sys/fcntl.h sys/_default_fcntl.h" 'O_[[:upper:][:digit:]]*' "${cpp}"
32 # Unfortunately, each newlib/libgloss port has seen fit to define their own
33 # syscall.h file. This means that system call numbers can vary for each port.
34 # Support for all this crud is kept here, rather than trying to get too fancy.
35 # If you want to try to improve this, please do, but don't break anything.
36 # Note that there is a standard syscall.h file (libgloss/syscall.h) now which
37 # hopefully more targets can use.
39 dir
=libgloss target
=bfin
40 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
41 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
43 dir
=newlib
/libc
/sys
/d10v
/sys target
=d10v
44 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
45 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
47 # OBSOLETE dir=libgloss target=d30v
48 # OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
49 # OBSOLETE "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
51 dir
=libgloss
/cr16
/sys target
=cr16
52 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
53 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
55 dir
=libgloss target
=fr30
56 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
57 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
59 dir
=libgloss target
=frv
60 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
61 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
63 dir
=libgloss
/i960 target
=i960
64 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
65 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
67 dir
=libgloss target
=m32r
68 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
69 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
71 dir
=libgloss
/mcore target
=mcore
72 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
73 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
75 dir
=libgloss target
=mn10200
76 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
77 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
79 dir
=libgloss target
=mn10300
80 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
81 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
83 dir
=libgloss target
=msp430
84 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
85 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
87 dir
=libgloss target
=sparc
88 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
89 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
91 dir
=libgloss
/v850
/sys target
=v850
92 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
93 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
95 dir
=libgloss target
=lm32
96 $shell ${srccom}/gentvals.sh
$target sys
${newlibroot}/$dir \
97 "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"