diff options
author | YalingFang <fangyaling@loongson.cn> | 2023-08-25 11:52:13 +0800 |
---|---|---|
committer | YalingFang <fangyaling@loongson.cn> | 2023-08-25 11:52:13 +0800 |
commit | 2e0db45fd9bc19132c2bb7212166d27588da31a8 (patch) | |
tree | aad42a3ee3a18c1f719a077c303a1bb53b4b6448 /nx-X11 | |
parent | 0965c7682077c1795dcd744493f03408fe4576f8 (diff) | |
download | nx-libs-2e0db45fd9bc19132c2bb7212166d27588da31a8.tar.gz nx-libs-2e0db45fd9bc19132c2bb7212166d27588da31a8.tar.bz2 nx-libs-2e0db45fd9bc19132c2bb7212166d27588da31a8.zip |
Add support for new arch Loongarch
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/config/cf/Imake.cf | 12 | ||||
-rw-r--r-- | nx-X11/config/cf/Imake.tmpl | 2 | ||||
-rw-r--r-- | nx-X11/config/cf/linux.cf | 18 |
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 |