Powered by Linux
[PATCH 7/8] correct sparcv9 defines — Semantic Matching Tool

[PATCH 7/8] correct sparcv9 defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Toomas Soome <tsoome@xxxxxx>

The SPARCV9 compile check needs to look for __sparcv9 on some systems,
and should also define "sparc".

Signed-off-by: Toomas Soome <tsoome@xxxxxx>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
Signed-off-by: John Levon <john.levon@xxxxxxxxxx>
---
 lib.c     | 1 +
 machine.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib.c b/lib.c
index 40e81ae2..3e9ad866 100644
--- a/lib.c
+++ b/lib.c
@@ -1380,6 +1380,7 @@ static void predefined_macros(void)
 	case MACH_SPARC32:
 		predefine("__sparc__", 1, "1");
 		predefine("__sparc", 1, "1");
+		predefine_nostd("sparc");
 		break;
 	case MACH_X86_64:
 		if (arch_m64 != ARCH_LP32) {
diff --git a/machine.h b/machine.h
index b46383ac..af5c96f1 100644
--- a/machine.h
+++ b/machine.h
@@ -62,7 +62,7 @@ enum machine {
 #define	MACH_NATIVE	MACH_RISCV64
 #elif defined(__riscv) && (__riscv_xlen == 32)
 #define	MACH_NATIVE	MACH_RISCV32
-#elif defined(__sparc_v9__)
+#elif defined(__sparc_v9__) || defined(__sparcv9)
 #define	MACH_NATIVE	MACH_SPARC64
 #elif defined(__sparc__) || defined(__sparc)
 #define	MACH_NATIVE	MACH_SPARC32
-- 
2.23.0




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux