[PATCH 3/8] use also __x86_64 when __x86_64__ is used

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

 



Since both __x86_64__ and __x86_64 are valid use both of them to
detect the x86-64 arch and define them both when built on x86-64.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 lib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib.c b/lib.c
index 37766d30f..31949da85 100644
--- a/lib.c
+++ b/lib.c
@@ -285,7 +285,7 @@ enum {
 
 #ifdef __LP64__
 #define ARCH_M64_DEFAULT ARCH_LP64
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__86_64)
 #define ARCH_M64_DEFAULT ARCH_X32
 #else
 #define ARCH_M64_DEFAULT ARCH_LP32
@@ -477,8 +477,9 @@ static void handle_arch_m64_finalize(void)
 		pointer_alignment = 8;
 		/* fall through */
 	case_x86_64:
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(__86_64)
 		add_pre_buffer("#weak_define __x86_64__ 1\n");
+		add_pre_buffer("#weak_define __x86_64   1\n");
 #endif
 		break;
 	}
-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux