Re: __builtin_expect function isn't available in gcc below version 3
"'Richard Beckmann' via lua-l" <[email protected]>
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <lEA8aI0i-tCuG46cxkirvAlxj9oSQFW4IXVt7177pxHFVhcL9i126yJCbIyd7g3CAUn-qxhyKAf6FviNHg_r1fnbZh05KeIu2kmfkG-uRNc=@protonmail.com> |
> In this case, just compile Lua with -DLUA_NOBUILTIN. Forgot to mention. I and the Haiku developer Begasus already tried `-DLUA_NOBUILTIN` and it wasn't good enough for us. `-DLUA_NOBUILTIN` works for compiling Lua but not when using headers to compile Lua/C modules with LuaRocks. LuaRocks doesn't issue `-DLUA_NOBUILTIN` when compiling Lua/C modules. So, to make building Lua/C modules with LuaRocks work as well, we were forced to patch the headers. Sent with Proton Mail secure email. On Saturday, February 28th, 2026 at 10:28 AM, Luiz Henrique de Figueiredo <[email protected]> wrote: > > When compiling Lua 5.4.7 for Haiku targeting x86 32 bit using gcc 2 I encounter that '__builtin_expect' function isn't available. > > In this case, just compile Lua with -DLUA_NOBUILTIN. > > Thanks for the report and patch. > > -- > You received this message because you are subscribed to the Google Groups "lua-l" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > To view this discussion visit https://groups.google.com/d/msgid/lua-l/CABt16qmjBW5iUXk36QW2Vkmon-Hxc7kB%2B35T4%3DOhVbZOESsyvQ%40mail.gmail.com. > -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/lEA8aI0i-tCuG46cxkirvAlxj9oSQFW4IXVt7177pxHFVhcL9i126yJCbIyd7g3CAUn-qxhyKAf6FviNHg_r1fnbZh05KeIu2kmfkG-uRNc%3D%40protonmail.com.