File: tup-add-support-for-loongarch.patch

package info (click to toggle)
tup 0.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,068 kB
  • sloc: ansic: 256,651; sh: 19,101; perl: 184; python: 67; lisp: 63; makefile: 56
file content (27 lines) | stat: -rw-r--r-- 2,287 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Add support for LoongArch. 
Last-Update: 2024-04-09

--- tup-0.7.11.orig/src/tup/platform.c
+++ tup-0.7.11/src/tup/platform.c
@@ -62,7 +62,9 @@ const char *tup_arch = "arm64";
 const char *tup_arch = "riscv64";
 #elif (__riscv || __riscv__) && __riscv_xlen == 32
 const char *tup_arch = "riscv32";
-#elif __loongarch64
+#elif __loongarch__ && __loongarch_grlen == 32
+const char *tup_arch = "loongarch32";
+#elif __loongarch__ && __loongarch_grlen == 64
 const char *tup_arch = "loongarch64";
 #elif __s390x__
 const char *tup_arch = "s390x";
--- tup-0.7.11.orig/tup.1
+++ tup-0.7.11/tup.1
@@ -857,7 +857,7 @@ In this case, the @-variable "FOO" is ex
 TUP_PLATFORM is a special @-variable. If CONFIG_TUP_PLATFORM is not set in the tup.config file, it has a default value according to the platform that tup itself was compiled in. Currently the default value is one of "linux", "solaris", "macosx", "win32", "freebsd" or "netbsd".
 .TP
 .B @(TUP_ARCH)
-TUP_ARCH is another special @-variable. If CONFIG_TUP_ARCH is not set in the tup.config file, it has a default value according to the processor architecture that tup itself was compiled in. Currently the default value is one of "i386", "x86_64", "powerpc", "powerpc64", "ia64", "alpha", "sparc", "riscv32", "riscv64", "arm64", "arm" or "s390x".
+TUP_ARCH is another special @-variable. If CONFIG_TUP_ARCH is not set in the tup.config file, it has a default value according to the processor architecture that tup itself was compiled in. Currently the default value is one of "i386", "x86_64", "powerpc", "powerpc64", "ia64", "alpha", "sparc",  "loongarch32", "loongarch64", "riscv32", "riscv64", "arm64", "arm" or "s390x".
 
 .SH "VARIANTS"
 Tup supports variants, which allow you to build your project multiple times with different configurations. Perhaps the most common case is to build a release and a debug configuration with different compiler flags, though any number of variants can be used to support whatever configurations you like. Each variant is built in its own directory distinct from each other and from the source tree. When building with variants, the in-tree build is disabled. To create a variant, make a new directory at the top of the tup hierarchy and create a "tup.config" file there. For example: