X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fgenscrba.sh;h=d10e27a43c60fa18467479b32ee583c0f4d8945e;hb=39a7b38fac0e6e90baa3d661a271377db3ba1765;hp=621de7ab47a4261543966dc1f77f70da33def304;hpb=c43cc9ffbac15580ba3e8ef74eeb71a3fdfb2786;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/genscrba.sh b/ld/genscrba.sh index 621de7ab47..d10e27a43c 100644 --- a/ld/genscrba.sh +++ b/ld/genscrba.sh @@ -3,12 +3,14 @@ source_em() { local current_script="$em_script" em_script=$1 - . $em_script + source_sh $1 em_script=$current_script } fragment() { - local lineno=$[${BASH_LINENO[0]} + 1] - echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\"" + if [ ${BASH_VERSINFO[3]} -ge 3 ]; then + local lineno=$[${BASH_LINENO[0]} + 1] + echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\"" + fi cat >> e${EMULATION_NAME}.c }