From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 49D663858C52; Mon, 3 Apr 2023 06:32:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49D663858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680503578; bh=cqlF4TqfSuKhs7cnOl0WH5Pl5QV640nlMJT8JnBKaBw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MiK921nDiMFZXmqIelqpaTI/QZWkC9q8HlOyf5pbhOwhsbWa/b+qZhI8uwp++bSOh uKcKfg+xYDDOj1dRI8+4NVc/XNvzFcK3sqtRZ/85V7I580wdh9bp1I7+9p395yu/a6 FkPs1E0draQ6vg5nezXYDftwXsd/CwhQlesugk7A= From: "sterprim at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/104707] GCC doesn't give default lib path to the linker when multilib is off Date: Mon, 03 Apr 2023 06:32:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sterprim at outlook dot com X-Bugzilla-Status: UNCONFIRMED 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: component version short_desc cf_gcctarget 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=3D104707 Tan xc changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |other Version|11.2.0 |12.2.0 Summary|gcc on riscv64 isn't |GCC doesn't give default |passing entire library path |lib path to the linker when |to the linker |multilib is off Target|riscv64-unknown-linux-gnu | --- Comment #6 from Tan xc --- This has been a lingering issue since the old days. GCC deliberately dismis= ses well-known library paths when invoking the linker. When multilib is on, the= %D specifier in the spec automagically inserts library path from multilib opti= on, which conceals this problem. While this logic saves a little parameter size, there is no need to keep sa= ving the space of the parameters, since all modern operating systems have a large enough parameter space (all of them have 262k at least). This prevents GCC = from working with other linkers correctly.=