Bug#203722: How to handle the -mieee SIGFPE problem in normal Debian packages

2004-02-11 Thread Adam C Powell IV
Greetings,

Here's a little m4 snippet you can stick into configure.in or .ac (from
my PETSc package's math-blaslapack.m4):

AC_DEFUN([ALPHA_MIEEE_CHECK],[
AC_CHECKING([whether -mieee is needed to avoid SIGFPE on divide by 
zero])
case $build/$CC in
alpha*/gcc* )
MIEEE_CFLAGS=-mieee
AC_MSG_RESULT([yes])
;;
* )
MIEEE_CFLAGS=
AC_MSG_RESULT([not needed])
;;
esac
AC_SUBST(MIEEE_CFLAGS)
])

Then you just add MIEEE_CFLAGS to CFLAGS, CXXFLAGS etc.

On Mon, 2004-02-09 at 12:18, Dominique Devriese wrote:
package konqueror
reopen 203722
thanks

Steve Langasek writes:

 I'm currently looking at the following bug report
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203722 about a
 frequent SIGFPE on an alpha machine.  I guess we all know the cause
 of this bug, namely the non-standard alpha FPU semantics.

 Even if gcc will soon adopt a patch to make -mieee the default,
 there will be older versions of gcc around for a while.  This is a
 bug *now*, and there's no reason not to add the -mieee explicitly to
 the compiler flags for the time being: it will just become a no-op
 later once this is the gcc default.

I guess I'm in the minority (based on prior discussions on
debian-alpha), but IMHO the above is a better way to work around this
issue than making slower performance the default... :-)

Cheers,
-- 
-Adam P.

GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Welcome to the best software in the world today cafe!
http://lyre.mit.edu/~powell/The_Best_Stuff_In_The_World_Today_Cafe.ogg



Bug#203722: How to handle the -mieee SIGFPE problem in normal Debian packages

2004-02-11 Thread Tyson Whitehead
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

  Even if gcc will soon adopt a patch to make -mieee the default,
  there will be older versions of gcc around for a while.  This is a
  bug *now*, and there's no reason not to add the -mieee explicitly to
  the compiler flags for the time being: it will just become a no-op
  later once this is the gcc default.

 Ok, thanks, I already closed the bug report after Falk's reply, but
 I'm reopening it now, and will try to get the maintainer to
 use the flag or do it myself when the group maintenance gets up to
 speed.

I tried recompiling Konqueror on my machine a while back with the -mieee flag 
to get rid of the SIGFPEs.  What I discovered is that you actually have to 
recompile most of KDE as well (i.e. all the libraries Konqueror depends on).

- -T

PS:  I don't know what gcc is used on the boxes used to compile the packages, 
but gcc-3.3 in the testing distribution has already been patched (a patched 
gcc is easily identified by checking the gcc man page for a DEBIAN SPECIFIC 
part under -mieee).

- -- 
 Tyson Whitehead  ([EMAIL PROTECTED] -- WSC-)
 Computer EngineerDept. of Applied Mathematics,
 Graduate Student- Applied MathematicsUniversity of Western Ontario,
 GnuPG Key ID# 0x8A2AB5D8 London, Ontario, Canada
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAKobARXbLmIoqtdgRAkBSAJ9t7nl+zXyu8OoJ/CeV09ZL9ssHZACgmHzr
dlDOYr8a5I4GD81/1jWGjqQ=
=B3Gp
-END PGP SIGNATURE-




Bug#203722: How to handle the -mieee SIGFPE problem in normal Debian packages

2004-02-09 Thread Falk Hueffner
Dominique Devriese [EMAIL PROTECTED] writes:

 I'm currently looking at the following bug report
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203722 about a
 frequent SIGFPE on an alpha machine.  I guess we all know the cause
 of this bug, namely the non-standard alpha FPU semantics.
 
 2 make all KDE programs install a SIG_IGN SIGFPE handler.  This can be
   done in kdelibs, and would be little work.

That ain't working, since ev4/ev5 FP exceptions are unresumable, which
is the root of all problems.

 4 wait for the gcc alpha patch to be included into gcc, which was
   posted on this list recently.

It has been added to the newest gcc (but not upstream), so the problem
should magically go away all by itself.

-- 
Falk



Bug#203722: How to handle the -mieee SIGFPE problem in normal Debian packages

2004-02-09 Thread Steve Langasek
On Mon, Feb 09, 2004 at 04:54:06PM +0100, Dominique Devriese wrote:

 Please respect the Mail-Followup-To, as I'm not subscribed to this
 list, and the discussion is relevant to #203722.

 I'm currently looking at the following bug report
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203722
 about a frequent SIGFPE on an alpha machine.  I guess we all know the
 cause of this bug, namely the non-standard alpha FPU semantics.

 My question is about how to handle this bug:
 IIUC, there are the following options:

 1 Fix upstream FP calculations to not trigger SIGFPEs. this is
   unfortunately not an option imho, because of lack of interest of
   developers.
 2 make all KDE programs install a SIG_IGN SIGFPE handler.  This can be
   done in kdelibs, and would be little work.
 3 make upstream configure detect alpha and compile with -mieee if so.
 4 wait for the gcc alpha patch to be included into gcc, which was
   posted on this list recently.

 What option would you suggest the Debian KDE packages take ?  I don't
 think there is any very FP-intensive code in the KDE packages, so
 performance is not really that much of an issue.

Even if gcc will soon adopt a patch to make -mieee the default, there
will be older versions of gcc around for a while.  This is a bug *now*,
and there's no reason not to add the -mieee explicitly to the compiler
flags for the time being: it will just become a no-op later once this is
the gcc default.

If you prefer to integrate this into the upstream configure rules,
that's fine, though it's trivial to do it in debian/rules instead (see
pseudopatch on one of the other bugs).

-- 
Steve Langasek
postmodern programmer


pgpgJ7cvP8ecX.pgp
Description: PGP signature


Bug#203722: How to handle the -mieee SIGFPE problem in normal Debian packages

2004-02-09 Thread Dominique Devriese

package konqueror
reopen 203722
thanks

Steve Langasek writes:

 I'm currently looking at the following bug report
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203722 about a
 frequent SIGFPE on an alpha machine.  I guess we all know the cause
 of this bug, namely the non-standard alpha FPU semantics.

 Even if gcc will soon adopt a patch to make -mieee the default,
 there will be older versions of gcc around for a while.  This is a
 bug *now*, and there's no reason not to add the -mieee explicitly to
 the compiler flags for the time being: it will just become a no-op
 later once this is the gcc default.

 If you prefer to integrate this into the upstream configure rules,
 that's fine, though it's trivial to do it in debian/rules instead
 (see pseudopatch on one of the other bugs).

Ok, thanks, I already closed the bug report after Falk's reply, but
I'm reopening it now, and will try to get the maintainer to
use the flag or do it myself when the group maintenance gets up to
speed.

cheers
domi