]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbsupport: replace AC_TRY_COMPILE in warning.m4
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 26 Oct 2020 01:43:20 +0000 (21:43 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 26 Oct 2020 01:54:25 +0000 (21:54 -0400)
Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE + AC_LANG_PROGRAM.

All changes in generated configure files are insignificant whitespace
changes.

gdb/ChangeLog:

* configure: Re-generate.

gdbserver/ChangeLog:

* configure: Re-generate.

gdbsupport/ChangeLog:

* configure: Re-generate.
* warning.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
AC_LANG_PROGRAM.

Change-Id: I517bd20ec3af960ad999a586761df0ac8959a3fc

gdb/configure
gdbserver/configure
gdbsupport/configure
gdbsupport/warning.m4

index 65904baf8045bbe2030b96e71cf07d5f8e79642d..801e7a152e7b95d183759a1409c5557822f7f89c 100755 (executable)
@@ -16563,13 +16563,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 struct scoped_restore_base {};
-                 struct scoped_restore_tmpl : public scoped_restore_base {
-                  ~scoped_restore_tmpl() {}
-                };
+                   struct scoped_restore_tmpl : public scoped_restore_base {
+                     ~scoped_restore_tmpl() {}
+                   };
 int
 main ()
 {
 const scoped_restore_base &b = scoped_restore_tmpl();
+
   ;
   return 0;
 }
index 3980ae76230755186a9205043c317c9083a95653..39ec4916df7ee6f0c107b09998274d6f02d9a43e 100755 (executable)
@@ -9820,13 +9820,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 struct scoped_restore_base {};
-                 struct scoped_restore_tmpl : public scoped_restore_base {
-                  ~scoped_restore_tmpl() {}
-                };
+                   struct scoped_restore_tmpl : public scoped_restore_base {
+                     ~scoped_restore_tmpl() {}
+                   };
 int
 main ()
 {
 const scoped_restore_base &b = scoped_restore_tmpl();
+
   ;
   return 0;
 }
index 904403d13f1227d7a6b48fb65b5156d5463298df..1452b350ae319d4f16fbb7a7da67e97581cd3e9c 100755 (executable)
@@ -10306,13 +10306,14 @@ $as_echo_n "checking compiler warning flags... " >&6; }
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 struct scoped_restore_base {};
-                 struct scoped_restore_tmpl : public scoped_restore_base {
-                  ~scoped_restore_tmpl() {}
-                };
+                   struct scoped_restore_tmpl : public scoped_restore_base {
+                     ~scoped_restore_tmpl() {}
+                   };
 int
 main ()
 {
 const scoped_restore_base &b = scoped_restore_tmpl();
+
   ;
   return 0;
 }
index 649be7552dd10942dbf983a83b69179b6316cf6c..c88d4c65a078afbf6581e349b4a9526ae88ac3fa 100644 (file)
@@ -139,15 +139,23 @@ then
              # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
              # fixed in GCC 4.9.  This test is derived from the gdb
              # source code that triggered this bug in GCC.
-             AC_TRY_COMPILE(
-               [struct scoped_restore_base {};
-                 struct scoped_restore_tmpl : public scoped_restore_base {
-                  ~scoped_restore_tmpl() {}
-                };],
-               [const scoped_restore_base &b = scoped_restore_tmpl();],
-               WARN_CFLAGS="${WARN_CFLAGS} $w",)
+             AC_COMPILE_IFELSE(
+               [AC_LANG_PROGRAM(
+                  [struct scoped_restore_base {};
+                   struct scoped_restore_tmpl : public scoped_restore_base {
+                     ~scoped_restore_tmpl() {}
+                   };],
+                  [const scoped_restore_base &b = scoped_restore_tmpl();]
+                )],
+               [WARN_CFLAGS="${WARN_CFLAGS} $w"],
+               []
+             )
            else
-             AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
+             AC_COMPILE_IFELSE(
+               [AC_LANG_PROGRAM([], [])],
+               [WARN_CFLAGS="${WARN_CFLAGS} $w"],
+               []
+             )
            fi
            CFLAGS="$saved_CFLAGS"
            CXXFLAGS="$saved_CXXFLAGS"