1999-04-16 03:35:26 +02: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
|
2015-04-21 08:24:34 +02:00
|
|
|
if [ -d "${srcroot}/newlib" ]; then
|
|
|
|
# If newlib is manually in the same source tree, use it.
|
|
|
|
newlibroot=${srcroot}
|
|
|
|
else
|
|
|
|
# Else assume it's alongside the gdb/binutils repo.
|
|
|
|
newlibroot=${srcroot}/../newlib
|
|
|
|
fi
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
echo '/* Newlib/libgloss macro values needed by remote target support. */'
|
|
|
|
echo '/* This file is machine generated by gennltvals.sh. */'
|
|
|
|
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh "" errno ${newlibroot}/newlib/libc/include \
|
2012-03-19 05:54:48 +01:00
|
|
|
"errno.h sys/errno.h" 'E[[:upper:][:digit:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh "" signal ${newlibroot}/newlib/libc/include \
|
2012-03-19 05:54:48 +01:00
|
|
|
"signal.h sys/signal.h" 'SIG[[:upper:][:digit:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh "" open ${newlibroot}/newlib/libc/include \
|
2012-03-19 05:54:48 +01:00
|
|
|
"fcntl.h sys/fcntl.h sys/_default_fcntl.h" 'O_[[:upper:][:digit:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02: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 01:20:21 +01:00
|
|
|
dir=libgloss target=bfin
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2011-03-06 01:20:21 +01:00
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
dir=newlib/libc/sys/d10v/sys target=d10v
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2002-07-14 02:15:20 +02:00
|
|
|
# OBSOLETE dir=libgloss target=d30v
|
2015-04-21 08:24:34 +02:00
|
|
|
# OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
# OBSOLETE "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2012-08-30 09:05:19 +02:00
|
|
|
dir=libgloss/cr16/sys target=cr16
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2008-04-08 10:44:51 +02:00
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
dir=libgloss target=fr30
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2003-08-29 18:43:38 +02:00
|
|
|
dir=libgloss target=frv
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2003-08-29 18:43:38 +02:00
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
dir=libgloss/i960 target=i960
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
dir=libgloss target=m32r
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2015-04-21 08:30:21 +02:00
|
|
|
dir=libgloss/mcore target=mcore
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
dir=libgloss target=mn10200
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
dir=libgloss target=mn10300
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2013-06-21 12:59:14 +02:00
|
|
|
dir=libgloss target=msp430
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2013-06-21 12:59:14 +02:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
dir=libgloss target=sparc
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
dir=libgloss/v850/sys target=v850
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2003-08-29 18:43:38 +02:00
|
|
|
|
2009-05-18 15:25:35 +02:00
|
|
|
dir=libgloss target=lm32
|
2015-04-21 08:24:34 +02:00
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
2012-03-19 05:54:48 +01:00
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|
2019-09-23 18:54:42 +02:00
|
|
|
|
|
|
|
dir=libgloss target=pru
|
|
|
|
$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \
|
|
|
|
"syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}"
|