Hi Everyone, I found that there is some ebuilds that does not respect the "-fuse-ld=..." ldflags(and LD="..."). The only way to change linker for these package is to replace the symlink of "ld" which binutils-config can do that.... but only for 2 kind of gnu linker (ld.bfd, ld.gold). I can only change to my custom linker by manually symlink it. And above just change the "global" linker, it is hard for user to config liner per package.
After dig further, I found that gentoo's libtool/autoconf/automake is already patched (with "libtool-2.4.6-link-fuse-ld.patch") that it allow the "-fuse-ld=..." option pass to compile. But the problem is that these package already autoconfed and automaked by the ebuild maintainer. So there will be a non-patched version of "ltmain.sh" file in the package tarball. The portage only do "./configure" in compile phase (no autoconf, automake) cause the generated Makefile(and its helper script) block the "-fuse-ld=..." options. I create an almost empty stage3 updated(with ~amd64) gentoo box, recompile @world. The below is the list of ebuilds that filter the "-fuse-ld=..." options. (I already excluded ebuilds that mean to filter it, like gcc, glibc...) net-libs/libmnl-1.0.4 app-arch/xz-utils-5.2.3 dev-libs/libltdl-2.4.6 dev-libs/gmp-6.1.2 sys-libs/cracklib-2.9.6-r1 dev-libs/mpfr-3.1.6 dev-libs/mpc-1.0.3 sys-apps/file-5.32 sys-apps/kmod-24 net-firewall/iptables-1.6.1-r2 dev-libs/libpipeline-1.4.2 sys-apps/attr-2.4.47-r2 sys-libs/libseccomp-2.3.2 sys-apps/util-linux-2.31 sys-apps/acl-2.2.52-r1 dev-libs/libpcre-8.41-r1 sys-process/procps-3.3.12-r1 sys-apps/gawk-4.2.0 dev-libs/popt-1.16-r2 net-misc/openssh-7.6_p1 x11-libs/libpciaccess-0.13.5 sys-devel/gettext-0.19.8.1 dev-libs/libgpg-error-1.27-r1 sys-libs/binutils-libs-2.29.1-r1 app-arch/libarchive-3.3.2 sys-apps/man-db-2.7.6.1-r2 sys-libs/pam-1.3.0 Best Regards, Atkins