Browse Source

Get endianness into Makefile variable

tags/v0.3.9
Martin Kroeker GitHub 5 years ago
parent
commit
76b2cec6ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions
  1. +1
    -0
      Makefile.system
  2. +7
    -0
      getarch.c

+ 1
- 0
Makefile.system View File

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


+ 7
- 0
getarch.c View File

@@ -1298,6 +1298,13 @@ int main(int argc, char *argv[]){
#endif #endif
#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 #ifdef MAKE_NB_JOBS
#if MAKE_NB_JOBS > 0 #if MAKE_NB_JOBS > 0
printf("MAKE += -j %d\n", MAKE_NB_JOBS); printf("MAKE += -j %d\n", MAKE_NB_JOBS);


Loading…
Cancel
Save