[Bug ld/5652] New: genscripts.sh fails with BASH_LINENO

2008-01-21 Thread vincent dot riviere at freesbee dot fr
When compiling the binutils on some systems, the ld link fails. The reason is 
that the generated emulation C file is empty.
By looking at the make output, we can see
.../genscripts.sh: line 403: ${BASH_LINENO[0]} + 1: bad substitution
However, no error is detected, and the build process of ld continues until the 
final link, which fails.

This happens when $(SHELL) is actually bash compiled with the --enable-minimal-
config option. In that case, the variable BASH is set, but the array 
BASH_LINENO is not supported.

The problem is at the bottom of ld/genscripts.sh
If it is supported by the shell, line number information is inserted into the 
generated emulation source, by using BASH_LINENO. However the detection method 
is wrong. It assumes that if the BASH variable is set, the BASH_LINENO array 
will be available, which is not always true.

-- 
   Summary: genscripts.sh fails with BASH_LINENO
   Product: binutils
   Version: 2.19 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: vincent dot riviere at freesbee dot fr
CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=5652

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/5652] genscripts.sh fails with BASH_LINENO

2008-01-21 Thread vincent dot riviere at freesbee dot fr

--- Additional Comments From vincent dot riviere at freesbee dot fr  
2008-01-21 18:39 ---
Created an attachment (id=2208)
 -- (http://sourceware.org/bugzilla/attachment.cgi?id=2208action=view)
genscripts fix

This patch fixes the bug. The availability of the BASH_LINENO variable is now
checked in a reliable way.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5652

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils