Commit f76d4b54 authored by Mihai Moldovan's avatar Mihai Moldovan

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.
parent aecdb526
...@@ -858,10 +858,25 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686 ...@@ -858,10 +858,25 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686
# undef __powerpc__ # undef __powerpc__
# endif # endif
# ifdef __powerpc64__ # ifdef __powerpc64__
/* 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 # ifndef Ppc64Architecture
# define Ppc64Architecture # define Ppc64Architecture
# endif # endif
# else
# ifndef Ppc64LeArchitecture
# define Ppc64LeArchitecture
# endif
# endif
# undef __powerpc64__ # undef __powerpc64__
# undef tmp_set_big_endian
# endif # endif
# ifdef sparc # ifdef sparc
# define SparcArchitecture # define SparcArchitecture
......
...@@ -507,6 +507,8 @@ XCOMM the platform-specific parameters - edit site.def to change ...@@ -507,6 +507,8 @@ XCOMM the platform-specific parameters - edit site.def to change
#define ByteOrder X_BIG_ENDIAN #define ByteOrder X_BIG_ENDIAN
#elif defined(PpcArchitecture) || defined(Ppc64Architecture) #elif defined(PpcArchitecture) || defined(Ppc64Architecture)
#define ByteOrder X_BIG_ENDIAN #define ByteOrder X_BIG_ENDIAN
#elif defined(Ppc64LeArchitecture)
#define ByteOrder X_LITTLE_ENDIAN
#elif defined(HPArchitecture) #elif defined(HPArchitecture)
#define ByteOrder X_BIG_ENDIAN #define ByteOrder X_BIG_ENDIAN
#elif defined(SuperHArchitecture) #elif defined(SuperHArchitecture)
......
...@@ -457,7 +457,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) ...@@ -457,7 +457,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define MkdirHierCmd mkdir -p #define MkdirHierCmd mkdir -p
#ifndef HaveLib64 #ifndef HaveLib64
# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture) # if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture) || defined (Ppc64LeArchitecture)
# define HaveLib64 YES # define HaveLib64 YES
# else # else
# define HaveLib64 NO # define HaveLib64 NO
...@@ -480,7 +480,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) ...@@ -480,7 +480,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define CplusplusCmd c++ -m32 # define CplusplusCmd c++ -m32
# endif # endif
# endif # endif
# if defined (Ppc64Architecture) # if defined (Ppc64Architecture) || defined (Ppc64LeArchitecture)
# ifndef CcCmd # ifndef CcCmd
# define CcCmd gcc -m64 # define CcCmd gcc -m64
# endif # endif
...@@ -764,7 +764,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) ...@@ -764,7 +764,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# endif # endif
#endif #endif
#ifdef Ppc64Architecture #if defined (Ppc64Architecture) || defined (Ppc64LeArchitecture)
# define DefaultCCOptions -std=c99 GccWarningOptions -mminimal-toc # define DefaultCCOptions -std=c99 GccWarningOptions -mminimal-toc
# ifndef OptimizedCDebugFlags # ifndef OptimizedCDebugFlags
# define OptimizedCDebugFlags DefaultGcc2Ppc64Opt # define OptimizedCDebugFlags DefaultGcc2Ppc64Opt
......
...@@ -243,6 +243,7 @@ NX_VERSION_CURRENT_STRING = nxVersionString ...@@ -243,6 +243,7 @@ NX_VERSION_CURRENT_STRING = nxVersionString
defined(AMD64Architecture) || defined(SparcArchitecture) || \ defined(AMD64Architecture) || defined(SparcArchitecture) || \
defined(Sparc64Architecture) || defined(MipsArchitecture) || \ defined(Sparc64Architecture) || defined(MipsArchitecture) || \
defined(AlphaArchitecture) || defined(PpcArchitecture) || \ defined(AlphaArchitecture) || defined(PpcArchitecture) || \
defined(Ppc64Architecture) || defined(Ppc64LeArchitecture) || \
defined(Mc68020Architecture) || defined(Arm32Architecture) || \ defined(Mc68020Architecture) || defined(Arm32Architecture) || \
defined(HPArchitecture) || defined(SuperHArchitecture) defined(HPArchitecture) || defined(SuperHArchitecture)
# ifndef XorgServer # ifndef XorgServer
...@@ -765,7 +766,7 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese ...@@ -765,7 +766,7 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
# endif # endif
#endif #endif
#if HasGcc2 && defined(Ppc64Architecture) #if HasGcc2 && (defined(Ppc64Architecture) || defined(Ppc64LeArchitecture))
# ifndef DefaultGcc2Ppc64Opt # ifndef DefaultGcc2Ppc64Opt
# define DefaultGcc2Ppc64Opt -O2 GccAliasingArgs # define DefaultGcc2Ppc64Opt -O2 GccAliasingArgs
# endif # endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment