Message ID | 1419270604.27606.32.camel@ubuntu-sellcey |
---|---|
State | New |
Headers | show |
On Mon, 22 Dec 2014, Steve Ellcey wrote: > Would sysdeps/unix/mips/sysdep.h be an appropriate place to define > __mips_isa_rev? That header is already used by memcpy and memset. > I thought about using asm.h but that header is visible to users and > defining it there would be a visible change that could affect user > programs. sysdep.h is internal to glibc and so does not have that > problem. Seems reasonable. This sysdep.h patch is OK. Does it fix all __mips_isa_rev -Wundef warnings in the build (for the older MIPS versions for which this was an issue) or do some files need changing to include sysdep.h.
On Mon, 2014-12-22 at 17:58 +0000, Joseph Myers wrote: > On Mon, 22 Dec 2014, Steve Ellcey wrote: > > > Would sysdeps/unix/mips/sysdep.h be an appropriate place to define > > __mips_isa_rev? That header is already used by memcpy and memset. > > I thought about using asm.h but that header is visible to users and > > defining it there would be a visible change that could affect user > > programs. sysdep.h is internal to glibc and so does not have that > > problem. > > Seems reasonable. This sysdep.h patch is OK. Does it fix all > __mips_isa_rev -Wundef warnings in the build (for the older MIPS versions > for which this was an issue) or do some files need changing to include > sysdep.h. It should fix all the _mips_isa_rev -Wundef warnings except for the check I added last week to sysdeps/mips/machine-gmon.h. Neither that header nor gmon/mcount.c which uses that header includes sysdep.h. Steve Ellcey sellcey@imgtec.com
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h index d59fac0..dc70c0f 100644 --- a/sysdeps/unix/mips/sysdep.h +++ b/sysdeps/unix/mips/sysdep.h @@ -78,4 +78,8 @@ # define L(label) .L ## label #endif +#ifndef __mips_isa_rev +# define __mips_isa_rev 0 +#endif + #endif