From patchwork Thu May 5 12:14:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1626923 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ZjZPO2X4; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KvCLN4jT8z9sBF for ; Thu, 5 May 2022 22:14:36 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 50CC83856DFF for ; Thu, 5 May 2022 12:14:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50CC83856DFF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651752874; bh=nFvru144zgxQCOkMHC5KaS2/6bIVaT05M+NVsXF/PXM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZjZPO2X4Eqmeo1fatUZC7gCbf3AH/Fg5KLiXzXVIMxeHOJl+48Z/R2OB20DPPtSTi 9XAsUyMPXhL3hnfawPYUZFjswLtfWPXsE8wxSopmoqdq3TI/HN3OzgkJQhsvhQuw+y +9PLewGGGmmW/+wK+myZ3Tk0bR6dacsbmOsgqARY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.133.74]) by sourceware.org (Postfix) with ESMTPS id D13F53856DF1 for ; Thu, 5 May 2022 12:14:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D13F53856DF1 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-478-s9aVkKM7OeywbjOjby8Ieg-1; Thu, 05 May 2022 08:14:16 -0400 X-MC-Unique: s9aVkKM7OeywbjOjby8Ieg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7CB97185A7BA for ; Thu, 5 May 2022 12:14:16 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D3EAA111DCF2 for ; Thu, 5 May 2022 12:14:15 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v3 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 14:14:14 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.7 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_NONE, 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-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" And keep the previous definition if it exists. This allows disabling IA64_USE_NEW_STUB while keeping USE_DL_SYSINFO defined. --- v3: Fix “statup” 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(-) base-commit: c1b68685d438373efe64e5f076f4215723004dfb diff --git a/sysdeps/unix/sysv/linux/ia64/brk.c b/sysdeps/unix/sysv/linux/ia64/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 . */ -#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/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"