[PATCH 6/6] AArch64: Remove LP64 and ILP32 ifdefs
Khem Raj
raj.khem@gmail.com
Thu Feb 20 20:12:59 GMT 2025
On Thu, Feb 20, 2025 at 12:10 PM Wilco Dijkstra <Wilco.Dijkstra@arm.com>
wrote:
>
> Remove LP64 and ILP32 ifdefs.
>
> OK for commit?
>
How will affect the multilib builds ? I think we use this in yocto to build
multilib rootfs
>
> ---
>
> diff --git a/sysdeps/aarch64/bits/wordsize.h
> b/sysdeps/aarch64/bits/wordsize.h
> index
> f56260c2def6110e69cf44eeca16a0a1711f25c4..33d0e20566b894f331136a4df6c8d756a926dd0e
> 100644
> --- a/sysdeps/aarch64/bits/wordsize.h
> +++ b/sysdeps/aarch64/bits/wordsize.h
> @@ -17,12 +17,5 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> -#ifdef __LP64__
> -# define __WORDSIZE 64
> -#else
> -# define __WORDSIZE 32
> -# define __WORDSIZE32_SIZE_ULONG 1
> -# define __WORDSIZE32_PTRDIFF_LONG 1
> -#endif
> -
> +#define __WORDSIZE 64
> #define __WORDSIZE_TIME64_COMPAT32 0
> diff --git a/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
> b/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
> index
> 7f11e82ff5720db9089d6fee1f95490243aec846..c2825603353ee2013726ac0ffd8678523453cafe
> 100644
> --- a/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
> +++ b/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
> @@ -21,23 +21,13 @@
>
> #include <bits/endian.h>
>
> -#ifdef __ILP32__
> -# define __SIZEOF_PTHREAD_ATTR_T 32
> -# define __SIZEOF_PTHREAD_MUTEX_T 32
> -# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
> -# define __SIZEOF_PTHREAD_CONDATTR_T 4
> -# define __SIZEOF_PTHREAD_RWLOCK_T 48
> -# define __SIZEOF_PTHREAD_BARRIER_T 20
> -# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
> -#else
> -# define __SIZEOF_PTHREAD_ATTR_T 64
> -# define __SIZEOF_PTHREAD_MUTEX_T 48
> -# define __SIZEOF_PTHREAD_MUTEXATTR_T 8
> -# define __SIZEOF_PTHREAD_CONDATTR_T 8
> -# define __SIZEOF_PTHREAD_RWLOCK_T 56
> -# define __SIZEOF_PTHREAD_BARRIER_T 32
> -# define __SIZEOF_PTHREAD_BARRIERATTR_T 8
> -#endif
> +#define __SIZEOF_PTHREAD_ATTR_T 64
> +#define __SIZEOF_PTHREAD_MUTEX_T 48
> +#define __SIZEOF_PTHREAD_MUTEXATTR_T 8
> +#define __SIZEOF_PTHREAD_CONDATTR_T 8
> +#define __SIZEOF_PTHREAD_RWLOCK_T 56
> +#define __SIZEOF_PTHREAD_BARRIER_T 32
> +#define __SIZEOF_PTHREAD_BARRIERATTR_T 8
> #define __SIZEOF_PTHREAD_COND_T 48
> #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
>
> diff --git a/sysdeps/aarch64/nptl/bits/semaphore.h
> b/sysdeps/aarch64/nptl/bits/semaphore.h
> index
> 45aabcb64bdeffa3e169460276730d545f37dea4..ade6de4fbff00d9286789b98c6ff0b81001b36cf
> 100644
> --- a/sysdeps/aarch64/nptl/bits/semaphore.h
> +++ b/sysdeps/aarch64/nptl/bits/semaphore.h
> @@ -20,13 +20,7 @@
> # error "Never use <bits/semaphore.h> directly; include <semaphore.h>
> instead."
> #endif
>
> -
> -#ifdef __ILP32__
> -# define __SIZEOF_SEM_T 16
> -#else
> -# define __SIZEOF_SEM_T 32
> -#endif
> -
> +#define __SIZEOF_SEM_T 32
>
> /* Value returned if `sem_open' failed. */
> #define SEM_FAILED ((sem_t *) 0)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h
> b/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h
> index
> d6dd81127a1eb77542d03709bf8f3af13e040186..65791269f1d277c63ab32e7d0299f4d3f12d9015
> 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h
> +++ b/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h
> @@ -25,17 +25,11 @@
> #define __O_NOFOLLOW 0100000
> #define __O_DIRECT 0200000
>
> -#ifdef __ILP32__
> -# define __O_LARGEFILE 0400000
> -#else
> -# define __O_LARGEFILE 0
> -#endif
> +#define __O_LARGEFILE 0
>
> -#ifdef __LP64__
> -# define F_GETLK64 5
> -# define F_SETLK64 6
> -# define F_SETLKW64 7
> -#endif
> +#define F_GETLK64 5
> +#define F_SETLK64 6
> +#define F_SETLKW64 7
>
> struct flock
> {
> diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-cache.h
> b/sysdeps/unix/sysv/linux/aarch64/dl-cache.h
> index
> 975d15e8d9b49d05b5d72874c96eeae8fb2d0999..35e1b915244c41f8209b133ec9b15ade6b8cf622
> 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/dl-cache.h
> +++ b/sysdeps/unix/sysv/linux/aarch64/dl-cache.h
> @@ -18,11 +18,7 @@
>
> #include <ldconfig.h>
>
> -#ifdef __LP64__
> -# define _DL_CACHE_DEFAULT_ID (FLAG_AARCH64_LIB64 | FLAG_ELF_LIBC6)
> -#else
> -# define _DL_CACHE_DEFAULT_ID (FLAG_AARCH64_LIB32 | FLAG_ELF_LIBC6)
> -#endif
> +#define _DL_CACHE_DEFAULT_ID (FLAG_AARCH64_LIB64 | FLAG_ELF_LIBC6)
>
> #define _dl_cache_check_flags(flags) \
> ((flags) == _DL_CACHE_DEFAULT_ID)
> @@ -38,18 +34,11 @@
> len -= 2; \
> path[len] = '\0'; \
> } \
> - if (len >= 9 && ! memcmp (path + len - 9, "/libilp32", 9))\
> - { \
> - len -= 5; \
> - path[len] = '\0'; \
> - } \
> add_dir (path); \
> if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4)) \
> { \
> memcpy (path + len, "64", 3); \
> add_dir (path); \
> - memcpy (path + len, "ilp32", 6); \
> - add_dir (path); \
> } \
> } while (0)
>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
> b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
> index
> b81380593125920b4257367da204e6a043ab7a06..f0e8d64eefac3581108d93a96fc60941aec00dc1
> 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
> @@ -152,13 +152,8 @@
>
> #else /* not __ASSEMBLER__ */
>
> -# ifdef __LP64__
> -# define VDSO_NAME "LINUX_2.6.39"
> -# define VDSO_HASH 123718537
> -# else
> -# define VDSO_NAME "LINUX_4.9"
> -# define VDSO_HASH 61765625
> -# endif
> +# define VDSO_NAME "LINUX_2.6.39"
> +# define VDSO_HASH 123718537
>
> /* List of system calls which are supported as vsyscalls. */
> # define HAVE_CLOCK_GETRES64_VSYSCALL "__kernel_clock_getres"
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250220/eb55ab4f/attachment-0001.htm>
More information about the Libc-alpha
mailing list