aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-08-27 14:51:59 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-08-27 14:51:59 +0200
commit3ef7845746c4ec1ac75825ccebc17168e0400cfa (patch)
treeaad42a3ee3a18c1f719a077c303a1bb53b4b6448
parent0965c7682077c1795dcd744493f03408fe4576f8 (diff)
parent2e0db45fd9bc19132c2bb7212166d27588da31a8 (diff)
downloadnx-libs-3ef7845746c4ec1ac75825ccebc17168e0400cfa.tar.gz
nx-libs-3ef7845746c4ec1ac75825ccebc17168e0400cfa.tar.bz2
nx-libs-3ef7845746c4ec1ac75825ccebc17168e0400cfa.zip
Merge branch 'fangyaling-3.6.x' into 3.6.x
Attributes GH PR #1062: https://github.com/ArcticaProject/nx-libs/pull/1062
-rw-r--r--nx-X11/config/cf/Imake.cf12
-rw-r--r--nx-X11/config/cf/Imake.tmpl2
-rw-r--r--nx-X11/config/cf/linux.cf18
3 files changed, 32 insertions, 0 deletions
diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf
index ce33e4208..cdf4d4a0f 100644
--- a/nx-X11/config/cf/Imake.cf
+++ b/nx-X11/config/cf/Imake.cf
@@ -893,6 +893,18 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686
# endif
# undef __sparc__
# endif
+# if defined(__loongarch__)
+# undef __loongarch__
+# if __loongarch_grlen == 64
+# undef __loongarch_grlen
+# undef __loongarch_lp64
+# define LoongArch64Architecture
+# endif
+# if __loongarch_grlen == 32
+# undef __loongarch_grlen
+# define LoongArch32Architecture
+# endif
+# endif
# ifdef ia64
# define ia64Architecture
# undef ia64
diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl
index 266be8c5a..48509aa01 100644
--- a/nx-X11/config/cf/Imake.tmpl
+++ b/nx-X11/config/cf/Imake.tmpl
@@ -517,6 +517,8 @@ XCOMM the platform-specific parameters - edit site.def to change
#define ByteOrder X_LITTLE_ENDIAN
#elif defined(SuperHebArchitecture)
#define ByteOrder X_BIG_ENDIAN
+#elif defined(LoongArch64Architecture) || defined(LoongArch32Architecture)
+#define ByteOrder X_LITTLE_ENDIAN
#endif
#endif /* ByteOrder */
X_BYTE_ORDER = ByteOrder
diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf
index 283c0a000..c71d436f6 100644
--- a/nx-X11/config/cf/linux.cf
+++ b/nx-X11/config/cf/linux.cf
@@ -857,6 +857,24 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* AMD64Architecture */
+#ifdef LoongArch64Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 GccAliasingArgs
+# endif
+# define LinuxMachineDefines -D__loongarch__ -D__loongarch_grlen=64 -D__loongarch_lp64
+# define ServerOSDefines XFree86ServerOSDefines
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+#endif /* LoongArch64Architecture */
+
+#ifdef LoongArch32Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 GccAliasingArgs
+# endif
+# define LinuxMachineDefines -D__loongarch__ -D__loongarch_grlen=32
+# define ServerOSDefines XFree86ServerOSDefines
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif /* LoongArch32Architecture */
+
#ifndef StandardDefines
# ifdef __linux__
# define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines