From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C8803857C42; Wed, 28 Sep 2022 19:04:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C8803857C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664391854; bh=AZ5bgoR6zvXA/Blx5O61Bve9smYpxez0MgNCvdA2ChU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=u8CwTvWBa3vDRh7czz4RFp8T2O5eesB+UcheOgRRZ9Ie84HxuYClSUkO41n7M7PsH vbJz7i6kPZUyJM3Lz3UOFzECXB/9ZOamJ3VdiSfuIsbNoJHv5oIo2PRUiV+O612TZ9 Bdwp2uoHVWIKizOd8XInVBrEuldNDmi4H5IzPFp4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/107059] [13 regression] bootstrap failure after r13-2887-gb04208895fed34 Date: Wed, 28 Sep 2022 19:04:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D107059 --- Comment #26 from Jakub Jelinek --- (In reply to Tobias Burnus from comment #23) > Regarding the $BUILD/gcc/include-fixed and xgcc -B $BUILD/gcc: >=20 > In gcc.cc's driver_handle_option: >=20 > add_prefix (&include_prefixes, arg, NULL, > PREFIX_PRIORITY_B_OPT, 0, 0); > Adds "$BUILD/gcc/" to the prefix list in include_prefix.plist (priority = =3D > PREFIX_PRIORITY_B_OPT, require_machine_suffix =3D os_multilib =3D 0) > the include_prefixes.name is "include". >=20 > This is later processed in do_spec_1 as: > info.option =3D "-isystem"; > info.append =3D "include"; > ... > for_each_path (&include_prefixes, false, info.append_len, > spec_path, &info); > ... > info.append =3D "include-fixed"; > for_each_path (&include_prefixes, false, info.append_len, > spec_path, &info); > which in turn runs with ( =3D "$BUILD/gcc/"): >=20=20=20 > /x86_64-pc-linux-gnu/13.0.0/ > /x86_64-linux-gnu/ > >=20 > It also sets -iprefix $BUILD/gcc/../lib/gcc/x86_64-pc-linux-gnu/13.0.0/ > -isystem $BUILD/gcc/{include,include-fixed} Well, the upper directories to include/include-fixed should stay as they ar= e, that is how to find the include-fixed directory. But for multi-arch we need to search both include-fixed/ and include-fixed, so I think we need in addition to the comment 14 patch also (completely untested): --- gcc/gcc.cc 2022-09-23 09:02:56.809314447 +0200 +++ gcc/gcc.cc 2022-09-28 21:02:29.751933657 +0200 @@ -6400,6 +6400,18 @@ do_spec_1 (const char *spec, int inswitc if (*sysroot_hdrs_suffix_spec) info.append =3D concat (info.append, dir_separator_str, multilib_dir, NULL); + else if (multiarch_dir) + { + /* For multiarch, search include-fixed/ + before include-fixed. */ + info.append =3D concat (info.append, dir_separator_str, + multiarch_dir, NULL); + info.append_len =3D strlen (info.append); + for_each_path (&include_prefixes, false, info.append_len, + spec_path, &info); + + info.append =3D "include-fixed"; + } info.append_len =3D strlen (info.append); for_each_path (&include_prefixes, false, info.append_len, spec_path, &info); It is roughly what the comment 14 patch does, just in a different spot.=