Bug#212912: GCC Patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
New patch file with Falk's documentation correction fixed (GNU math libraries
- -> GCC libc math libraries) attached. Thanks Falk.
- -T
PS (again): This patch is meant to be applied directly against the current
tree (i.e. the tree that only contains the original alpha-ieee.dpatch file I
submitted and has not any of the subsequent patches I submitted applied).
- --
Tyson Whitehead (-twhitehe@uwo.ca -- WSC-)
Computer Engineer Dept. of Applied Mathematics,
Graduate Student- Applied Mathematics University of Western Ontario,
GnuPG Key ID# 0x8A2AB5D8 London, Ontario, Canada
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAEYDYRXbLmIoqtdgRArpsAJ99EHfU6ha5uTCegn8zLhK6U5nLxwCdEYHA
oo1HBlfOrQ0k4DZeqSCHrHY=
=3H/8
-----END PGP SIGNATURE-----
--- debian/patches/alpha-ieee.dpatch_ 2004-01-06 11:31:19.000000000 -0500
+++ debian/patches/alpha-ieee.dpatch 2004-01-06 11:32:24.000000000 -0500
@@ -29,58 +29,27 @@
---- src/gcc/config.gcc.orig 2003-07-13 14:22:54.000000000 -0400
-+++ src/gcc/config.gcc 2003-07-14 14:13:22.000000000 -0400
-@@ -554,7 +554,7 @@
- ;;
- alpha*-*-linux*)
- tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
-- target_cpu_default="MASK_GAS"
-+ target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
- tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
- ;;
- alpha*-*-gnu*)
---- src/gcc/config/alpha/alpha.h.orig 2003-07-14 14:10:01.000000000 -0400
-+++ src/gcc/config/alpha/alpha.h 2003-07-14 14:12:55.000000000 -0400
-@@ -294,6 +294,8 @@
- N_("Request IEEE-conformant math library routines (OSF/1)")}, \
- {"ieee", MASK_IEEE|MASK_IEEE_CONFORMANT, \
- N_("Emit IEEE-conformant code, without inexact exceptions")}, \
-+ {"no-ieee", -(MASK_IEEE|MASK_IEEE_CONFORMANT), \
-+ N_("Emit IEEE-nonconformant code (reverses -mieee)")}, \
- {"ieee-with-inexact", MASK_IEEE_WITH_INEXACT|MASK_IEEE_CONFORMANT, \
- N_("Emit IEEE-conformant code, with inexact exceptions")}, \
- {"build-constants", MASK_BUILD_CONSTANTS, \
---- src/gcc/doc/invoke.texi.orig 2003-07-14 14:25:46.000000000 -0400
-+++ src/gcc/doc/invoke.texi 2003-07-14 15:22:28.000000000 -0400
-@@ -521,7 +521,7 @@
-
- @emph{DEC Alpha Options}
- @gccoptlist{-mno-fp-regs -msoft-float -malpha-as -mgas @gol
---mieee -mieee-with-inexact -mieee-conformant @gol
-+-mieee -mno-ieee -mieee-with-inexact -mieee-conformant @gol
- -mfp-trap-mode=@var{mode} -mfp-rounding-mode=@var{mode} @gol
- -mtrap-precision=@var{mode} -mbuild-constants @gol
- -mcpu=@var{cpu-type} -mtune=@var{cpu-type} @gol
-@@ -8917,7 +8917,9 @@
- and hence need not save and restore, any floating-point registers.
-
- @item -mieee
-+@itemx -mno-ieee
- @opindex mieee
-+@opindex mno-ieee
- The Alpha architecture implements floating-point hardware optimized for
- maximum performance. It is mostly compliant with the IEEE floating
- point standard. However, for full compliance, software assistance is
-@@ -8929,6 +8931,12 @@
- values such as not-a-number and plus/minus infinity. Other Alpha
+--- src/gcc/config/alpha/alpha.c_ 2003-12-23 15:08:11.000000000 -0500
++++ src/gcc/config/alpha/alpha.c 2003-12-23 15:16:31.000000000 -0500
+@@ -337,4 +337,8 @@
+ };
+
++ /* If not -ffinite-math-only, enable -mieee*/
++ if (!flag_finite_math_only)
++ target_flags |= MASK_IEEE|MASK_IEEE_CONFORMANT;
++
+ /* Unicos/Mk doesn't have shared libraries. */
+ if (TARGET_ABI_UNICOSMK && flag_pic)
+--- src/gcc/doc/invoke.texi_ 2004-01-06 10:59:19.000000000 -0500
++++ src/gcc/doc/invoke.texi 2004-01-06 11:26:11.000000000 -0500
+@@ -8571,4 +8571,11 @@
compilers call this option @option{-ieee_with_no_inexact}.
-+Under Debian GNU/Linux, @option{-mieee} is turned on by default, because the
-+functions implemented in software in the GCC math libraries conform to
-+the IEEE specification (i.e. they generate denormalized numbers, and
-+such, which will causes the program to SIGFPE when it attempts to use
-+the results in the FPU, if @option{-mieee} has not be specified).
++DEBIAN SPECIFIC: This option is on by default, unless
++@option{-ffinite-math-only} (which is part of the @option{-ffast-math}
++set) is specified, because the software functions in the GNU libc math
++libraries generate denormalized numbers, NaNs, and infs (all of which
++will cause a programs to SIGFPE when it attempts to use the results without
++@option{-mieee}).
+
@item -mieee-with-inexact
@opindex mieee-with-inexact
- This is like @option{-mieee} except the generated code also maintains
--- debian/rules.patch_ 2004-01-06 11:37:21.000000000 -0500
+++ debian/rules.patch 2004-01-06 11:37:36.000000000 -0500
@@ -72,5 +72,5 @@
ifeq ($(DEB_TARGET_ARCH),alpha)
- debian_patches +=
+ debian_patches += alpha-ieee
endif
ifeq ($(DEB_TARGET_ARCH),arm)
Reply to: