--- gcc-14.2.0/gcc/configure.orig	2025-02-20 16:15:18.042977049 +0100
+++ gcc-14.2.0/gcc/configure	2025-02-20 16:14:04.052977058 +0100
@@ -28001,7 +28001,7 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker plugin support" >&5
 $as_echo_n "checking linker plugin support... " >&6; }
 gcc_cv_lto_plugin=0
-if test -f liblto_plugin.la; then
+if test -f liblto_plugin.la || test -f liblto_plugin.so; then
   save_ld_ver="$ld_ver"
   save_ld_vers_major="$ld_vers_major"
   save_ld_vers_minor="$ld_vers_minor"
