Get endianness into Makefile variable

This commit is contained in:
Martin Kroeker 2020-02-19 18:08:20 +01:00 committed by GitHub
parent 276c1791ea
commit 76b2cec6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -1328,6 +1328,7 @@ export OSNAME
export ARCH
export CORE
export LIBCORE
export __BYTE_ORDER__
export PGCPATH
export CONFIG
export CC

View File

@ -1298,6 +1298,13 @@ int main(int argc, char *argv[]){
#endif
#endif
#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
#endif
#if defined(__BIG_ENDIAN__) && __BIG_ENDIAN__ > 0
printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
#endif
#ifdef MAKE_NB_JOBS
#if MAKE_NB_JOBS > 0
printf("MAKE += -j %d\n", MAKE_NB_JOBS);