From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.129.74]) by sourceware.org (Postfix) with ESMTPS id 1EE823858D3C for ; Thu, 5 May 2022 15:07:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1EE823858D3C Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-133-MMCxmk_rONaCqpH5YvlNzA-1; Thu, 05 May 2022 11:07:00 -0400 X-MC-Unique: MMCxmk_rONaCqpH5YvlNzA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7F87E1014A60 for ; Thu, 5 May 2022 15:07:00 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B71DE40D1B9E for ; Thu, 5 May 2022 15:06:59 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH v4 1/3] ia64: Always define IA64_USE_NEW_STUB as a flag macro X-From-Line: e1affd5497233f02d0401d7bb2227bd27ed229cb Mon Sep 17 00:00:00 2001 Message-Id: Date: Thu, 05 May 2022 17:06:57 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 15:07:04 -0000 And keep the previous definition if it exists. This allows disabling IA64_USE_NEW_STUB while keeping USE_DL_SYSINFO defined. --- v4: Unchanged. v3: Fix =E2=80=9Cstatup=E2=80=9D typo. Do not use libpthread and librt in = conditional. sysdeps/unix/sysv/linux/ia64/brk.c | 5 ++--- sysdeps/unix/sysv/linux/ia64/sysdep.h | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/ia64/brk.c b/sysdeps/unix/sysv/linux/i= a64/brk.c index 65142aeae9..d2135b74fc 100644 --- a/sysdeps/unix/sysv/linux/ia64/brk.c +++ b/sysdeps/unix/sysv/linux/ia64/brk.c @@ -16,7 +16,6 @@ License along with the GNU C Library; if not, see . */ =20 -#include -/* brk is used by statup before TCB is properly set. */ -#undef USE_DL_SYSINFO +/* brk is used by startup before TCB is properly set up. */ +#define IA64_USE_NEW_STUB 0 #include diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linu= x/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)=09__NR_##syscall_name =20 -#if defined USE_DL_SYSINFO \ -=09&& (IS_IN (libc) \ -=09 || 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 =20 #ifdef __ASSEMBLER__ @@ -101,7 +104,7 @@ =09mov r15=3Dnum;=09=09=09=09\ =09break __IA64_BREAK_SYSCALL =20 -#ifdef IA64_USE_NEW_STUB +#if IA64_USE_NEW_STUB # ifdef SHARED # define DO_CALL(num)=09=09=09=09\ =09.prologue;=09=09=09=09\ @@ -185,7 +188,7 @@ (non-negative) errno on error or the return value on success. */ =20 -#ifdef IA64_USE_NEW_STUB +#if IA64_USE_NEW_STUB =20 # define INTERNAL_SYSCALL_NCS(name, nr, args...)=09=09=09 \ ({=09=09=09=09=09=09=09=09=09 \ @@ -277,7 +280,7 @@ #define ASM_OUTARGS_5=09ASM_OUTARGS_4, "=3Dr" (_out4) #define ASM_OUTARGS_6=09ASM_OUTARGS_5, "=3Dr" (_out5) =20 -#ifdef IA64_USE_NEW_STUB +#if IA64_USE_NEW_STUB #define ASM_ARGS_0 #define ASM_ARGS_1=09ASM_ARGS_0, "4" (_out0) #define ASM_ARGS_2=09ASM_ARGS_1, "5" (_out1) @@ -313,7 +316,7 @@ /* Branch registers. */=09=09=09=09=09=09\ "b6" =20 -#ifdef IA64_USE_NEW_STUB +#if IA64_USE_NEW_STUB # define ASM_CLOBBERS_6=09ASM_CLOBBERS_6_COMMON #else # define ASM_CLOBBERS_6=09ASM_CLOBBERS_6_COMMON , "b7" base-commit: c1b68685d438373efe64e5f076f4215723004dfb --=20 2.35.1