1999-04-16 09:35:26 +08:00
|
|
|
#! /bin/sh
|
|
|
|
# Generate nltvals.def, a file that describes various newlib/libgloss
|
|
|
|
# target values used by the host/target interface.
|
|
|
|
#
|
|
|
|
# Syntax: /bin/sh gennltvals.sh shell srcroot cpp
|
|
|
|
|
|
|
|
shell=$1
|
|
|
|
srcroot=$2
|
|
|
|
cpp=$3
|
|
|
|
|
|
|
|
srccom=$srcroot/sim/common
|
|
|
|
|
|
|
|
echo '/* Newlib/libgloss macro values needed by remote target support. */'
|
|
|
|
echo '/* This file is machine generated by gennltvals.sh. */'
|
|
|
|
|
|
|
|
$shell ${srccom}/gentvals.sh "" errno ${srcroot}/newlib/libc/include \
|
2012-03-19 12:54:48 +08:00
|
|
|
"errno.h sys/errno.h" 'E[[:upper:][:digit:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
$shell ${srccom}/gentvals.sh "" signal ${srcroot}/newlib/libc/include \
|
2012-03-19 12:54:48 +08:00
|
|
|
"signal.h sys/signal.h" 'SIG[[:upper:][:digit:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
$shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \
|
2012-03-19 12:54:48 +08:00
|
|
|
"fcntl.h sys/fcntl.h sys/_default_fcntl.h" 'O_[[:upper:][:digit:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
# Unfortunately, each newlib/libgloss port has 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.
|
|
|
|
|
2011-03-06 08:20:21 +08:00
|
|
|
dir=libgloss target=bfin
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2011-03-06 08:20:21 +08:00
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
dir=newlib/libc/sys/d10v/sys target=d10v
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
2002-07-14 08:15:20 +08:00
|
|
|
# OBSOLETE dir=libgloss target=d30v
|
|
|
|
# OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
# OBSOLETE "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
2012-08-30 15:05:19 +08:00
|
|
|
dir=libgloss/cr16/sys target=cr16
|
2008-04-08 16:44:51 +08:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2008-04-08 16:44:51 +08:00
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
dir=libgloss target=fr30
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
2003-08-30 00:43:38 +08:00
|
|
|
dir=libgloss target=frv
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2003-08-30 00:43:38 +08:00
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
dir=libgloss/i960 target=i960
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
dir=libgloss target=m32r
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
dir=libgloss target=mn10200
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
dir=libgloss target=mn10300
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
2013-06-21 18:59:14 +08:00
|
|
|
dir=libgloss target=msp430
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
dir=libgloss target=sparc
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
dir=libgloss/v850/sys target=v850
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2003-08-30 00:43:38 +08:00
|
|
|
|
2009-05-18 21:25:35 +08:00
|
|
|
dir=libgloss target=lm32
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
|
2012-03-19 12:54:48 +08:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|