From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 9B036384BC20; Wed, 26 Oct 2022 15:12:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B036384BC20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666797169; bh=6ZX1Dy/4l8GtV9SW6Ab/si8Ir0P8b4NArJElAA+KPE0=; h=From:To:Subject:Date:From; b=D1BcK/OoAxXCebs7sEXIrhEYtk9FWuQlwbzAUGZl3cLs51MkubmL3EVoCidtOrYKE vEFzI6T/LnEHtz8Juc/UYOX2u2ABV+umdH7JTGWFn8uSYQBobZAvxEVbjqSK+dcS7B fH6+SDQMq+9UgpZ8Nkv9xDeLpQG4zCheXjTcu7Hc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] cheri: __LP64__ is not defined for purecap ABI X-Act-Checkin: glibc X-Git-Author: Carlos Eduardo Seo X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: 581cfdbbb8aa00ee95c3e6e8d7804ca6ee9edcc5 X-Git-Newrev: 33b3cf3fd81dd4fbddf718c74bd9898d866dbd4f Message-Id: <20221026151249.9B036384BC20@sourceware.org> Date: Wed, 26 Oct 2022 15:12:49 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=33b3cf3fd81dd4fbddf718c74bd9898d866dbd4f commit 33b3cf3fd81dd4fbddf718c74bd9898d866dbd4f Author: Carlos Eduardo Seo Date: Wed Jan 26 16:19:33 2022 -0300 cheri: __LP64__ is not defined for purecap ABI There is no ideal ABI macro, so we assume __CHERI_PURE_CAPABILITY__ implies 64 bit long, 64 bit address and 128 bit pointer. Diff: --- bits/typesizes.h | 2 +- sysdeps/aarch64/bits/wordsize.h | 2 +- sysdeps/unix/sysv/linux/generic/bits/typesizes.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bits/typesizes.h b/bits/typesizes.h index fffb6bfb64..186853968d 100644 --- a/bits/typesizes.h +++ b/bits/typesizes.h @@ -62,7 +62,7 @@ #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #define __CPU_MASK_TYPE __ULONGWORD_TYPE -#ifdef __LP64__ +#if defined __LP64__ || defined __CHERI_PURE_CAPABILITY__ /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h index 4635431f0e..8fbf6503d8 100644 --- a/sysdeps/aarch64/bits/wordsize.h +++ b/sysdeps/aarch64/bits/wordsize.h @@ -17,7 +17,7 @@ License along with the GNU C Library; if not, see . */ -#ifdef __LP64__ +#if defined __LP64__ || defined __CHERI_PURE_CAPABILITY__ # define __WORDSIZE 64 #else # define __WORDSIZE 32 diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h index 6b13ff315c..c70dcbccd8 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -75,7 +75,7 @@ #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #define __CPU_MASK_TYPE __ULONGWORD_TYPE -#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32) +#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32) || defined __CHERI_PURE_CAPABILITY__ /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */