diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-04-21 02:24:34 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-04-21 03:10:16 -0400 |
commit | 248d23e82bc9430cdb6424a5b6b48999cf4001db (patch) | |
tree | e93b168dc06d0dbdbbd50106dedaffc1afa2b1cf /sim/common | |
parent | 0bca7f99d8fa254b5e35a211ee306a46b95adc65 (diff) | |
download | gdb-248d23e82bc9430cdb6424a5b6b48999cf4001db.zip gdb-248d23e82bc9430cdb6424a5b6b48999cf4001db.tar.gz gdb-248d23e82bc9430cdb6424a5b6b48999cf4001db.tar.bz2 |
sim: gennltvals.sh: handle split out newlib source tree
Since newlib no longer shares the same repo as binutils/gdb, we have to go
searching further afield to locate the sources. We still look at the top
level for newlib, but if that is not found, we also try up one dir outside
of this source tree. It sucks, but better than the status quo (no workie).
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | sim/common/cgen.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sim/common/genmloop.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sim/common/gennltvals.sh | 41 | ||||
-rwxr-xr-x[-rw-r--r--] | sim/common/gentvals.sh | 0 |
5 files changed, 32 insertions, 17 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 858e432..d9c6963 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,11 @@ +2015-04-21 Mike Frysinger <vapier@gentoo.org> + + * cgen.sh: Add +x permissions. + * genmloop.sh: Likewise. + * gentvals.sh: Likewise. + * gennltvals.sh (newlibroot): New variable to hold the path to newlib. + Change all uses of srcroot for newlib to newlibroot. + 2015-04-18 Mike Frysinger <vapier@gentoo.org> * sim-base.h (SIM_CPU): New typedef. diff --git a/sim/common/cgen.sh b/sim/common/cgen.sh index 394ef2d..394ef2d 100644..100755 --- a/sim/common/cgen.sh +++ b/sim/common/cgen.sh diff --git a/sim/common/genmloop.sh b/sim/common/genmloop.sh index 2006940..2006940 100644..100755 --- a/sim/common/genmloop.sh +++ b/sim/common/genmloop.sh diff --git a/sim/common/gennltvals.sh b/sim/common/gennltvals.sh index 81df382..1a9e853 100644..100755 --- a/sim/common/gennltvals.sh +++ b/sim/common/gennltvals.sh @@ -9,17 +9,24 @@ srcroot=$2 cpp=$3 srccom=$srcroot/sim/common +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 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 \ +$shell ${srccom}/gentvals.sh "" errno ${newlibroot}/newlib/libc/include \ "errno.h sys/errno.h" 'E[[:upper:][:digit:]]*' "${cpp}" -$shell ${srccom}/gentvals.sh "" signal ${srcroot}/newlib/libc/include \ +$shell ${srccom}/gentvals.sh "" signal ${newlibroot}/newlib/libc/include \ "signal.h sys/signal.h" 'SIG[[:upper:][:digit:]]*' "${cpp}" -$shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \ +$shell ${srccom}/gentvals.sh "" open ${newlibroot}/newlib/libc/include \ "fcntl.h sys/fcntl.h sys/_default_fcntl.h" 'O_[[:upper:][:digit:]]*' "${cpp}" # Unfortunately, each newlib/libgloss port has seen fit to define their own @@ -30,57 +37,57 @@ $shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \ # hopefully more targets can use. dir=libgloss target=bfin -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=newlib/libc/sys/d10v/sys target=d10v -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" # OBSOLETE dir=libgloss target=d30v -# OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +# OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ # OBSOLETE "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss/cr16/sys target=cr16 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=fr30 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=frv -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss/i960 target=i960 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=m32r -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=mn10200 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=mn10300 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=msp430 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=sparc -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss/v850/sys target=v850 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" dir=libgloss target=lm32 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ +$shell ${srccom}/gentvals.sh $target sys ${newlibroot}/$dir \ "syscall.h" 'SYS_[_[:alnum:]]*' "${cpp}" diff --git a/sim/common/gentvals.sh b/sim/common/gentvals.sh index 6dd7315..6dd7315 100644..100755 --- a/sim/common/gentvals.sh +++ b/sim/common/gentvals.sh |