Gentoo Archives: gentoo-dev

From: Atkins Chang <atkinschang@×××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Per package linker configuration
Date: Thu, 02 Nov 2017 07:35:45
Message-Id: CAH-8=9Ud0ceg_NOM-hFfVzu1477t97k7SWa85TcNS_=6D1BpPw@mail.gmail.com
1 Hi Everyone,
2
3 I found that there is some ebuilds that does not respect the "-fuse-ld=..."
4 ldflags(and LD="...").
5 The only way to change linker for these package is to replace the symlink
6 of "ld"
7 which binutils-config can do that.... but only for 2 kind of gnu linker
8 (ld.bfd, ld.gold).
9 I can only change to my custom linker by manually symlink it. And above
10 just change
11 the "global" linker, it is hard for user to config liner per package.
12
13 After dig further, I found that gentoo's libtool/autoconf/automake is
14 already patched
15 (with "libtool-2.4.6-link-fuse-ld.patch") that it allow the "-fuse-ld=..."
16 option pass to
17 compile. But the problem is that these package already autoconfed and
18 automaked
19 by the ebuild maintainer. So there will be a non-patched version of
20 "ltmain.sh" file
21 in the package tarball. The portage only do "./configure" in compile phase
22 (no autoconf, automake)
23 cause the generated Makefile(and its helper script) block the
24 "-fuse-ld=..." options.
25
26 I create an almost empty stage3 updated(with ~amd64) gentoo box, recompile
27 @world.
28 The below is the list of ebuilds that filter the "-fuse-ld=..." options.
29 (I already excluded ebuilds that mean to filter it, like gcc, glibc...)
30
31 net-libs/libmnl-1.0.4
32 app-arch/xz-utils-5.2.3
33 dev-libs/libltdl-2.4.6
34 dev-libs/gmp-6.1.2
35 sys-libs/cracklib-2.9.6-r1
36 dev-libs/mpfr-3.1.6
37 dev-libs/mpc-1.0.3
38 sys-apps/file-5.32
39 sys-apps/kmod-24
40 net-firewall/iptables-1.6.1-r2
41 dev-libs/libpipeline-1.4.2
42 sys-apps/attr-2.4.47-r2
43 sys-libs/libseccomp-2.3.2
44 sys-apps/util-linux-2.31
45 sys-apps/acl-2.2.52-r1
46 dev-libs/libpcre-8.41-r1
47 sys-process/procps-3.3.12-r1
48 sys-apps/gawk-4.2.0
49 dev-libs/popt-1.16-r2
50 net-misc/openssh-7.6_p1
51 x11-libs/libpciaccess-0.13.5
52 sys-devel/gettext-0.19.8.1
53 dev-libs/libgpg-error-1.27-r1
54 sys-libs/binutils-libs-2.29.1-r1
55 app-arch/libarchive-3.3.2
56 sys-apps/man-db-2.7.6.1-r2
57 sys-libs/pam-1.3.0
58
59 Best Regards,
60
61 Atkins