The following problems exist, at the very least, in bash 3.1.16, 3.1.17,
and 3.2.1 - I assume it affects the all bash-3.x releases.
If bash is built with the SGI MIPSpro compilers then, now matter what
other CFLAGS are in affect, the test suite fails in many ways (and one
of the many issues this causes is what I describe in the first posts on
the above forum).
When bash is built with MIPSpro and "-O1" with any other combination of
CFLAGS, the test suite mostly succeeds (the intl tests fail - but I
assume this is because IRIX isn't UTF8-aware) - up to the printf tests.
The output here is:
- at which point the test-suite hangs (and reports "Error 130" if
interrupted). Looking at the contents of /tmp/xx, the output up to the
point of the failure was:
0.00
0.00
0.0
0.00
0.00
0.0
-INF
-inf
-INF
-inf
... which means that the test which causes the hang is 'printf "%G\n" 4.2'.
With GCC, the test-suite doesn't hang - but the results are:
run-printf
61,74c61,74
< 0.00
< 0.00
< 0.0
< 0.00
< 0.00
< 0.0
< 0.000000E+00
< 0.000000e+00
< 0.0E+00
< 0.0e+00
< 0
< 0
< 0
< 0
---
> 4.20
> 4.20
> 4.2
> 4.20
> 4.20
> 4.2
> 4.200000E+00
> 4.200000e+00
> 4.2E+00
> 4.2e+00
> 4.2
> 4.2
> 4.2
> 4.2
81,82c81,82
< 0.00
< 0.00
---
> 115.00
> 115.00
.. so even with GCC printf doesn't work (but does always output a
variant of "0", rather than negative infinity).
Looking at the bash source, the hang is triggered from
builtins/printf.def by the block starting at line 493. The problem
might lie with the call to "PF (f, p);", where "PF" is a macro defined
on line 90 - but I cannot see how this works.
There's clearly some broken magic here if it causes MIPSpro to generate
code which hangs, and GCC to produce code which always outputs a variant
of "0"!
Repeat-By:
Attemping to build bash-3.x on IRIX with GCC or MIPSpro, regardless of
CFLAGS.