Message ID | 1443117604.8687.31.camel@ubuntu-sellcey |
---|---|
State | New |
Headers | show |
On Thu, 24 Sep 2015, Steve Ellcey wrote: > This patch is causing a build failure on mips16 hard-float builds. It > dies with: I don't see why this would have anything to do with my patch (it's including math_private.h in more places, but the same set-but-not-used condition ought to apply to all of them), but your patch seems right for this case (a variable that is deliberately set but not used).
On Thu, 2015-09-24 at 18:08 +0000, Joseph Myers wrote: > On Thu, 24 Sep 2015, Steve Ellcey wrote: > > > This patch is causing a build failure on mips16 hard-float builds. It > > dies with: > > I don't see why this would have anything to do with my patch (it's > including math_private.h in more places, but the same set-but-not-used > condition ought to apply to all of them), but your patch seems right for > this case (a variable that is deliberately set but not used). It looks like math_private.h was never included in a file that got built for mips16 before. If I build an earlier version of glibc and put a deliberate syntax error in libc_fesetenv_mips that will only trigger when building for mips16, it never triggers. All the includes of math_private.h used to be in the ieee754/* and math/* files. It looks like none of the ieee754 routines are compiled for mips16 hard-float glibc and for the math routines we have a Makefile fragment in sysdeps/mips/mips32/mips16/fpu/Makefile that contains: ifeq ($(subdir),math) sysdep-CFLAGS += -mno-mips16 endif Now we have stdlib/strtod_l.c including math_private.h and this appears to be the only file outside of ieee754, math, or platform specific fpu directories to include this header. Steve Ellcey sellcey@imgtec.com
On Thu, 24 Sep 2015, Steve Ellcey wrote: > It looks like math_private.h was never included in a file that got built > for mips16 before. If I build an earlier version of glibc and put a > deliberate syntax error in libc_fesetenv_mips that will only trigger > when building for mips16, it never triggers. Thanks for the explanation. Your patch is OK.
You appear to have missed the ChangeLog update in your commit; please add the missing ChangeLog entry. We do not have automatic ChangeLog generation implemented yet, so commits still need to include a change to the ChangeLog file.
On Thu, 2015-09-24 at 23:36 +0000, Joseph Myers wrote: > You appear to have missed the ChangeLog update in your commit; please add > the missing ChangeLog entry. We do not have automatic ChangeLog > generation implemented yet, so commits still need to include a change to > the ChangeLog file. Yes, I did miss that. I will add it now. Steve Ellcey sellcey@imgtec.com
diff --git a/sysdeps/mips/math_private.h b/sysdeps/mips/math_private.h index baa5f28..3db0273 100644 --- a/sysdeps/mips/math_private.h +++ b/sysdeps/mips/math_private.h @@ -106,7 +106,7 @@ libc_feholdexcept_setround_mips (fenv_t *envp, int round) static __always_inline void libc_fesetenv_mips (fenv_t *envp) { - fpu_control_t cw; + fpu_control_t cw __attribute__ ((unused)); /* Read current state to flush fpu pipeline. */ _FPU_GETCW (cw);