lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I don't know how to ask to prioritize this as:

1) This issue is not affecting lua 5.3.4 (latest version) - I could compile it and run with gcc and clang. I checked the luaconf.h and there is no powerpc specific code.

2) Lua 5.2 series doesn't seem to be updated anymore (last version was 5.2.4 (2 years old)) - Moreover I discussed on #llvm-ppc64 irc channel (on freenode) and echristo pointed out that the newest clang is actually implementing all kinds of big/small caps definitions for ppc[2], but I guess it wouldn't solve this issue, as the solution on little endian is to fall through those elseif's (something achievable only with gcc, as it doesn't define __POWERPC__ neither __ppc__).


So... what do? The good thing is that debian-like distros seem to be using gcc so there is no issue being reported from users. If that's the case Liz, please point out what is your motivation in compiling lua 5.2 with clang at the moment.


Thanks


References:
[1] https://www.lua.org/ftp/#source
[2] https://www.irccloud.com/pastebin/ajRunLuh/

> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org]
> On Behalf Of Elizabeth Kammer
> Sent: segunda-feira, 5 de junho de 2017 20:07
> To: Lua mailing list <lua-l@lists.lua.org>
> Subject: Re: [BUG] Lua 5.2 on PowerPC64
> 
> Hi Gustavo,
> 
> I am also running Ubuntu on PowerPC8 LittleEndian.
> 
> I believe the reason I'm seeing the issue is that I'm building with
> clang/LLVM rather rather than installing the version compiled with gcc.
> clang/LLVM is defining both __POWERPC__ and __ppc__:
> $ clang -dM -E -x c /dev/null | grep __POWERPC__ #define __POWERPC__ 1 $
> clang -dM -E -x c /dev/null grep __ppc__ #define __ppc__ 1
> 
> However, I suspect that based on your gcc preprocessor defines, which
> specify both __powerpc__ and __PPC__, but not __POWERPC__ or __ppc__,
> the reason you're not seeing an issue is that you're falling through to
> the else case:
> 
> 
> 
> src/luaconf.h:
> 
> <snip>
> #elif defined(__POWERPC__) || defined(__ppc__)                  /* }{ */
> 
> #define LUA_IEEE754TRICK
> #define LUA_IEEEENDIAN          1
> 
> #else                                                           /* }{ */
> 
> /* assume IEEE754 and a 32-bit integer type */
> #define LUA_IEEE754TRICK
> 
> #endif                                                          /* } */
> </snip>
> 
> 
> 
> Since the Open Power ABI Specification only specifies __powerpc__ and
> __PPC__, in addition to adding a check for endianness,
> 
> 
> src/luaconf.h:
> 
> <snip>
> #elif defined(__POWERPC__) || defined(__ppc__)      /* }{ */
> </snip>
> 
> should be:
> <snip>
> #elif defined(__POWERPC__)  || defined(__powerpc__) || defined(__ppc__)
> || defined(__PPC__)      /* }{ */
> </snip>
> 
> Thanks,
> Liz