From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 1543638582A7 for ; Mon, 4 Jul 2022 13:09:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1543638582A7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz 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-out1.suse.de (Postfix) with ESMTPS id F34D0225A1; Mon, 4 Jul 2022 13:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1656940190; 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=snmXZsWDC6zmEaKkYkhGBWM91R/iBaRgUbSQkYSL1ps=; b=yc6y61ami3dG463uX0pvbV3isYLZeBWCVqix1TsDzquJil/gDtmTgTipd0O2M0Z30gPcIb WM7XPHITbQxwsSQxMNF43nVauVuBAAXoapmA+hbvz/1orYnCHS6o5KdZXbPkv4EzI34Gbh SEINYspyvtZ+fSLTX9lQWhxXXRxkafQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1656940190; 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=snmXZsWDC6zmEaKkYkhGBWM91R/iBaRgUbSQkYSL1ps=; b=V87CV4oKRevlTe+dg1jMsWJ/UMkp+AK9amEJh4qYeaEXt7lLaQK5JfZ2TRNzZhEYYkX790 n1aSjYKulkxvVbDg== 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 DA67A1342C; Mon, 4 Jul 2022 13:09:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id fyZ7NJ3mwmKAPQAAMHmgww (envelope-from ); Mon, 04 Jul 2022 13:09:49 +0000 Message-ID: <28312dee-4ef0-f72a-d59f-8d9d049dc937@suse.cz> Date: Mon, 4 Jul 2022 15:09:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] lto-plugin: Add path to libatomic for riscv64 Content-Language: en-US To: Richard Biener Cc: GCC Patches , Kito Cheng References: <31c1c05e-79c6-01d5-4fc1-d401f8b52384@suse.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2022 13:09:53 -0000 On 7/4/22 14:28, Richard Biener wrote: > ... but ... is libatomic properly built for the host? libgo is a > target library. You're correct. Well, so the host library should be taken, which works for stage1 lto-plugin: [ 668s] libtool: link: gcc -shared -fPIC -DPIC .libs/lto-plugin.o -pthread -static-libgcc -Wl,--version-script=../../lto-plugin/lto-plugin.map -static-libstdc++ -static-libgcc ../libiberty/pic/libiberty.a -pthread -Wl,-soname -Wl,liblto_plugin.so -o .libs/liblto_p while it fails in stage2: [ 7129s] libtool: link: /home/abuild/rpmbuild/BUILD/gcc-13.0.0+git194120/obj-riscv64-suse-linux/./prev-gcc/xgcc -B/home/abuild/rpmbuild/BUILD/gcc-13.0.0+git194120/obj-riscv64-suse-linux/./prev-gcc/ -B/usr/riscv64-suse-linux/bin/ -B/usr/riscv64-suse-linux/bin/ -B/usr/riscv64-suse-linux/lib/ -isystem /usr/riscv64-suse-linux/include -isystem /usr/riscv64-suse-linux/sys-include -fno-checking -shared -fPIC -DPIC .libs/lto-plugin.o -pthread -static-libgcc -Wl,--version-script=../../lto-plugin/lto-plugin.map -static-libstdc++ -static-libgcc ../libiberty/pic/libiberty.a -pthread -Wl,-soname -Wl,liblto_plugin.so -o .libs/liblto_plugin.so Where the system compiler takes the library from: /usr/lib/gcc/riscv64-linux-gnu/11/libatomic.so that points to system library location: ls -l /usr/lib/gcc/riscv64-linux-gnu/11/libatomic.so lrwxrwxrwx 1 root root 41 Mar 24 14:22 /usr/lib/gcc/riscv64-linux-gnu/11/libatomic.so -> ../../../riscv64-linux-gnu/libatomic.so.1 So the question is how to fix that? Martin