diff --git a/core/gcc/build b/core/gcc/build index 1ab08615..df87d4c1 100755 --- a/core/gcc/build +++ b/core/gcc/build @@ -53,3 +53,12 @@ ln -s gcc "$1/usr/bin/cc" # POSIX compliance. install -Dm755 ../c99 "$1/usr/bin/c99" + +# Symlink for LTO. +{ + mkdir -p "$1/usr/lib/bfd-plugins" + + ln -s /usr/libexec/gcc/x86_64-pc-linux-musl/9.2.0/liblto_plugin.so \ + "$1/usr/lib/bfd-plugins/liblto_plugin.so" +} + diff --git a/testing/gcc/build b/testing/gcc/build index ef0e87db..8f07f283 100755 --- a/testing/gcc/build +++ b/testing/gcc/build @@ -35,7 +35,8 @@ export libat_cv_have_ifunc=no --enable-threads \ --enable-tls \ --enable-languages=c,c++ \ - --build=x86_64-pc-linux-musl + --build=x86_64-pc-linux-musl \ + --disable-bootstrap make make DESTDIR="$1" install @@ -50,3 +51,11 @@ ln -s gcc "$1/usr/bin/cc" # POSIX compliance. install -Dm755 ../c99 "$1/usr/bin/c99" + +# Symlink for LTO. +{ + mkdir -p "$1/usr/lib/bfd-plugins" + + ln -s /usr/libexec/gcc/x86_64-pc-linux-musl/10.0.1/liblto_plugin.so \ + "$1/usr/lib/bfd-plugins/liblto_plugin.so" +}