about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ia64/sysdep.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-05-09 18:15:16 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-05-17 08:08:52 +0200
commit55ee3afa0d1d09ea1b3eeba9b59281c7e3fc3e17 (patch)
treeac06cb78e10a0f77098580f8949d796828d0fa69 /sysdeps/unix/sysv/linux/ia64/sysdep.h
parentd66cca3fbb12539aa72a4c24c2f5b2bb0197b306 (diff)
downloadglibc-55ee3afa0d1d09ea1b3eeba9b59281c7e3fc3e17.tar.gz
glibc-55ee3afa0d1d09ea1b3eeba9b59281c7e3fc3e17.tar.xz
glibc-55ee3afa0d1d09ea1b3eeba9b59281c7e3fc3e17.zip
ia64: Always define IA64_USE_NEW_STUB as a flag macro
And keep the previous definition if it exists.  This allows
disabling IA64_USE_NEW_STUB while keeping USE_DL_SYSINFO defined.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
(cherry picked from commit 18bd9c3d3b1b6a9182698c85354578d1d58e9d64)
Diffstat (limited to 'sysdeps/unix/sysv/linux/ia64/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 193ecee023..14adbdf4ff 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -44,12 +44,15 @@
 #undef SYS_ify
 #define SYS_ify(syscall_name)	__NR_##syscall_name
 
-#if defined USE_DL_SYSINFO \
-	&& (IS_IN (libc) \
-	    || IS_IN (libpthread) || IS_IN (librt))
-# define IA64_USE_NEW_STUB
-#else
-# undef IA64_USE_NEW_STUB
+#ifndef IA64_USE_NEW_STUB
+# if defined USE_DL_SYSINFO && IS_IN (libc)
+#  define IA64_USE_NEW_STUB 1
+# else
+#  define IA64_USE_NEW_STUB 0
+# endif
+#endif
+#if IA64_USE_NEW_STUB && !USE_DL_SYSINFO
+# error IA64_USE_NEW_STUB needs USE_DL_SYSINFO
 #endif
 
 #ifdef __ASSEMBLER__
@@ -101,7 +104,7 @@
 	mov r15=num;				\
 	break __IA64_BREAK_SYSCALL
 
-#ifdef IA64_USE_NEW_STUB
+#if IA64_USE_NEW_STUB
 # ifdef SHARED
 #  define DO_CALL(num)				\
 	.prologue;				\
@@ -185,7 +188,7 @@
    (non-negative) errno on error or the return value on success.
  */
 
-#ifdef IA64_USE_NEW_STUB
+#if IA64_USE_NEW_STUB
 
 # define INTERNAL_SYSCALL_NCS(name, nr, args...)			      \
 ({									      \
@@ -277,7 +280,7 @@
 #define ASM_OUTARGS_5	ASM_OUTARGS_4, "=r" (_out4)
 #define ASM_OUTARGS_6	ASM_OUTARGS_5, "=r" (_out5)
 
-#ifdef IA64_USE_NEW_STUB
+#if IA64_USE_NEW_STUB
 #define ASM_ARGS_0
 #define ASM_ARGS_1	ASM_ARGS_0, "4" (_out0)
 #define ASM_ARGS_2	ASM_ARGS_1, "5" (_out1)
@@ -313,7 +316,7 @@
   /* Branch registers.  */						\
   "b6"
 
-#ifdef IA64_USE_NEW_STUB
+#if IA64_USE_NEW_STUB
 # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON
 #else
 # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON , "b7"