Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #! /bin/sh |
2 | # Generate nltvals.def, a file that describes various newlib/libgloss | |
3 | # target values used by the host/target interface. | |
4 | # | |
5 | # Syntax: /bin/sh gennltvals.sh shell srcroot cpp | |
6 | ||
7 | shell=$1 | |
8 | srcroot=$2 | |
9 | cpp=$3 | |
10 | ||
11 | srccom=$srcroot/sim/common | |
12 | ||
13 | echo '/* Newlib/libgloss macro values needed by remote target support. */' | |
14 | echo '/* This file is machine generated by gennltvals.sh. */' | |
15 | ||
16 | $shell ${srccom}/gentvals.sh "" errno ${srcroot}/newlib/libc/include \ | |
509deab2 | 17 | "errno.h sys/errno.h" 'E[[:upper:][:digit:]]*' "${cpp}" |
c906108c SS |
18 | |
19 | $shell ${srccom}/gentvals.sh "" signal ${srcroot}/newlib/libc/include \ | |
509deab2 | 20 | "signal.h sys/signal.h" 'SIG[[:upper:][:digit:]]*' "${cpp}" |
c906108c SS |
21 | |
22 | $shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \ | |
509deab2 | 23 | "fcntl.h sys/fcntl.h sys/_default_fcntl.h" 'O_[[:upper:][:digit:]]*' "${cpp}" |
c906108c SS |
24 | |
25 | # Unfortunately, each newlib/libgloss port has seen fit to define their own | |
26 | # syscall.h file. This means that system call numbers can vary for each port. | |
27 | # Support for all this crud is kept here, rather than trying to get too fancy. | |
28 | # If you want to try to improve this, please do, but don't break anything. | |
29 | # Note that there is a standard syscall.h file (libgloss/syscall.h) now which | |
30 | # hopefully more targets can use. | |
31 | ||
ef016f83 MF |
32 | dir=libgloss target=bfin |
33 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 34 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
ef016f83 | 35 | |
c906108c SS |
36 | dir=newlib/libc/sys/d10v/sys target=d10v |
37 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 38 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c | 39 | |
3fbeef0b AC |
40 | # OBSOLETE dir=libgloss target=d30v |
41 | # OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 42 | # OBSOLETE "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c | 43 | |
2a3591b0 SR |
44 | dir=libgloss target=cr16 |
45 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 46 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
2a3591b0 | 47 | |
c906108c SS |
48 | dir=libgloss target=fr30 |
49 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 50 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c | 51 | |
33319edb DB |
52 | dir=libgloss target=frv |
53 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 54 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
33319edb | 55 | |
c906108c SS |
56 | dir=libgloss/i960 target=i960 |
57 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 58 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c SS |
59 | |
60 | dir=libgloss target=m32r | |
61 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 62 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c SS |
63 | |
64 | dir=libgloss target=mn10200 | |
65 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 66 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c SS |
67 | |
68 | dir=libgloss target=mn10300 | |
69 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 70 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c SS |
71 | |
72 | dir=libgloss target=sparc | |
73 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 74 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
c906108c SS |
75 | |
76 | dir=libgloss/v850/sys target=v850 | |
77 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 78 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |
33319edb | 79 | |
c28c63d8 JB |
80 | dir=libgloss target=lm32 |
81 | $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ | |
509deab2 | 82 | "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" |