Skip to contentSkip to conversation

eglibc: tweak glibc.fix_sqrt2.patch for eglibc-2.19

PATCH In review Hongxu Jia 2 participants 4 messages Mar 13, 2014

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover eglibc: tweak glibc.fix_sqrt2.patch for eglibc-2.19

The following changes since commit 5f81d9d1fa537445d5da49e12de1e16300e94552:

bitbake: runqueue: Use SIGCHLD instead of polling waitpid (2014-03-10 11:10:02 -0700)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-eglibc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-eglibc

Hongxu Jia (1):
eglibc: tweak glibc.fix_sqrt2.patch for eglibc-2.19

 .../eglibc/eglibc-2.19/glibc.fix_sqrt2.patch       | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 1/1 eglibc: tweak glibc.fix_sqrt2.patch for eglibc-2.19

While the type of powerpc32 cpu is 603e (In meta/conf/machine/ qemuppc.conf, require conf/machine/include/tune-ppc603e.inc), there was a failure to build eglibc-2.19:
...
| ../sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: In function '__slow_ieee754_sqrt':
| ../sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c:122:15: error:
subscripted value is neither array nor pointer nor vector

|        if ((u.l[1] & FE_INVALID) == 0)
|                ^
| ../sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c:121:20: warning:

variable 'u' set but not used [-Wunused-but-set-variable]
| fenv_union_t u = { .fenv = fegetenv_register () };
...

In 'eglibc-2.19/libc/sysdeps/powerpc/fpu/fenv_libc.h', the above struct fenv_union_t is defined as:
...
typedef union
{
fenv_t fenv;
unsigned long long l;
} fenv_union_t;
...

Rather than 'eglibc-2.16/libc/sysdeps/powerpc/fpu/fenv_libc.h':
...
typedef union
{
fenv_t fenv;
unsigned int l[2];
} fenv_union_t;
...

So we should update the glibc.fix_sqrt2.patch for eglibc-2.19.

---
 .../eglibc/eglibc-2.19/glibc.fix_sqrt2.patch       | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch +12 -12
index a669729..0dcca7c 100644
@@ -132,7 +132,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/pow
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -237,7 +237,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc/sysdeps/po
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -375,7 +375,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/p
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -480,7 +480,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c libc/sysdeps/
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -618,7 +618,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/po
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -723,7 +723,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c libc/sysdeps/p
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -861,7 +861,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/po
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -966,7 +966,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/p
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -1104,7 +1104,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/po
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -1209,7 +1209,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc/sysdeps/p
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -1347,7 +1347,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/po
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
@@ -1452,7 +1452,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c libc/sysdeps/p
 +      feraiseexcept (FE_INVALID_SQRT);
 +
 +      fenv_union_t u = { .fenv = fegetenv_register () };
-+      if ((u.l[1] & FE_INVALID) == 0)
++      if ((u.l & FE_INVALID) == 0)
 +#endif
 +	feraiseexcept (FE_INVALID);
 +      b = a_nan.value;
Signature · 1 line
1.8.1.2
#2 lore raw
In reply to Hongxu Jia
Quoted 8 lines · Hongxu Jia

The following changes since commit 5f81d9d1fa537445d5da49e12de1e16300e94552:

bitbake: runqueue: Use SIGCHLD instead of polling waitpid (2014-03-10 11:10:02 -0700)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-eglibc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-eglibc

Does this patch do anything in addition to

commit 6235cc3ccf98dce15ffe3313cf4e6cdf9c922bce

Author: Khem Raj <[email protected]>
Date:   Mon Mar 10 15:51:37 2014 +0000

eglibc: Fix build for FSL ppc/fpu

The patch needs to adapt to upstream changes
should fix errors on e500mc+ based SOCs

This should fix [YOCTO #5871]

Quoted 10 lines

Hongxu Jia (1):
eglibc: tweak glibc.fix_sqrt2.patch for eglibc-2.19

.../eglibc/eglibc-2.19/glibc.fix_sqrt2.patch | 24 +++++++++++-----------

1 file changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
1.8.1.2
author
#3 lore raw
Quoted 11 lines · Khem Raj
Quoted 8 lines · Hongxu Jia

The following changes since commit 5f81d9d1fa537445d5da49e12de1e16300e94552:

bitbake: runqueue: Use SIGCHLD instead of polling waitpid (2014-03-10 11:10:02 -0700)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-eglibc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-eglibc

Does this patch do anything in addition to

Oh, It seems I am not updating to the latest version, you have fixed this issue, so please drop the duplicated one.

//Hongxu

Quoted 28 lines

commit 6235cc3ccf98dce15ffe3313cf4e6cdf9c922bce

Author: Khem Raj <[email protected]>
Date:   Mon Mar 10 15:51:37 2014 +0000

eglibc: Fix build for FSL ppc/fpu

The patch needs to adapt to upstream changes
should fix errors on e500mc+ based SOCs

This should fix [YOCTO #5871]

Quoted 9 lines

Hongxu Jia (1):
eglibc: tweak glibc.fix_sqrt2.patch for eglibc-2.19

.../eglibc/eglibc-2.19/glibc.fix_sqrt2.patch | 24 +++++++++++-----------

1 file changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
1.8.1.2