From 50cc404ce140162a3dfeca71437e60b20529c023 Mon Sep 17 00:00:00 2001 From: rvalue Date: Wed, 29 Mar 2023 00:25:34 +0800 Subject: [PATCH] Fix build for x86_64 and riscv64 Add definition of 4 bytes `Long` for x86_64 and riscv64. x86_64 part was from Ken Moffat Co-authored-by: Ken Moffat --- ld/x86_aout.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ld/x86_aout.h b/ld/x86_aout.h index 542a70d..b809004 100644 --- a/ld/x86_aout.h +++ b/ld/x86_aout.h @@ -12,6 +12,9 @@ #if defined(i386) || defined(__BCC__) || defined(MSDOS) typedef long Long; #define __OUT_OK 1 +#elif defined(__x86_64__) || (defined(__riscv) && __riscv_xlen == 64) +typedef int Long; +#define __OUT_OK 1 #else /* Beware: this will probably allow some BE hosts to generate broken files. */ #ifdef INT32_MAX