Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread H. Peter Anvin
On 05/30/2014 01:34 PM, Andy Lutomirski wrote: >> >> GET_LE() then? > > Sounds good. > > Are you planning on writing the patch? > > I think my v2 is good -- the only diff I could find in my image.c > files and Stephen's was in the alt_xyz output, and I think I fixed > that in v2. > Build

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread Andy Lutomirski
On Fri, May 30, 2014 at 1:21 PM, H. Peter Anvin wrote: > On 05/30/2014 01:09 PM, Andy Lutomirski wrote: >>> >>> I came up with the following, it seems like a reasonable simplification: >>> #define _LE(x, bits, ifnot) \

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread H. Peter Anvin
On 05/30/2014 01:09 PM, Andy Lutomirski wrote: >> >> I came up with the following, it seems like a reasonable simplification: >> >>> #define _LE(x, bits, ifnot) \ >>> __builtin_choose_expr( \ >>>

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread Andy Lutomirski
On Fri, May 30, 2014 at 1:02 PM, H. Peter Anvin wrote: > On 05/30/2014 08:48 AM, Andy Lutomirski wrote: >> This adds a macro GET(x) to convert x from big-endian to >> little-endian. Hopefully I put it everywhere it needs to go and got >> all the cases needed for everyone's linux/elf.h. >> >>

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread H. Peter Anvin
On 05/30/2014 08:48 AM, Andy Lutomirski wrote: > This adds a macro GET(x) to convert x from big-endian to > little-endian. Hopefully I put it everywhere it needs to go and got > all the cases needed for everyone's linux/elf.h. > > Signed-off-by: Andy Lutomirski > --- > arch/x86/vdso/vdso2c.c |

[PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread Andy Lutomirski
This adds a macro GET(x) to convert x from big-endian to little-endian. Hopefully I put it everywhere it needs to go and got all the cases needed for everyone's linux/elf.h. Signed-off-by: Andy Lutomirski --- arch/x86/vdso/vdso2c.c | 15 arch/x86/vdso/vdso2c.h | 63

[PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread Andy Lutomirski
This adds a macro GET(x) to convert x from big-endian to little-endian. Hopefully I put it everywhere it needs to go and got all the cases needed for everyone's linux/elf.h. Signed-off-by: Andy Lutomirski l...@amacapital.net --- arch/x86/vdso/vdso2c.c | 15 arch/x86/vdso/vdso2c.h |

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread H. Peter Anvin
On 05/30/2014 08:48 AM, Andy Lutomirski wrote: This adds a macro GET(x) to convert x from big-endian to little-endian. Hopefully I put it everywhere it needs to go and got all the cases needed for everyone's linux/elf.h. Signed-off-by: Andy Lutomirski l...@amacapital.net ---

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread Andy Lutomirski
On Fri, May 30, 2014 at 1:02 PM, H. Peter Anvin h...@zytor.com wrote: On 05/30/2014 08:48 AM, Andy Lutomirski wrote: This adds a macro GET(x) to convert x from big-endian to little-endian. Hopefully I put it everywhere it needs to go and got all the cases needed for everyone's linux/elf.h.

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread H. Peter Anvin
On 05/30/2014 01:09 PM, Andy Lutomirski wrote: I came up with the following, it seems like a reasonable simplification: #define _LE(x, bits, ifnot) \ __builtin_choose_expr( \ (sizeof(x) ==

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread Andy Lutomirski
On Fri, May 30, 2014 at 1:21 PM, H. Peter Anvin h...@zytor.com wrote: On 05/30/2014 01:09 PM, Andy Lutomirski wrote: I came up with the following, it seems like a reasonable simplification: #define _LE(x, bits, ifnot) \ __builtin_choose_expr(

Re: [PATCH v2 2/2] x86,vdso: Fix cross-compilation from big-endian architectures

2014-05-30 Thread H. Peter Anvin
On 05/30/2014 01:34 PM, Andy Lutomirski wrote: GET_LE() then? Sounds good. Are you planning on writing the patch? I think my v2 is good -- the only diff I could find in my image.c files and Stephen's was in the alt_xyz output, and I think I fixed that in v2. Build testing one now.