Browse Source

gdbsupport: replace AC_TRY_COMPILE in warning.m4

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
binutils-2_36-branch
Simon Marchi 6 years ago
parent
commit
864ca43565
  1. 4
      gdb/ChangeLog
  2. 7
      gdb/configure
  3. 4
      gdbserver/ChangeLog
  4. 7
      gdbserver/configure
  5. 6
      gdbsupport/ChangeLog
  6. 7
      gdbsupport/configure
  7. 24
      gdbsupport/warning.m4

4
gdb/ChangeLog

@ -6,6 +6,10 @@
* configure: Re-generate.
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
* configure: Re-generate.
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
* acinclude.m4: Modernize.

7
gdb/configure

@ -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;
}

4
gdbserver/ChangeLog

@ -6,6 +6,10 @@
* configure: Re-generate.
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
* configure: Re-generate.
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
* configure.ac: Modernize.

7
gdbserver/configure

@ -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;
}

6
gdbsupport/ChangeLog

@ -1,3 +1,9 @@
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
* configure: Re-generate.
* warning.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
AC_LANG_PROGRAM.
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
* configure: Re-generate.

7
gdbsupport/configure

@ -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;
}

24
gdbsupport/warning.m4

@ -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"

Loading…
Cancel
Save