[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#340871: [m68k] [patch] Toolchain regression in mathinline.h (glibc)

reopen 340871
tag 340871 - patch
tag 340871 + help

Roger Leigh wrote:
tags 340871 + patch

Stephen R Marenka <stephen@marenka.net> writes:

On Sat, Feb 25, 2006 at 11:36:53PM +0000, Roger Leigh wrote:
--- m68kmath/mathinline.h	2006-02-21 18:26:28.000000000 +0000
+++ mathinline.h	2006-02-25 23:30:48.000000000 +0000
@@ -100,7 +100,7 @@
 /* Define a const math function.  */
 #define __m81_defun(rettype, func, args)				      \
   __m81_inline rettype __attribute__((__const__))			      \
-  __m81_u(func) args
+  __m81_u(func) args __THROW
No joy.

This was in fact the solution.  It just needs fixing up in a few other

On Sun, Feb 26, 2006 at 12:06:17AM +0000, Roger Leigh wrote:

Another pointer: the code in mathinline.h needs to match the
prototypes generated by __MATHCALL in mathcalls.h (defined in

I'm not sure why there's such a mismatch.  Perhaps mathinline.h can
reuse some of the __MATHDECL* macros to prevent the differences?

OK.  Attached is:

- A minimal testcase (test.cc and Makefile)

  Summary: The prototypes in mathcalls.h and mathinline.h mismatch due
  to __THROW being removed from the mathinline.h header.

  The bug occurs when a combination of these occur:
  + -O2 is used (defines __OPTIMIZE__, causing mathinline.h to be
  + _GNU_SOURCE, _SVID_SOURCE or _BSD_SOURCE are defined, causing
    __USE_MISC to be defined, causing mathcalls.h to be included.
  + -pedantic is used, causing the mismatch to be a fatal error.

- A simple patch (mathinline.h.fixed.patch); this reverts the __THROW
- A smaller, better patch (mathinline.h.fixed2.patch) which fixes the
  macros rather than where the macros are used.  This is cleaner than
  the other patch.  Please could you apply this one?

This patch breaks the build of the glibc as it could be seen on:

Please provide another patch. It would be nice to try to build the glibc with it, so that we don't have such bad surprises anymore.


  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

Reply to: