Skip to content

Instantly share code, notes, and snippets.

@xvjau
Created April 24, 2017 14:37
Show Gist options
  • Save xvjau/4d8deb2841c6ccd1b844764e67f88569 to your computer and use it in GitHub Desktop.
Save xvjau/4d8deb2841c6ccd1b844764e67f88569 to your computer and use it in GitHub Desktop.
Update LTO plugins after GCC build.
#!/bin/bash
GCCVERSION=$(gcc --version | grep ^gcc | sed 's/^.* //g')
DESTDIR=/usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins
if [ ! -d ${DESTDIR} ]; then
mkdir -p ${DESTDIR}
else
rm -iv ${DESTDIR}/liblto_plugin.so*
fi
ln -sfv /usr/libexec/gcc/x86_64-pc-linux-gnu/${GCCVERSION}/liblto_plugin.so* ${DESTDIR}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment