Add @cindex for section documenting the -list-features GDB/MI command.
[deliverable/binutils-gdb.git] / gold / configure.ac
index 4cc9569e12fb266602b8022ea2610a7ea7adfcbf..9bc216b947ce019a79830978ae13fea1d91f0d84 100644 (file)
@@ -343,8 +343,8 @@ AC_CACHE_CHECK([whether $CC supports -fmerge-constants],
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fmerge-constants"
 AC_COMPILE_IFELSE([const char *s = "foo";],
-                 [have_merge_constants=yes],
-                 [have_merge_constants=no])
+                 [gold_cv_merge_constants=yes],
+                 [gold_cv_merge_constants=no])
 CFLAGS="$save_CFLAGS"])
 AC_SUBST([MERGE_CONSTANTS_FLAG])
 AS_IF([test "$gold_cv_merge_constants" = yes],
@@ -389,8 +389,13 @@ fi
 AM_CONDITIONAL(OMP_SUPPORT, test "$gold_cv_c_threadprivate" = "yes")
 
 dnl Test for the -ftls-dialect=gnu2 option.
+dnl Use -Werror in case of compilers that make unknown -m options warnings.
+dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS
+dnl gets set later by default Autoconf magic to include -Werror.  (We are
+dnl assuming here that there is no compiler that groks -mtls-dialect=gnu2
+dnl but does not grok -Werror.)
 save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fpic -mtls-dialect=gnu2"
+CFLAGS="$CFLAGS -Werror -fpic -mtls-dialect=gnu2"
 AC_COMPILE_IFELSE([
 __thread int i;
 void foo (void)
@@ -523,9 +528,14 @@ AC_CHECK_HEADERS(ext/hash_map ext/hash_set)
 AC_CHECK_HEADERS(byteswap.h)
 
 dnl When plugins enabled dynamic loader interface is required. Check headers
-dnl which may provide this interface. In case of dlfcn.h add libdl to link.
+dnl which may provide this interface. Add the necessary library to link.
 AC_CHECK_HEADERS(windows.h)
-AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""])
+AC_CHECK_HEADERS(dlfcn.h)
+AC_SEARCH_LIBS(dlopen, [dl dld])
+case "$ac_cv_search_dlopen" in
+  no*) DLOPEN_LIBS="";;
+  *)   DLOPEN_LIBS="$ac_cv_search_dlopen";;
+esac
 AC_SUBST(DLOPEN_LIBS)
 
 AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times)
@@ -592,8 +602,13 @@ if test "$gold_cv_stat_st_mtim" = "yes"; then
 fi
 
 dnl Check if gcc supports the -gpubnames option.
+dnl Use -Werror in case of compilers that make unknown -g options warnings.
+dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS
+dnl gets set later by default Autoconf magic to include -Werror.  (We are
+dnl assuming here that there is no compiler that groks -gpubnames
+dnl but does not grok -Werror.)
 save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -gpubnames"
+CXXFLAGS="$CXXFLAGS -Werror -gpubnames"
 AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no])
 CXXFLAGS="$save_CXXFLAGS"
 AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes")
This page took 0.023885 seconds and 4 git commands to generate.