From: Simon Marchi Date: Sat, 31 Oct 2020 12:30:59 +0000 (-0400) Subject: gdbsupport: replace AC_TRY_COMPILE in ptrace.m4 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5164c11714c92ba7690d4f93de6be6a90f460220;p=binutils-gdb.git gdbsupport: replace AC_TRY_COMPILE in ptrace.m4 Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE + AC_LANG_PROGRAM. All the changes in the generated configure files are insignificant whitespace changes. gdb/ChangeLog: * configure: Re-generate. gdbserver/ChangeLog: * configure: Re-generate. gdbsupport/ChangeLog: * configure: Re-generate. * ptrace.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE + AC_LANG_PROGRAM. Change-Id: Ia782b5477fe49dad04e68c0f41c6d8ab3fde5bf0 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cd46bb82e0a..46e1302069e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -2,6 +2,10 @@ * configure: Re-generate. +2020-10-31 Simon Marchi + + * configure: Re-generate. + 2020-10-31 Simon Marchi * acinclude.m4: Modernize. diff --git a/gdb/configure b/gdb/configure index 4816b98919a..65904baf804 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15166,11 +15166,12 @@ if ${gdb_cv_func_ptrace_ret+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$gdb_ptrace_headers + $gdb_ptrace_headers int main () { extern long ptrace (enum __ptrace_request, ...); + ; return 0; } @@ -15185,6 +15186,7 @@ int main () { extern int ptrace (); + ; return 0; } @@ -15223,6 +15225,7 @@ int main () { extern long ptrace (enum __ptrace_request, ...); + ; return 0; } @@ -15241,6 +15244,7 @@ int main () { extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); + ; return 0; } @@ -15260,6 +15264,7 @@ int main () { extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); + ; return 0; } diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index bd4ddf77cd1..8975cc91406 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -2,6 +2,10 @@ * configure: Re-generate. +2020-10-31 Simon Marchi + + * configure: Re-generate. + 2020-10-31 Simon Marchi * configure.ac: Modernize. diff --git a/gdbserver/configure b/gdbserver/configure index 968642124b5..3980ae76230 100755 --- a/gdbserver/configure +++ b/gdbserver/configure @@ -9448,11 +9448,12 @@ if ${gdb_cv_func_ptrace_ret+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$gdb_ptrace_headers + $gdb_ptrace_headers int main () { extern long ptrace (enum __ptrace_request, ...); + ; return 0; } @@ -9467,6 +9468,7 @@ int main () { extern int ptrace (); + ; return 0; } @@ -9505,6 +9507,7 @@ int main () { extern long ptrace (enum __ptrace_request, ...); + ; return 0; } @@ -9523,6 +9526,7 @@ int main () { extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); + ; return 0; } @@ -9542,6 +9546,7 @@ int main () { extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); + ; return 0; } diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog index dbdb2ca9531..634b7c7913b 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -1,3 +1,9 @@ +2020-10-31 Simon Marchi + + * configure: Re-generate. + * ptrace.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE + + AC_LANG_PROGRAM. + 2020-10-31 Simon Marchi * configure: Re-generate. diff --git a/gdbsupport/configure b/gdbsupport/configure index e51c7b59688..904403d13f1 100755 --- a/gdbsupport/configure +++ b/gdbsupport/configure @@ -10017,11 +10017,12 @@ if ${gdb_cv_func_ptrace_ret+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$gdb_ptrace_headers + $gdb_ptrace_headers int main () { extern long ptrace (enum __ptrace_request, ...); + ; return 0; } @@ -10036,6 +10037,7 @@ int main () { extern int ptrace (); + ; return 0; } @@ -10074,6 +10076,7 @@ int main () { extern long ptrace (enum __ptrace_request, ...); + ; return 0; } @@ -10092,6 +10095,7 @@ int main () { extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); + ; return 0; } @@ -10111,6 +10115,7 @@ int main () { extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); + ; return 0; } diff --git a/gdbsupport/ptrace.m4 b/gdbsupport/ptrace.m4 index 57ed80260ac..9f49cf6165b 100644 --- a/gdbsupport/ptrace.m4 +++ b/gdbsupport/ptrace.m4 @@ -37,13 +37,17 @@ gdb_ptrace_headers=' AC_CACHE_CHECK( [return type of ptrace], [gdb_cv_func_ptrace_ret], - [AC_TRY_COMPILE( - [$gdb_ptrace_headers], - [extern long ptrace (enum __ptrace_request, ...);], - [gdb_cv_func_ptrace_ret='long'], - [AC_TRY_COMPILE( + [AC_COMPILE_IFELSE( +  [AC_LANG_PROGRAM( [$gdb_ptrace_headers], - [extern int ptrace ();], + [extern long ptrace (enum __ptrace_request, ...);] + )], + [gdb_cv_func_ptrace_ret='long'], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [$gdb_ptrace_headers], + [extern int ptrace ();] + )], [gdb_cv_func_ptrace_ret='int'], [gdb_cv_func_ptrace_ret='long'] )] @@ -60,25 +64,31 @@ AC_DEFINE_UNQUOTED( AC_CACHE_CHECK( [types of arguments for ptrace], [gdb_cv_func_ptrace_args], - [AC_TRY_COMPILE( - [$gdb_ptrace_headers], - [extern long ptrace (enum __ptrace_request, ...);], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [$gdb_ptrace_headers], + [extern long ptrace (enum __ptrace_request, ...);] + )], [gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'], [for gdb_arg1 in 'int' 'long'; do for gdb_arg2 in 'pid_t' 'int' 'long'; do for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do for gdb_arg4 in 'int' 'long' 'void *'; do - AC_TRY_COMPILE( - [$gdb_ptrace_headers], - [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [$gdb_ptrace_headers], + [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);] + )], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; break 4;] ) for gdb_arg5 in 'int *' 'int' 'long'; do - AC_TRY_COMPILE( - [$gdb_ptrace_headers], - [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [$gdb_ptrace_headers], + [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);] + )], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; break 5;] )