diff options
author | Alexey Neyman <stilor@att.net> | 2018-12-11 16:59:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 16:59:00 (GMT) |
commit | de48268390eacb4a3e69c7d504e618a45d2a19eb (patch) | |
tree | 9d75d3707ec335e088cfc5dc131b89691a6440e3 /scripts/build/cc | |
parent | abee9bd48239468b49913ae73dcab5283bcb8810 (diff) | |
parent | f2b64524b0a15dd7ee830db302199bb183566356 (diff) |
Merge pull request #1115 from stilor/binutils-lto
Add a symlink to LTO for binutils
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 5132444..64755ab 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 } |