[X2Go-Commits] [nx-libs] 01/01: nx-X11/config/cf/{Imake.{cf, tmpl}, {linux, xorg}.cf}: support ppc64le alongside ppc64(be).

git-admin at x2go.org git-admin at x2go.org
Thu Feb 8 20:43:02 CET 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x-rpm-debug
in repository nx-libs.

commit bcff8be1db3489e2d394f1aa84d904baceb7ff6f
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Feb 8 20:40:32 2018 +0100

    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.
---
 nx-X11/config/cf/Imake.cf   | 19 +++++++++++++++++--
 nx-X11/config/cf/Imake.tmpl |  2 ++
 nx-X11/config/cf/linux.cf   |  6 +++---
 nx-X11/config/cf/xorg.cf    |  3 ++-
 4 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf
index 676c7eb..9d683b8 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
diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl
index 285b534..86222d1 100644
--- a/nx-X11/config/cf/Imake.tmpl
+++ b/nx-X11/config/cf/Imake.tmpl
@@ -507,6 +507,8 @@ XCOMM the platform-specific parameters - edit site.def to change
 #define ByteOrder		X_BIG_ENDIAN
 #elif defined(PpcArchitecture) || defined(Ppc64Architecture)
 #define ByteOrder		X_BIG_ENDIAN
+#elif defined(Ppc64LeArchitecture)
+#define ByteOrder		X_LITTLE_ENDIAN
 #elif defined(HPArchitecture)
 #define ByteOrder		X_BIG_ENDIAN
 #elif defined(SuperHArchitecture)
diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf
index 87e9723..df7837c 100644
--- a/nx-X11/config/cf/linux.cf
+++ b/nx-X11/config/cf/linux.cf
@@ -457,7 +457,7 @@ XCOMM binutils:	(LinuxBinUtilsMajorVersion)
 #define MkdirHierCmd		mkdir -p
 
 #ifndef HaveLib64
-# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture)
+# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture) || defined (Ppc64LeArchitecture)
 #  define HaveLib64	YES
 # else
 #  define HaveLib64	NO
@@ -480,7 +480,7 @@ XCOMM binutils:	(LinuxBinUtilsMajorVersion)
 #    define CplusplusCmd	c++ -m32
 #   endif
 #  endif
-#  if defined (Ppc64Architecture)
+#  if defined (Ppc64Architecture) || defined (Ppc64LeArchitecture)
 #   ifndef CcCmd
 #    define CcCmd		gcc -m64
 #   endif
@@ -764,7 +764,7 @@ XCOMM binutils:	(LinuxBinUtilsMajorVersion)
 # endif
 #endif
 
-#ifdef Ppc64Architecture
+#if defined (Ppc64Architecture) || defined (Ppc64LeArchitecture)
 # define DefaultCCOptions	-std=c99 GccWarningOptions -mminimal-toc
 # ifndef OptimizedCDebugFlags
 #  define OptimizedCDebugFlags	DefaultGcc2Ppc64Opt
diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf
index b68d11c..dc8a773 100644
--- a/nx-X11/config/cf/xorg.cf
+++ b/nx-X11/config/cf/xorg.cf
@@ -243,6 +243,7 @@ NX_VERSION_CURRENT_STRING  = nxVersionString
     defined(AMD64Architecture) || defined(SparcArchitecture) || \
     defined(Sparc64Architecture) || defined(MipsArchitecture) || \
     defined(AlphaArchitecture) || defined(PpcArchitecture) || \
+    defined(Ppc64Architecture) || defined(Ppc64LeArchitecture) || \
     defined(Mc68020Architecture) || defined(Arm32Architecture) || \
     defined(HPArchitecture) || defined(SuperHArchitecture)
 # ifndef XorgServer
@@ -765,7 +766,7 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
 # endif
 #endif
 
-#if HasGcc2 && defined(Ppc64Architecture)
+#if HasGcc2 && (defined(Ppc64Architecture) || defined(Ppc64LeArchitecture))
 # ifndef DefaultGcc2Ppc64Opt
 #  define DefaultGcc2Ppc64Opt -O2 GccAliasingArgs
 # endif

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list