Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NATIVEENDIAN is set to LittleEndian on a Big-endian platform #110

Open
barracuda156 opened this issue Aug 15, 2024 · 2 comments
Open

NATIVEENDIAN is set to LittleEndian on a Big-endian platform #110

barracuda156 opened this issue Aug 15, 2024 · 2 comments

Comments

@barracuda156
Copy link
Contributor

Maybe I misunderstand something, but why on a Big-endian system I get NATIVEENDIAN='LittleEndian' in configure status?
Autoconf correctly determines the endianness and sets it here:

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=powerpc-apple-darwin10.0.0d2
ac_cv_c_bigendian=yes
ac_cv_c_compiler_gnu=yes

Yet, further down I see:

MD4ARCH='power'
MD4COMP='cc'
MINOR_VERSION='1'
MLDONKEY_VERSION='3.1.7'
MORE_SUBDIRS=''
MORE_TARGETS=' mldonkey_gui$(EXE)'
NATIVEENDIAN='LittleEndian'
NEWCXX='ccache /opt/local/bin/g++-mp-14'
@ygrek
Copy link
Owner

ygrek commented Aug 29, 2024

maybe because 🤔

The default for action-if-true is to define ‘WORDS_BIGENDIAN’. The default for action-if-false is to do nothing. The default for action-if-unknown is to abort configure and tell the installer how to bypass this test. And finally, the default for action-if-universal is to ensure that ‘WORDS_BIGENDIAN’ is defined if and only if a universal build is detected and the current code is big-endian; this default works only if autoheader is used.

If you use this macro without specifying action-if-universal, you should also use AC_CONFIG_HEADERS; otherwise ‘WORDS_BIGENDIAN’ may be set incorrectly for Mac OS X universal binary files.

anyhow this check will go away with bitstring unbundling

@barracuda156
Copy link
Contributor Author

Just in case, that was a single-arch build (gcc does not support universal builds at all presently).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants