https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78698
--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> ---
didn't check a configuration with --disable-shared :-/ What about checking for
a $bdw_lib_dir/libgc.la and in that case setting BDW_GC_LIBS to
$bdw_lib_dir/libgc.la and skipping the compile and link tests? I assume we
could do a file check for the header file as well for this case.
--- configure.ac (revision 243108)
+++ configure.ac (working copy)
@@ -290,10 +293,19 @@
AC_MSG_ERROR([no multilib path ($mldir) found in
--with-target-bdw-gc-lib])
fi
BDW_GC_CFLAGS="-I$bdw_inc_dir"
- BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
+ if test -f $bdw_lib_dir/libgc.la; then
+ BDW_GC_LIBS="$bdw_lib_dir/libgc.la"
+ else
+ BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
+ fi
AC_MSG_RESULT([found])
fi
+ case "$BDW_GC_LIBS" in
+ *libgc.la)
+ use_bdw_gc=yes
+ ;;
+ *)
AC_MSG_CHECKING([for system boehm-gc])
save_CFLAGS=$CFLAGS
save_LIBS=$LIBS
@@ -329,6 +341,7 @@
use_bdw_gc=yes
AC_MSG_RESULT([found])
fi
+ esac
esac
if test "$use_bdw_gc" = no; then