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 9BD6E38582A7 for ; Mon, 4 Jul 2022 14:17:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9BD6E38582A7 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 8A7E722A5A; Mon, 4 Jul 2022 14:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1656944255; 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=gRCG758M48gIRGfLMpNiy3I+6FXmirnSokpjArBePSM=; b=AakX94C+DjK4k+m7X0mTw1Owp8JwynsikgQA/D8QXPWM28rq9u2RJ97ut+v981NXEB2R82 eOsTpfPiyJR+ez/S+oDWVKyfM4AheKiqb6N0HfK3CmwDorb2ldSuwMV3+U3QmXLzjOUNr5 VlQkgFggzll/K6Vok9Nb7Hv+5UTArtU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1656944255; 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=gRCG758M48gIRGfLMpNiy3I+6FXmirnSokpjArBePSM=; b=f+C470wBYCvHGfbpZ5CUcnvipACe2BeszoHSm7SLbLDa/1w+Nq36mVdO1FgeRWgOx2CGOi BF9z0vgEXtAr/qAA== 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 6BC3F13451; Mon, 4 Jul 2022 14:17:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oKK8GH/2wmIEWwAAMHmgww (envelope-from ); Mon, 04 Jul 2022 14:17:35 +0000 Message-ID: Date: Mon, 4 Jul 2022 16:17:35 +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 3/3] lto-plugin: implement LDPT_GET_API_VERSION Content-Language: en-US To: Richard Biener Cc: Rui Ueyama , Alexander Monakov , GCC Patches References: <803a0290-3909-b9c5-2461-b1740a00c63a@suse.cz> <146a46f1-3a56-48c5-386f-c15633cc6781@ispras.ru> <37b52d36-d1dd-f291-0baa-0cf670493692@suse.cz> <4e3df681-9523-4781-d324-9a6e230f495a@suse.cz> <3dc13790-a22d-c4d6-6cfe-ab9b567968ff@suse.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 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, T_SCC_BODY_TEXT_LINE autolearn=ham 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 14:17:37 -0000 On 7/1/22 08:36, Richard Biener wrote: > On Thu, Jun 30, 2022 at 10:42 AM Martin Liška wrote: >> >> On 6/30/22 08:43, Rui Ueyama wrote: >>> Thanks Martin for creating this patch. >> >> You're welcome. >> >>> >>> Here is a preliminary change for the mold side: https://github.com/rui314/mold/commit/9ad49d1c556bc963d06cca8233535183490de605 >>> >>> Overall the API is looking fine, >> >> Good then! >> >>> though it is not clear what kind of value is expected as a linker version. A linker version is not a single unsigned integer but something like "1.3.0". Something like "1.3.0-rc2" can also be a linker version. So I don't think we can represent a linker version as a single integer. >> >> Well, you can use the same what we use GCC_VERSION (plugin_version): >> >> 1000 * MAJOR + MINOR >> >> Let me adjust the documentation of the API. > > Hmm, but then why not go back to the original suggestion merging > linker_identifier and linker_version into > a single string. That of course puts the burden of parsing to the > consumer - still that's probably better > than imposing the constraint of encoding the version in an unsigned > integer. Alternatively easing > parsing by separating out the version in a string would be possible as > well (but then you'd have > to care for 1.3.0-rc2+gitab4316174 or so, not sure what the advantage > over putting everything in > the identifier would be). I'm fine with the suggested 2 strings (linker_identifier and linker_version). Does it work for you Rui? Cheers, Martin > > You usually cannot rely on a version anyway since distributors usually > apply patches. > >> Richi: May I install the patch? > > Let's sort out the version thing and consider simplifying the API. > > Richard. > >> Thanks, >> Martin >> >>> >>> On Mon, Jun 20, 2022 at 9:01 PM Martin Liška > wrote: >>> >>> On 6/20/22 11:35, Richard Biener wrote: >>> > I think this is OK. Can we get buy-in from mold people? >>> >>> Sure, I've just pinged Rui: >>> https://github.com/rui314/mold/issues/454#issuecomment-1160419030 >>> >>> Martin >>>