From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by sourceware.org (Postfix) with ESMTPS id 74E813858D39 for ; Fri, 1 Jul 2022 06:36:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 74E813858D39 Received: by mail-qv1-xf35.google.com with SMTP id c1so3157475qvi.11 for ; Thu, 30 Jun 2022 23:36:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=jincTlHhnxXFAWjakDkUvcg+FYCDjb2XQfJ0k4hRFiU=; b=aFxzf6oDOIjoMcfoYwemgZAxUzTWNDA9uTkRbde2jQuUWHs2kCWNA5RFiQdLY5H5Rs bz47UAIl6cJo0XSSOCGuBdCDliSD+NR9xLC/Hh5asOapzKPZMhmHmi68XAzIn+SAtZ+1 BHuCmMpMJfQllZoam7LlvHCemlBy/jc/jOup9mXM54QH+2qr0dJg4YUoTco6OEy9xMsB l43itsj2rz4EV3gh6q25zx5vVydvF3xeeFNhVrlwzf1m1TCaIK2exXW1/R+JRwL56PPc gd5N6udcnI3ztFb6lkQhG+X8irC0sqZbGA/dIEHAMfbCTQZDth5DclBuIGzwsCmyOswW utLg== X-Gm-Message-State: AJIora907bQGkFOqhUyELdQIfVxmJz1bB7XF5OCRJl4CfIr6eoHubEZs jwuwXIyizLC+nF01S80ruADoIB3oF56SFBpiVlI= X-Google-Smtp-Source: AGRyM1t5YGuCA/1mAX2bKrcRk1SSvLq5JQxdbpWQTDGN93//41PfCZ+FDDLW0P2yRjRAnVsno+AT7l2lyHIzKuHCDUE= X-Received: by 2002:a05:622a:d1:b0:306:5d28:f0a2 with SMTP id p17-20020a05622a00d100b003065d28f0a2mr11370510qtw.581.1656657378789; Thu, 30 Jun 2022 23:36:18 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <3dc13790-a22d-c4d6-6cfe-ab9b567968ff@suse.cz> From: Richard Biener Date: Fri, 1 Jul 2022 08:36:07 +0200 Message-ID: Subject: Re: [PATCH 3/3] lto-plugin: implement LDPT_GET_API_VERSION To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: Rui Ueyama , Alexander Monakov , GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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: Fri, 01 Jul 2022 06:36:21 -0000 On Thu, Jun 30, 2022 at 10:42 AM Martin Li=C5=A1ka 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/rui3= 14/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 versi= on. 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). 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=C5=A1ka > 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 <= https://github.com/rui314/mold/issues/454#issuecomment-1160419030> > > > > Martin > >