aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config/cf/Imake.cf
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-02-08 20:40:32 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-08 21:48:27 +0100
commitf76d4b54118627adb13dd896537c01033d989158 (patch)
tree6e41313412b9066f7201e2e4262d7db61d64fdd3 /nx-X11/config/cf/Imake.cf
parentaecdb52661898d0ba400a61550fa6ce9c0a4d829 (diff)
downloadnx-libs-f76d4b54118627adb13dd896537c01033d989158.tar.gz
nx-libs-f76d4b54118627adb13dd896537c01033d989158.tar.bz2
nx-libs-f76d4b54118627adb13dd896537c01033d989158.zip
nx-X11/config/cf/{Imake.{cf,tmpl},{linux,xorg}.cf}: support ppc64le alongside ppc64(be).
On PPC64*, X_BYTE_ORDER was hardcoded to X_BIG_ENDIAN. Since the CPUs support both modes and we actually intend to execute nxagent on ppc64le as well, detect the actual endianess and add support for Ppc64LeArchitecture.
Diffstat (limited to 'nx-X11/config/cf/Imake.cf')
-rw-r--r--nx-X11/config/cf/Imake.cf19
1 files changed, 17 insertions, 2 deletions
diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf
index 676c7ebc5..9d683b858 100644
--- a/nx-X11/config/cf/Imake.cf
+++ b/nx-X11/config/cf/Imake.cf
@@ -858,10 +858,25 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686
# undef __powerpc__
# endif
# ifdef __powerpc64__
-# ifndef Ppc64Architecture
-# define Ppc64Architecture
+/* Can be both BE or LE. Trust that __BYTE_ORDER__ is set. */
+# undef tmp_set_big_endian
+# define tmp_set_big_endian 1
+# if defined (__BYTE_ORDER__) && defined (__ORDER_LITTLE_ENDIAN__) && defined (__ORDER_BIG_ENDIAN__)
+# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+# define tmp_set_big_endian 0
+# endif
+# endif
+# if tmp_set_big_endian
+# ifndef Ppc64Architecture
+# define Ppc64Architecture
+# endif
+# else
+# ifndef Ppc64LeArchitecture
+# define Ppc64LeArchitecture
+# endif
# endif
# undef __powerpc64__
+# undef tmp_set_big_endian
# endif
# ifdef sparc
# define SparcArchitecture