From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C940A3858D33; Mon, 23 Jan 2023 10:08:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C940A3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674468524; bh=yNHKUqU7DPrkhzoSghGhXdpKnS4UQyqy6fJ4P0zpyvc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ii3h/4b7d08S9wC5JnUJDDIBfxyjs/heDtGD9WkLCtLlyGoqIWG0JC97+PIrDUaak ZpOIHbcKQrnECOrhrcWZYdvnkVEOM/DQzAqCOKhA0ZkXlSaAbkW715eaOLuI7kmSKA tFa/rSHHO/yfz5gcDgIeEcLcUKd+/WDZD3VD4Yao= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108462] duplicate install of static libraries Date: Mon, 23 Jan 2023 10:08:42 +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: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D108462 --- Comment #5 from Richard Biener --- OK, so after fixing that I see /tmp/install/lib/gcc/x86_64-pc-linux-gnu/13.0.1/collect2 -plugin /tmp/install/lib/gcc/x86_64-pc-linux-gnu/13.0.1/liblto_plugin.so -plugin-opt=3D/tmp/install/lib/gcc/x86_64-pc-linux-gnu/13.0.1/lto-wrapper -plugin-opt=3D-fresolution=3D/tmp/cchKWOsJ.res -plugin-opt=3D-pass-through= =3D-lgcc -plugin-opt=3D-pass-through=3D-lgcc_eh -plugin-opt=3D-pass-through=3D-lc -m= elf_i386 -static /usr/lib/../lib/crt1.o /usr/lib/../lib/crti.o /tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/32/crtbeginT.o -L/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/32/m2/m2iso -L/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/32/m2/m2pim -L/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/32 -L/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1 -L/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/../../.. /tmp/cc2HjFtG.o -lm2iso -lm2pim -lstdc++ -lm -lpthread --start-group -lgcc -lgcc_eh -lc --end-group /tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/32/crtend.o /usr/lib/../lib/crtn.o that means we search both install locations so we could drop either copy. Dropping the static lib in the m2/m2*/ directories would allow to prune the library search path as far as I understand (and the shared libs are in different paths anyway, with --enable-version-specific-runtime-libs they are in the place of the other static lib copy). The advantage of keeping the m2/m2*/ copy is that for the regular install the static libs would not clobber the main install location but then toolexeclib_LTLIBRARIES =3D libm2cor.la doesn't really support having two different locations for the static/shared lib parts. I'm going to first fix the mistake done by r13-5284-ge61d43791e0943=