From f8ec7ff592140327a7c822718b0edf027d0c6b3d Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <uwe.korn@quantco.com>
Date: Sun, 24 Oct 2021 20:11:23 +0200
Subject: [PATCH] Force endian flag in cross-compilation mode

---
 R-package/configure | 30 +-----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/R-package/configure b/R-package/configure
index dd5f200fb..60f7b64cd 100755
--- a/R-package/configure
+++ b/R-package/configure
@@ -2669,35 +2669,7 @@ fi
 
 
 ### Endian detection
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking endian" >&5
-$as_echo_n "checking endian... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdint.h>
-int
-main ()
-{
-const uint16_t endianness = 256; return !!(*(const uint8_t *)&endianness);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ENDIAN_FLAG="-DDMLC_CMAKE_LITTLE_ENDIAN=1"
-else
-  ENDIAN_FLAG="-DDMLC_CMAKE_LITTLE_ENDIAN=0"
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+ENDIAN_FLAG="-DDMLC_CMAKE_LITTLE_ENDIAN=1"
 
 
 OPENMP_CXXFLAGS=""
-- 
2.33.1

