diff options
author | Alexey Neyman <stilor@att.net> | 2018-12-11 08:55:07 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2018-12-11 08:55:07 -0800 |
commit | f2b64524b0a15dd7ee830db302199bb183566356 (patch) | |
tree | 9d75d3707ec335e088cfc5dc131b89691a6440e3 /scripts/build/cc | |
parent | abee9bd48239468b49913ae73dcab5283bcb8810 (diff) | |
download | crosstool-ng-f2b64524b0a15dd7ee830db302199bb183566356.tar.gz crosstool-ng-f2b64524b0a15dd7ee830db302199bb183566356.tar.bz2 crosstool-ng-f2b64524b0a15dd7ee830db302199bb183566356.zip |
Add a symlink to LTO for binutils
... so that ar can find the plugin even when invoked directly, not
via the gcc-ar plugin.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 51324449..64755ab6 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -713,6 +713,13 @@ do_gcc_core_backend() { cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \ host="${host}" + + # If binutils want the LTO plugin, point them to it + if [ -d "${CT_PREFIX_DIR}/lib/bfd-plugins" -a "${build_step}" = "gcc_host" ]; then + local gcc_version=$(cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ) + CT_DoExecLog ALL ln -sfv "../../libexec/gcc/${CT_TARGET}/${gcc_version}/liblto_plugin.so" \ + "${CT_PREFIX_DIR}/lib/bfd-plugins/liblto_plugin.so" + fi } #------------------------------------------------------------------------------ @@ -1186,4 +1193,11 @@ do_gcc_backend() { cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \ host="${host}" + + # If binutils want the LTO plugin, point them to it + if [ -d "${CT_PREFIX_DIR}/lib/bfd-plugins" -a "${build_step}" = "gcc_host" ]; then + local gcc_version=$(cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ) + CT_DoExecLog ALL ln -sfv "../../libexec/gcc/${CT_TARGET}/${gcc_version}/liblto_plugin.so" \ + "${CT_PREFIX_DIR}/lib/bfd-plugins/liblto_plugin.so" + fi } |