alpha: build with -mieee
Formatting a NaN or an infinity killed the process with SIGFPE instead of
printing it. Alpha traps on NaN, infinity and denormals in hardware; -mieee is
what makes gcc insert the trap barriers and the software completion that turn
those into IEEE semantics. uClibc-ng passed the flag nowhere, so every build
for the architecture had this hole.
It stayed hidden because printf's plain decimal path barely touches such a
value, and because hexadecimal float formatting was not being exercised. Once
it was, printf_a and printf_efg went from a wrong result to exit 136: the %a
path scales the value with real arithmetic, and the test feeds -NAN and
-INFINITY as its first two inputs.
Measured under qemu-alpha with a static uClibc-ng from this tree:
without -mieee printf_a, printf_efg SIGFPE
with -mieee printf_a CRC 0x5797c255 expected
printf_efg CRC 0x52f6dd6b expected
Put in Rules.mak next to the other architectures' CPU_CFLAGS rather than left
to whoever configures the build, since it is not a policy choice: without it,
floating point formatting does not work on alpha at all. glibc has built its alpha libc this
way for as long as it has supported the architecture.
Note for whoever looks at alpha next: long double is 8 bytes there, the same
as double, so none of the long double wrapper issues apply.
Signed-off-by: Ramin Moussavi <lordrasmus@gmail.com>