From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 707273858C74; Fri, 13 Jan 2023 00:15:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 707273858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673568909; bh=RYcSCsig2QqFflinRaEqHAagcvNJT6lTbCCvOorZwRw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xJXkS+94qd3/pzN/9eSv4v67Gu7NPXVK79ZpSXHZoaUHO9obb0XJwjfuxYBHs0ocL /Uf+k6R+9axoaeh+OjYw5WbnneRd1zdbq0124+8eem69WFmeo3JXfhk0g1+rpl7XgN K8J0QO+Zy69S3Fnnvm54LtFdPYfpqRZDahQt6mBA= 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: Fri, 13 Jan 2023 00:15:09 +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 #15 from Iain Sandoe --- (In reply to Iain Sandoe from comment #14) > Created attachment 54261 [details] > Updated patch that honours the order of include use. >=20 > This is V5 ... >=20 > ... so here we collect the incoming search paths and then apply (most of) > the rules in=20 > https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Optio= ns >=20 > ... TODO: > - eliminate duplicate -I entries that have a system one > - figure out the right way to implement -nostdinc=20 > - handle -idirafter add this missed hunk. diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc index 073d1dd55db..cd59784d7b2 100644 --- a/gcc/m2/gm2-lang.cc +++ b/gcc/m2/gm2-lang.cc @@ -513,6 +513,7 @@ add_m2_import_paths (const char *liblist) { char *libname =3D (char *) alloca (6); strncpy (libname, liblist, 5); + libname[5] =3D 0; add_one_import_path (libname); liblist +=3D 5; if (*liblist =3D=3D ',')=