From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 11267385829B for ; Thu, 25 Apr 2024 18:33:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11267385829B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 11267385829B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714070008; cv=none; b=t6SOHSQqsUqFMjYDsu4XaUvU8mGqu+YPw1nMaI6nIcTPdoXO6UNy+uevTvdNld5FEhJry3A4GL7biGgJI9Rmo7tnFibvlZ16YnH/AGObQDrIT/P6MMJn1xpH8mQ2umWV5EbLOrl/1rDKvjx7v9dAOuMwZTvEnYzfFYprEsYep9Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714070008; c=relaxed/simple; bh=Iwo9IZhBTxoktsKEENgb4NINp7Zzq0Q4a0AyaQAxG9o=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: Mime-Version:Subject:Date:Message-Id:To; b=mgovrx6XuCzggKLpAotTvjJcKUb5aiCjV96lfrgHVB5z94YqHOpqa7J1zchwJZoThyC4Q837n3TCd2EiQo1LHia7xiguFzhAiDtTFKgjYmxvX56go5gLw9g77CwGTYsy+xFnTLLfGqdtFqMojEuLqZarzSw2EKWfhnFF8z8f9WQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 07EE334178; Thu, 25 Apr 2024 18:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714069997; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZYfJlt+qcAG1mtmc2iCrJPAuEyEcW8lg3AMJVIvhjLg=; b=Q2qj1kvHgMe2LqkEtkQa0ZC2F5IR42JiF+MHlJWJvbOINlMxzt2vKBA0uulRvunBxCqDdK uiB4iQcduBbtJnrgF52pZiWKF+CKMbia6Y6ZvLzUSns6giABGnaw78hZy0MOv9SF7oMBsX Gi7HDeLKt9jv2sMLWN8if2CP+iCrqPU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714069997; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZYfJlt+qcAG1mtmc2iCrJPAuEyEcW8lg3AMJVIvhjLg=; b=R5B4JL+gt/uZuDI/pYDXqPrXHXcmKGU7gF3xdyYDjjdsWy9cLAFlCkiAE3bk8Oq3VeJ+Ac yOLUXyjhEe3BdBAQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714069997; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZYfJlt+qcAG1mtmc2iCrJPAuEyEcW8lg3AMJVIvhjLg=; b=Q2qj1kvHgMe2LqkEtkQa0ZC2F5IR42JiF+MHlJWJvbOINlMxzt2vKBA0uulRvunBxCqDdK uiB4iQcduBbtJnrgF52pZiWKF+CKMbia6Y6ZvLzUSns6giABGnaw78hZy0MOv9SF7oMBsX Gi7HDeLKt9jv2sMLWN8if2CP+iCrqPU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714069997; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZYfJlt+qcAG1mtmc2iCrJPAuEyEcW8lg3AMJVIvhjLg=; b=R5B4JL+gt/uZuDI/pYDXqPrXHXcmKGU7gF3xdyYDjjdsWy9cLAFlCkiAE3bk8Oq3VeJ+Ac yOLUXyjhEe3BdBAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C042313991; Thu, 25 Apr 2024 18:33:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id SXfkLuyhKmbQQwAAD6G6ig (envelope-from ); Thu, 25 Apr 2024 18:33:16 +0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Richard Biener Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] libgcc: Don't use weakrefs for glibc 2.34 Date: Thu, 25 Apr 2024 20:33:05 +0200 Message-Id: <53BC3C0A-13DB-42E0-B5E6-358ABB1F84CB@suse.de> References: Cc: gcc-patches@gcc.gnu.org, Jonathan Wakely , Florian Weimer In-Reply-To: To: Jakub Jelinek X-Mailer: iPhone Mail (21E236) X-Spam-Level: X-Spamd-Result: default: False [-3.46 / 50.00]; BAYES_HAM(-2.16)[95.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; APPLE_IOS_MAILER_COMMON(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_COUNT_TWO(0.00)[2]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Spam-Score: -3.46 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Am 25.04.2024 um 20:24 schrieb Jakub Jelinek : >=20 > =EF=BB=BFHi! >=20 > glibc 2.34 and later doesn't have separate libpthread (libpthread.so.0 is a= > dummy shared library with just some symbol versions for compatibility, but= > all the pthread_* APIs are in libc.so.6). > So, we don't need to do the .weakref dances to check whether a program > has been linked with -lpthread or not, in dynamically linked apps those > will be always true anyway. > In -static linking, this fixes various issues people had when only linking= > some parts of libpthread.a and getting weird crashes. A hack for that was= > what e.g. some Fedora glibcs used, where libpthread.a was a library > containing just one giant *.o file which had all the normal libpthread.a > *.o files linked with -r together. >=20 > libstdc++-v3 actually does something like this already since r10-10928, > the following patch is meant to fix it even for libgfortran, libobjc and > whatever else uses gthr.h. >=20 > Bootstrapped/regtested on x86_64-linux and i686-linux (with glibc 2.35), o= k > for trunk? Ok Richard=20 > 2024-04-25 Jakub Jelinek >=20 > * gthr.h (GTHREAD_USE_WEAK): Redefine to 0 for GLIBC 2.34 or later. >=20 > --- libgcc/gthr.h.jj 2024-01-03 12:07:28.623363560 +0100 > +++ libgcc/gthr.h 2024-04-25 12:09:39.708622613 +0200 > @@ -141,6 +141,15 @@ see the files COPYING3 and COPYING.RUNTI > #define GTHREAD_USE_WEAK 0 > #endif >=20 > +#ifdef __GLIBC_PREREQ > +#if __GLIBC_PREREQ(2, 34) > +/* glibc 2.34 and later has all pthread_* APIs inside of libc, > + no need to link separately with -lpthread. */ > +#undef GTHREAD_USE_WEAK > +#define GTHREAD_USE_WEAK 0 > +#endif > +#endif > + > #ifndef GTHREAD_USE_WEAK > #define GTHREAD_USE_WEAK 1 > #endif >=20 > Jakub >=20