SHA256
1
0
forked from pool/findutils
Dr. Werner Fink 2016-03-14 14:25:00 +00:00 committed by Git OBS Bridge
parent 69cc15be27
commit c75e0e8147
3 changed files with 44 additions and 0 deletions

36
LDBL_MAX-gcc4.4.patch Normal file
View File

@ -0,0 +1,36 @@
| From: Werner Fink <werner@suse.de>
| Date: Mon, 14 Mar 2016 14:20:51 +0000
|
| Is this wrong value of LDBL_MAX still valid got gcc > 4
| Compare with
| https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00011.html
|
---
gl/lib/float.in.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- gl/lib/float.in.h
+++ gl/lib/float.in.h 2016-03-14 14:15:45.616871084 +0000
@@ -112,21 +112,21 @@ extern const union gl_long_double_union
wrong.
On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */
#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP DBL_MIN_EXP
# undef LDBL_MIN_10_EXP
# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
# undef LDBL_MIN
# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
#endif
-#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
+#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4))
# undef LDBL_MAX
/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }.
It is not easy to define:
#define LDBL_MAX 1.79769313486231580793728971405302307166e308L
is too small, whereas
#define LDBL_MAX 1.79769313486231580793728971405302307167e308L
is too large. Apparently a bug in GCC decimal-to-binary conversion.
Also, I can't get values larger than
#define LDBL63 ((long double) (1ULL << 63))
#define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 14 14:23:10 UTC 2016 - werner@suse.de
- Add patch LDBL_MAX-gcc4.4.patch to fix build on all ppc platforms
Note that this patch might be a temporary patch.
-------------------------------------------------------------------
Mon Jan 11 22:25:09 UTC 2016 - mail@bernhard-voelker.de

View File

@ -33,6 +33,7 @@ Source0: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz
# adds a new option -xautofs to find to not descend into directories on autofs file systems
Patch0: findutils-4.4.2-xautofs.patch
Patch1: LDBL_MAX-gcc4.4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# BuildRequire dejagnu for 'runtest' to execute all tests.
@ -63,6 +64,7 @@ useful for finding things on your system.
%prep
%setup -q
%patch0
%patch1
%build
%if 0%{?qemu_user_space_build}