Subject: pkg/23181: GMP does not handle pure-endian FP on ARM
To: None <gnats-bugs@gnats.netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: netbsd-bugs
Date: 10/17/2003 20:33:01
>Number: 23181
>Category: pkg
>Synopsis: GMP does not handle pure-endian FP on ARM
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 17 19:34:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Richard Earnshaw
>Release: NetBSD 1.6ZC
>Organization:
ARM
--
>Environment:
Any little-endian 1.6 release for ARM
System: NetBSD shark1.cambridge.arm.com 1.6ZC NetBSD 1.6ZC (SHARK1) #7: Sat Sep 27 15:13:42 BST 2003 rearnsha@vpc960.cambridge.arm.com:/usr/src/sys/arch/shark/compile/SHARK1 shark
Architecture: arm
Machine: shark
>Description:
The gmp package fails its diagnostic tests. This is because it
doesn't recognise the VFP style pure-endian floating-point format.
>How-To-Repeat:
after building the gmp package, cd to the build area and run
gmake check
Some tests will fail
>Fix:
Apply this patch:
*** gmp-impl.h.orig Sun Dec 22 06:22:13 2002
--- gmp-impl.h Fri Oct 17 20:28:06 2003
*************** typedef unsigned int UHWtype;
*** 2463,2469 ****
/* Define ieee_double_extract and _GMP_IEEE_FLOATS. */
! #if (defined (__arm__) && (defined (__ARMWEL__) || defined (__linux__)))
/* Special case for little endian ARM since floats remain in big-endian. */
#define _GMP_IEEE_FLOATS 1
union ieee_double_extract
--- 2463,2470 ----
/* Define ieee_double_extract and _GMP_IEEE_FLOATS. */
! #if (defined (__arm__) && !defined(__VFP_FP__) \
! && (defined (__ARMWEL__) || defined (__linux__)))
/* Special case for little endian ARM since floats remain in big-endian. */
#define _GMP_IEEE_FLOATS 1
union ieee_double_extract
*************** union ieee_double_extract
*** 2480,2485 ****
--- 2481,2487 ----
#else
#if defined (_LITTLE_ENDIAN) || defined (__LITTLE_ENDIAN__) \
|| defined (__alpha) \
+ || (defined (__arm__) && defined (__VFP_FP__) && defined (__ARMEL__)) \
|| defined (__clipper__) \
|| defined (__cris) \
|| defined (__i386__) \
>Release-Note:
>Audit-Trail:
>Unformatted: