]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
cheri: __LP64__ is not defined for purecap ABI
authorCarlos Eduardo Seo <carlos.seo@arm.com>
Wed, 26 Jan 2022 19:19:33 +0000 (16:19 -0300)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 27 Oct 2022 13:46:49 +0000 (14:46 +0100)
There is no ideal ABI macro, so we assume __CHERI_PURE_CAPABILITY__
implies 64 bit long, 64 bit address and 128 bit pointer.

bits/typesizes.h
sysdeps/aarch64/bits/wordsize.h
sysdeps/unix/sysv/linux/generic/bits/typesizes.h

index fffb6bfb6404baaf89e39326e9217fc4150c1ad3..186853968d590f2b2451ab2bc832a6f295ae2104 100644 (file)
@@ -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.  */
index 4635431f0ec60d85e11e560201577e6b533735a5..8fbf6503d8296787af0f85fa9a11776c7dd6f5c4 100644 (file)
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#ifdef __LP64__
+#if defined __LP64__ || defined __CHERI_PURE_CAPABILITY__
 # define __WORDSIZE                    64
 #else
 # define __WORDSIZE                    32
index 6b13ff315c0aaee35648eed03d142da01c2329d1..c70dcbccd834aacb1ee500d1784f6a92a4d4a46f 100644 (file)
@@ -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.  */