8000 BUG: no more __LITTLE_ENDIAN - Endianess detection broken on Linux with GCC · Issue #655 · QW-Group/ezquake-source · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
BUG: no more __LITTLE_ENDIAN - Endianess detection broken on Linux with GCC #655
Closed
@libTorrentUser

Description

@libTorrentUser

ezQuake version:
latest release and current master.

OS/device including version:
Linux (Alpine)

Describe the bug
The endianess detection in q_shared.h fails because GCC no longer defines __LITTLE_ENDIAN nor __BIG_ENDIAN. Those were replaced by ´__ORDER_LITTLE_ENDIAN__' and ´__ORDER_BIG_ENDIAN__´

This happens when using GCC 11.2. CLang also seems to use __ORDER_LITTLE_ENDIAN__ and __ORDER_BIG_ENDIAN__ but, as far as I know, it doesn't define __FLOAT_WORD_ORDER. So... it is a mess :)

You can check what those compilers define with
clang -dM -E -x c /dev/nul | grep ENDIAN
gcc -dM -E -x c /dev/null | grep ENDIAN

I'm using GCC so, for me, it was just a matter of replacing the symbols to get it to compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0