gdb: replace AC_TRY_LINK in sanitize.m4
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 31 Oct 2020 12:31:00 +0000 (08:31 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 31 Oct 2020 12:31:00 +0000 (08:31 -0400)
... with AC_LINK_IFELSE + AC_LANG_PROGRAM.

All changes in the generated configure file are insignificant whitespace
changes.

gdb/ChangeLog:

* configure: Re-generate.
* sanitize.m4: Replace AC_TRY_LINK with AC_LINK_IFELSE +
AC_LANG_PROGRAM.

Change-Id: I6fc4c39e10b28d2ade964e0d59a7f8ec0d3a272a

gdb/ChangeLog
gdb/configure
gdb/sanitize.m4

index e3734cf564a2a259f3ed33a30506cbbf77dde49b..91541795e266326deff7268580a1bcce1d4d3efb 100644 (file)
@@ -1,3 +1,9 @@
+2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * configure: Re-generate.
+       * sanitize.m4: Replace AC_TRY_LINK with AC_LINK_IFELSE +
+       AC_LANG_PROGRAM.
+
 2020-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * configure: Re-generate.
index a08c8c57ae395b9251de5a9f0493a13c2d9986bc..aa89158d06d39affb2cf33fe786233eb3eb1b1c2 100755 (executable)
@@ -16655,6 +16655,7 @@ if ac_fn_cxx_try_link "$LINENO"; then :
   enable_ubsan=yes
 else
   enable_ubsan=no
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
index 78d00703ca706a49a55d7e24626153f03874e42a..87a4f3c9f212dff1d507c16ec836b3a78c296bd9 100644 (file)
@@ -34,7 +34,11 @@ if test "x$enable_ubsan" = xyes; then
   dnl A link check is required because it is possible to install gcc
   dnl without libubsan, leading to link failures when compiling with
   dnl -fsanitize=undefined.
-  AC_TRY_LINK([],[],enable_ubsan=yes,enable_ubsan=no)
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([], [])],
+    [enable_ubsan=yes],
+    [enable_ubsan=no]
+  )
   CXXFLAGS="$saved_CXXFLAGS"
   AC_MSG_RESULT($enable_ubsan)
   if test "x$enable_ubsan" = xyes; then