Package: xutils-dev
Version: 7.7+6.1
Severity: wishlist
Tags: patch
User:debian-de...@lists.debian.org
Usertags: loongarch64

Dear maintainers,

   When I compiled kdrill for loongarch architecture, the error message is 
happened for lacking of loongarch machine defined in xutils-dev.

We have added loongarch architecture support for xutils-dev, the patch

can be found in the attachment.

If you have any questions, you can contact me at any time.

diff --git a/xorg-cf-files/Imake.cf b/xorg-cf-files/Imake.cf
index e2e4f1b..164e47f 100644
--- a/xorg-cf-files/Imake.cf
+++ b/xorg-cf-files/Imake.cf
@@ -1037,6 +1037,18 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686
 #   define AArch64Architecture
 #   undef __aarch64__
 # 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
 # if defined(__riscv) && (__riscv_xlen == 64)
 #   define RISCV64Architecture
 #   /* undef __riscv */
diff --git a/xorg-cf-files/linux.cf b/xorg-cf-files/linux.cf
index fb5924d..6209639 100644
--- a/xorg-cf-files/linux.cf
+++ b/xorg-cf-files/linux.cf
@@ -1117,6 +1117,25 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class
 # define ServerExtraDefines    -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
 #endif /* AArch64Architecture */
 
+#ifdef LoongArch64Architecture
+# ifndef OptimizedCDebugFlags
+#  define OptimizedCDebugFlags -O2 GccAliasingArgs
+# endif
+# define LinuxMachineDefines	-D__loongarch__ -D__loongarch_grlen=64 -D__loongarch_lp64
+# define ServerOSDefines	XFree86ServerOSDefines -DDDXTIME
+# 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 -DDDXTIME
+# define ServerExtraDefines	-DGCCUSESGAS XFree86ServerDefines
+#endif /* LoongArch32Architecture */
+
+
 #ifdef RISCV64Architecture
 # ifndef OptimizedCDebugFlags
 #  define OptimizedCDebugFlags DefaultGcc2RISCV64Opt DefaultGcc2OptimizeOpt GccAliasingArgs

Reply via email to