diff options
author | Nick Clifton <nickc@redhat.com> | 2008-01-28 11:07:44 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-01-28 11:07:44 +0000 |
commit | 6e73d59506332fd0325445070952950f24b366a9 (patch) | |
tree | ace2f452d7bceef15da96658424c5561e6a70904 /ld | |
parent | 47f6dab9a3fb353b0faca52fcc07d2f57c4d906c (diff) | |
download | gdb-6e73d59506332fd0325445070952950f24b366a9.zip gdb-6e73d59506332fd0325445070952950f24b366a9.tar.gz gdb-6e73d59506332fd0325445070952950f24b366a9.tar.bz2 |
PR ld/5652
* genscripts.sh: Check for the existence of BASH_LINENO not just the BASH
shell before generating line numbers in the emulation file.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rwxr-xr-x | ld/genscripts.sh | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 2a72f89..b6ac62f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2008-01-28 Vincent Riviere <vincent.riviere@freesbee.fr> + + PR ld/5652 + * genscripts.sh: Check for the existence of BASH_LINENO not just + the BASH shell before generating line numbers in the emulation + file. + 2008-01-28 Alan Modra <amodra@bigpond.net.au> * emultempl/spu_ovl.S: Rewrite. diff --git a/ld/genscripts.sh b/ld/genscripts.sh index fd24097..f89b3cb 100755 --- a/ld/genscripts.sh +++ b/ld/genscripts.sh @@ -1,6 +1,6 @@ #!/bin/sh # genscripts.sh - generate the ld-emulation-target specific files -# Copyright 2007 Free Software Foundation, Inc. +# Copyright 2007, 2008 Free Software Foundation, Inc. # # This file is part of the Gnu Linker. # @@ -422,7 +422,16 @@ case " $EMULATION_LIBPATH " in *" ${EMULATION_NAME} "*) COMPILE_IN=true;; esac -if test -n "${BASH+set}"; then +# PR ld/5652: +# Determine if the shell has support for the variable BASH_LINENO. +# When it is the case, it is only available inside functions. +has_lineno() +{ + test "x$BASH_LINENO" != "x" +} + +# Enable accruate error source in the compiler error messages, if possible. +if has_lineno; then . ${srcdir}/genscrba.sh else source_em() |