From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F21CF3858D32; Mon, 2 Jan 2023 12:38:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F21CF3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672663083; bh=dwjBgPsWZuOBHgemQUrNq7RNHGY3SsMLYGR9uu7nsOQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tMO6pOSDLIuWi8IXESKeySzZsfrq24s+lpGwP0RNSzhnizWrjZhTKYRQe/0QmCiIS eNHqst9OoWx/iyOvB/672yxwZFJavDqVhserOWywEdgT6fjY1CPP1Y/3vN//IBK6no M4DIi4cEWpA1GEdLil6q+9DWeK6eB1Mhy3iR68Vg= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108182] gm2 driver mishandles target and multilib options Date: Mon, 02 Jan 2023 12:38:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108182 --- Comment #2 from Iain Sandoe --- computing the multilib_os_dir in the language driver is not going to be easy/reliably correct, since that code is called very early and the specs applied later could well modify the command line options. On IRC I had suggested that to mitigate thus it might be possible to defer = the computation by using the "%M" spec to insert the relevant multilib_os_dir entries. However, that would mean moving the production of the -I command = line entries to a language spec. At the moment I cannot see how to implement t= hat - since there are no specs to substitute for $libdir etc. So, at present, ISTM that the most reliable approach would be to follow what the c-fmaily does and compute the language-specific include paths early in = the front end. ---- As noted in PR108259, the '-L' entries are not, in fact, needed (actually t= hey break the discovery of the shared libraries) so that this part of the proce= ss can be simplified (and there is no need to consider the pre-link callback we were discussing). It seems increasingly likely that simplifying the library to a single runti= me with the process of deciding which APIs are available decided by the FE is probably going to resolve a bunch of difficulties and simplify the driver at the same time (0.02GBP, only, no patches at this time).=