When gcc is configured using --with-plugin-ld=/some/path/x86_64-pc-linux-gnu-hjl-master/bin/ld the resulting ld path will be reduced to the incorrect /some/path/hjl-master/bin/ld (for a x86_64-pc-linux-gnu target). This change was introduced by git commit 61f41b94c58c64e7334d97df57d6467cb1c7b70e and is part of gcc 4.8+.
$target_alias needs to be stripped from the executable name though. I guess it's just a matter of writing the proper regex for sed, but no plan to work on it in the foreseeable future as far as I'm concerned.
do you have a few examples of expected input/output path pairs perhaps?
Let's just revert part of the change then, no big deal.
Author: ebotcazou Date: Thu Nov 19 13:31:33 2015 New Revision: 230603 URL: https://gcc.gnu.org/viewcvs?rev=230603&root=gcc&view=rev Log: PR lto/61313 * configure.ac (PLUGIN_LD_SUFFIX): Do not touch the value specified by the user. * configure: Regenerate. Modified: trunk/gcc/ChangeLog trunk/gcc/configure trunk/gcc/configure.ac
Author: ebotcazou Date: Thu Nov 19 13:32:10 2015 New Revision: 230604 URL: https://gcc.gnu.org/viewcvs?rev=230604&root=gcc&view=rev Log: PR lto/61313 * configure.ac (PLUGIN_LD_SUFFIX): Do not touch the value specified by the user. * configure: Regenerate. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/configure branches/gcc-5-branch/gcc/configure.ac
Author: ebotcazou Date: Thu Nov 19 13:32:54 2015 New Revision: 230605 URL: https://gcc.gnu.org/viewcvs?rev=230605&root=gcc&view=rev Log: PR lto/61313 * configure.ac (PLUGIN_LD_SUFFIX): Do not touch the value specified by the user. * configure: Regenerate. Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/configure branches/gcc-4_9-branch/gcc/configure.ac
Fixed everywhere.