From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 450653858CDA for ; Wed, 11 Jan 2023 09:17:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 450653858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1AF3275DD9; Wed, 11 Jan 2023 09:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673428625; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a9AepVS4EDrar6qjZW2qTT2V8uS5u57DUaLshtNp218=; b=VzGDT3LPoLa4DAdNdNNXR4MsA1le5bw4sVokAOPZ8i3j6YKc8bLyelqEl56UMgwW79gK0V mMSpAuukTDzP4liQnaU3SEqvfCE7R57q5QshHPuuqwUF2ueEpmxnPBUv+qDfG07l3Bzp2o EoyrniFvsVUKNCSu3h0ixLmi0f9WEmY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673428625; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a9AepVS4EDrar6qjZW2qTT2V8uS5u57DUaLshtNp218=; b=N4m0rVnJkHrN090+fTLDvP3K79Yl3th/VD1eGwCWLj3cE6wFWntkcCtT3WeWmR3VO5/1T8 nXx9+Ocq+nP9q6BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 01A311358A; Wed, 11 Jan 2023 09:17:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ZEjPOpB+vmPSXgAAMHmgww (envelope-from ); Wed, 11 Jan 2023 09:17:04 +0000 Message-ID: <55245ed9-0ac8-9d53-0c0d-56972d982666@suse.de> Date: Wed, 11 Jan 2023 10:17:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [pushed] [gdb/testsuite] Fix gdb.threads/dlopen-libpthread.exp for upstream glibc Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20221230155407.5917-1-tdevries@suse.de> <7bb6a09d-b915-c855-804d-4c3b13e38b37@simark.ca> <174dba84-bac5-af4c-cd2b-85257f57b025@suse.de> <01243e5b-137f-9ac0-8235-8f51df07902e@simark.ca> From: Tom de Vries In-Reply-To: <01243e5b-137f-9ac0-8235-8f51df07902e@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/10/23 19:05, Simon Marchi wrote: >> Attached patch fixes things. >> >> WDYT? >> >> Thanks, >> - Tom > > > Here: > >> # We link the exec without -lpthread, but libpthread.so may already be loaded at main >> # due to LD_PRELOAD. >> set libpthread_maybe_preloaded 0 >> set binfile [standard_output_file $executable] >> if { [has_dependency $binfile libpthread\\.so] == 1 } { >> set libpthread_maybe_preloaded 1 >> } > > Ok, so this works because ldd is influenced by LD_PRELOAD, I didn't > know. > Yes, while lddtree is not, which had me confused for a while. >> >> # We link the shlib with -lpthread, but since glibc 2.34 libpthread has been >> # merged with libc, so libpthread.so may not be a dependency. >> set libpthread_missing 0 >> if { [has_dependency $binfile libpthread\\.so] == 0 } { >> set libpthread_missing 1 >> } > > The two has_dependency calls use $binfile. Should one of them use > $binfile_lib? The second one I think. Yes, thanks for catching this. I'll commit after another build & test cycle. Thanks, - Tom