mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 04:24:43 +00:00
Compare commits
13 Commits
efbd9add96
...
users/sima
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0360e91e8a | ||
|
|
c25fef3b38 | ||
|
|
f59bf08667 | ||
|
|
b6f228de8b | ||
|
|
a0de388f77 | ||
|
|
c3370398cd | ||
|
|
f1126915d5 | ||
|
|
b7bb4b06e4 | ||
|
|
2153e5423e | ||
|
|
bc698096c1 | ||
|
|
6e9f84bca3 | ||
|
|
48d51796af | ||
|
|
052688d982 |
156
gdb/acinclude.m4
156
gdb/acinclude.m4
@@ -78,114 +78,6 @@ m4_include(ax_cxx_compile_stdcxx.m4)
|
||||
|
||||
m4_include([../config/ax_pthread.m4])
|
||||
|
||||
## ----------------------------------------- ##
|
||||
## ANSIfy the C compiler whenever possible. ##
|
||||
## From Franc,ois Pinard ##
|
||||
## ----------------------------------------- ##
|
||||
|
||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# serial 1
|
||||
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
# If the C compiler in not in ANSI C mode by default, try to add an option
|
||||
# to output variable @code{CC} to make it so. This macro tries various
|
||||
# options that select ANSI C on some system or another. It considers the
|
||||
# compiler to be in ANSI C mode if it handles function prototypes correctly.
|
||||
#
|
||||
# If you use this macro, you should check after calling it whether the C
|
||||
# compiler has been set to accept ANSI C; if not, the shell variable
|
||||
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
||||
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
||||
# program @code{ansi2knr}, which comes with Ghostscript.
|
||||
# @end defmac
|
||||
|
||||
AC_DEFUN([AM_PROG_CC_STDC],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_BEFORE([$0], [AC_C_INLINE])
|
||||
AC_BEFORE([$0], [AC_C_CONST])
|
||||
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
|
||||
dnl a magic option to avoid problems with ANSI preprocessor commands
|
||||
dnl like #elif.
|
||||
dnl FIXME: can't do this because then AC_AIX won't work due to a
|
||||
dnl circular dependency.
|
||||
dnl AC_BEFORE([$0], [AC_PROG_CPP])
|
||||
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
|
||||
AC_CACHE_VAL(am_cv_prog_cc_stdc,
|
||||
[am_cv_prog_cc_stdc=no
|
||||
ac_save_CC="$CC"
|
||||
# Don't try gcc -ansi; that turns off useful extensions and
|
||||
# breaks some systems' header files.
|
||||
# AIX -qlanglvl=ansi
|
||||
# Ultrix and OSF/1 -std1
|
||||
# HP-UX 10.20 and later -Ae
|
||||
# HP-UX older versions -Aa -D_HPUX_SOURCE
|
||||
# SVR4 -Xc -D__EXTENSIONS__
|
||||
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
static char *e (p, i)
|
||||
char **p;
|
||||
int i;
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
static char *f (char * (*g) (char **, int), char **p, ...)
|
||||
{
|
||||
char *s;
|
||||
va_list v;
|
||||
va_start (v,p);
|
||||
s = g (p, va_arg (v,int));
|
||||
va_end (v);
|
||||
return s;
|
||||
}
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};
|
||||
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
||||
int argc;
|
||||
char **argv;
|
||||
], [
|
||||
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
||||
],
|
||||
[am_cv_prog_cc_stdc="$ac_arg"; break])
|
||||
done
|
||||
CC="$ac_save_CC"
|
||||
])
|
||||
if test -z "$am_cv_prog_cc_stdc"; then
|
||||
AC_MSG_RESULT([none needed])
|
||||
else
|
||||
AC_MSG_RESULT([$am_cv_prog_cc_stdc])
|
||||
fi
|
||||
case "x$am_cv_prog_cc_stdc" in
|
||||
x|xno) ;;
|
||||
*) CC="$CC $am_cv_prog_cc_stdc" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl written by Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
|
||||
dnl Version 1.3 (2001/03/02)
|
||||
dnl source http://www.gnu.org/software/ac-archive/Miscellaneous/ac_define_dir.html
|
||||
@@ -206,13 +98,22 @@ dnl to use a different cache variable name in this macro if it is invoked
|
||||
dnl in a different context somewhere else.
|
||||
dnl gcc_AC_CHECK_DECL(SYMBOL,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
|
||||
AC_DEFUN([gcc_AC_CHECK_DECL],
|
||||
[AC_MSG_CHECKING([whether $1 is declared])
|
||||
AC_CACHE_VAL(gcc_cv_have_decl_$1,
|
||||
[AC_TRY_COMPILE([$4],
|
||||
[#ifndef $1
|
||||
char *(*pfn) = (char *(*)) $1 ;
|
||||
#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
|
||||
AC_DEFUN(
|
||||
[gcc_AC_CHECK_DECL],
|
||||
[AC_MSG_CHECKING([whether $1 is declared])
|
||||
AC_CACHE_VAL(
|
||||
[gcc_cv_have_decl_$1],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[$4],
|
||||
[#ifndef $1
|
||||
char *(*pfn) = (char *(*)) $1 ;
|
||||
#endif]
|
||||
)],
|
||||
[eval "gcc_cv_have_decl_$1=yes"],
|
||||
[eval "gcc_cv_have_decl_$1=no"]
|
||||
)]
|
||||
)
|
||||
if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
|
||||
AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
|
||||
else
|
||||
@@ -267,7 +168,7 @@ AC_DEFUN([CY_AC_TCL_PRIVATE_HEADERS], [
|
||||
fi
|
||||
|
||||
if test x"${private_dir}" = x; then
|
||||
AC_ERROR(could not find private Tcl headers)
|
||||
AC_MSG_ERROR(could not find private Tcl headers)
|
||||
else
|
||||
TCL_PRIVATE_INCLUDE="-I${private_dir}"
|
||||
AC_MSG_RESULT(${private_dir})
|
||||
@@ -288,7 +189,7 @@ AC_DEFUN([CY_AC_TK_PRIVATE_HEADERS], [
|
||||
fi
|
||||
|
||||
if test x"${private_dir}" = x; then
|
||||
AC_ERROR(could not find Tk private headers)
|
||||
AC_MSG_ERROR(could not find Tk private headers)
|
||||
else
|
||||
TK_PRIVATE_INCLUDE="-I${private_dir}"
|
||||
AC_MSG_RESULT(${private_dir})
|
||||
@@ -359,13 +260,20 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [
|
||||
LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
|
||||
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
|
||||
LIBS="-lbfd -liberty -lz $intl $LIBS"
|
||||
AC_CACHE_CHECK([$1], [$2],
|
||||
[AC_TRY_LINK(
|
||||
[#include <stdlib.h>
|
||||
#include "bfd.h"
|
||||
#include "$4"
|
||||
],
|
||||
[return $3;], [[$2]=yes], [[$2]=no])])
|
||||
AC_CACHE_CHECK(
|
||||
[$1],
|
||||
[$2],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <stdlib.h>
|
||||
#include "bfd.h"
|
||||
#include "$4"],
|
||||
[return $3;]
|
||||
)],
|
||||
[[$2]=yes],
|
||||
[[$2]=no]
|
||||
)]
|
||||
)
|
||||
CFLAGS=$OLD_CFLAGS
|
||||
LDFLAGS=$OLD_LDFLAGS
|
||||
LIBS=$OLD_LIBS])
|
||||
|
||||
308
gdb/configure
vendored
308
gdb/configure
vendored
@@ -2986,6 +2986,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h:config.in"
|
||||
|
||||
|
||||
@@ -5024,88 +5025,6 @@ rm -rf conftest*
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
|
||||
$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
|
||||
if ${am_cv_prog_cc_stdc+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
am_cv_prog_cc_stdc=no
|
||||
ac_save_CC="$CC"
|
||||
# Don't try gcc -ansi; that turns off useful extensions and
|
||||
# breaks some systems' header files.
|
||||
# AIX -qlanglvl=ansi
|
||||
# Ultrix and OSF/1 -std1
|
||||
# HP-UX 10.20 and later -Ae
|
||||
# HP-UX older versions -Aa -D_HPUX_SOURCE
|
||||
# SVR4 -Xc -D__EXTENSIONS__
|
||||
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
static char *e (p, i)
|
||||
char **p;
|
||||
int i;
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
static char *f (char * (*g) (char **, int), char **p, ...)
|
||||
{
|
||||
char *s;
|
||||
va_list v;
|
||||
va_start (v,p);
|
||||
s = g (p, va_arg (v,int));
|
||||
va_end (v);
|
||||
return s;
|
||||
}
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};
|
||||
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
am_cv_prog_cc_stdc="$ac_arg"; break
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
CC="$ac_save_CC"
|
||||
|
||||
fi
|
||||
|
||||
if test -z "$am_cv_prog_cc_stdc"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
|
||||
$as_echo "none needed" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
|
||||
$as_echo "$am_cv_prog_cc_stdc" >&6; }
|
||||
fi
|
||||
case "x$am_cv_prog_cc_stdc" in
|
||||
x|xno) ;;
|
||||
*) CC="$CC $am_cv_prog_cc_stdc" ;;
|
||||
esac
|
||||
|
||||
# Expand $ac_aux_dir to an absolute path.
|
||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||
|
||||
@@ -5249,6 +5168,15 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
|
||||
|
||||
|
||||
# Set build, build_cpu, build_vendor and build_os.
|
||||
|
||||
|
||||
# Set host, host_cpu, host_vendor, and host_os.
|
||||
|
||||
|
||||
# Set target, target_cpu, target_vendor, and target_os.
|
||||
|
||||
|
||||
test "$program_prefix" != NONE &&
|
||||
program_transform_name="s&^&$program_prefix&;$program_transform_name"
|
||||
# Use a double $ so make ignores it.
|
||||
@@ -7263,12 +7191,12 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
extern char _etext;
|
||||
|
||||
extern char _etext;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
free (&_etext);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -7277,9 +7205,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_var__etext=yes
|
||||
else
|
||||
ac_cv_var__etext=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
|
||||
$as_echo "$ac_cv_var__etext" >&6; }
|
||||
@@ -7296,12 +7226,12 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
extern char etext;
|
||||
|
||||
extern char etext;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
free (&etext);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -7310,9 +7240,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_var_etext=yes
|
||||
else
|
||||
ac_cv_var_etext=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
|
||||
$as_echo "$ac_cv_var_etext" >&6; }
|
||||
@@ -7349,8 +7281,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_cc_supports_pg=yes
|
||||
else
|
||||
ac_cv_cc_supports_pg=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
|
||||
$as_echo "$ac_cv_cc_supports_pg" >&6; }
|
||||
@@ -9255,7 +9189,7 @@ fi
|
||||
|
||||
|
||||
if test "$with_system_readline" = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
|
||||
$as_echo_n "checking whether system readline is new enough... " >&6; }
|
||||
if ${gdb_cv_readline_ok+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -9263,13 +9197,14 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>
|
||||
#include <readline/readline.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if RL_VERSION_MAJOR < 7
|
||||
# error "readline version 7 required"
|
||||
#endif
|
||||
# error "readline version 7 required"
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -9278,8 +9213,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_readline_ok=yes
|
||||
else
|
||||
gdb_cv_readline_ok=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
|
||||
$as_echo "$gdb_cv_readline_ok" >&6; }
|
||||
@@ -10715,7 +10652,7 @@ fi
|
||||
|
||||
|
||||
if test "${python_prog_path}" = missing; then
|
||||
as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
|
||||
as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -10729,21 +10666,21 @@ fi
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
as_fn_error $? "failure running python-config --includes" "$LINENO" 5
|
||||
as_fn_error $? "failure running python-config --includes" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
|
||||
as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
|
||||
as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
else
|
||||
@@ -14295,13 +14232,14 @@ if ${gdb_cv_func_sigsetjmp+:} false; then :
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <setjmp.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
|
||||
sigjmp_buf env;
|
||||
while (! sigsetjmp (env, 1))
|
||||
siglongjmp (env, 1);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -14310,8 +14248,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_sigsetjmp=yes
|
||||
else
|
||||
gdb_cv_func_sigsetjmp=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
|
||||
$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
|
||||
@@ -15229,11 +15169,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;
|
||||
}
|
||||
@@ -15248,6 +15189,7 @@ int
|
||||
main ()
|
||||
{
|
||||
extern int ptrace ();
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -15256,25 +15198,29 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_ret='int'
|
||||
else
|
||||
gdb_cv_func_ptrace_ret='long'
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
|
||||
$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
|
||||
_ACEOF
|
||||
|
||||
|
||||
# Check argument types.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
|
||||
$as_echo_n "checking types of arguments for ptrace... " >&6; }
|
||||
if ${gdb_cv_func_ptrace_args+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
@@ -15282,6 +15228,7 @@ int
|
||||
main ()
|
||||
{
|
||||
extern long ptrace (enum __ptrace_request, ...);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -15289,20 +15236,17 @@ _ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
|
||||
else
|
||||
|
||||
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
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
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
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
extern $gdb_cv_func_ptrace_ret
|
||||
ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
|
||||
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
|
||||
|
||||
;
|
||||
return 0;
|
||||
@@ -15310,43 +15254,45 @@ extern $gdb_cv_func_ptrace_ret
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
|
||||
break 4;
|
||||
break 4;
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
for gdb_arg5 in 'int *' 'int' 'long'; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
|
||||
for gdb_arg5 in 'int *' 'int' 'long'; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
extern $gdb_cv_func_ptrace_ret
|
||||
ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
|
||||
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
|
||||
break 5;
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
|
||||
break 5;
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
|
||||
$as_echo "$gdb_cv_func_ptrace_args" >&6; }
|
||||
|
||||
ac_save_IFS=$IFS; IFS=','
|
||||
set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
|
||||
IFS=$ac_save_IFS
|
||||
@@ -15424,17 +15370,14 @@ if ${ac_cv_func_setpgrp_void+:} false; then :
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
if (setpgrp(1,1) == -1)
|
||||
exit (0);
|
||||
else
|
||||
exit (1);
|
||||
if (setpgrp(1,1) == -1)
|
||||
exit (0);
|
||||
else
|
||||
exit (1);
|
||||
|
||||
;
|
||||
return 0;
|
||||
@@ -15444,8 +15387,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_func_setpgrp_void=no
|
||||
else
|
||||
ac_cv_func_setpgrp_void=yes
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
|
||||
$as_echo "$ac_cv_func_setpgrp_void" >&6; }
|
||||
@@ -15472,9 +15417,10 @@ int
|
||||
main ()
|
||||
{
|
||||
#define REGEX_INTERFACE_VERSION 1
|
||||
#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
|
||||
# error "Version mismatch"
|
||||
#endif
|
||||
#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
|
||||
# error "Version mismatch"
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -15483,8 +15429,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_have_gnu_regex=yes
|
||||
else
|
||||
gdb_cv_have_gnu_regex=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
|
||||
$as_echo "$gdb_cv_have_gnu_regex" >&6; }
|
||||
@@ -15530,12 +15478,13 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/param.h>
|
||||
#define _KMEMUSER
|
||||
#include <sys/lwp.h>
|
||||
#define _KMEMUSER
|
||||
#include <sys/lwp.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct lwp l;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -15544,8 +15493,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_struct_lwp=yes
|
||||
else
|
||||
gdb_cv_struct_lwp=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
|
||||
$as_echo "$gdb_cv_struct_lwp" >&6; }
|
||||
@@ -15564,11 +15515,12 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/types.h>
|
||||
#include <machine/reg.h>
|
||||
#include <machine/reg.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct reg r;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -15577,8 +15529,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_struct_reg=yes
|
||||
else
|
||||
gdb_cv_struct_reg=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
|
||||
$as_echo "$gdb_cv_struct_reg" >&6; }
|
||||
@@ -15635,8 +15589,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_have_ptrace_getregs=yes
|
||||
else
|
||||
gdb_cv_have_ptrace_getregs=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
|
||||
@@ -15668,8 +15624,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_have_ptrace_getfpxregs=yes
|
||||
else
|
||||
gdb_cv_have_ptrace_getfpxregs=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
|
||||
@@ -15689,11 +15647,12 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/types.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/ptrace.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
PT_GETDBREGS;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -15702,8 +15661,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_have_pt_getdbregs=yes
|
||||
else
|
||||
gdb_cv_have_pt_getdbregs=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
|
||||
@@ -15723,11 +15684,12 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/types.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/ptrace.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
PT_GETXMMREGS;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -15736,8 +15698,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_have_pt_getxmmregs=yes
|
||||
else
|
||||
gdb_cv_have_pt_getxmmregs=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
|
||||
@@ -16020,16 +15984,15 @@ $as_echo_n "checking for -bbigtoc option... " >&6; }
|
||||
if ${gdb_cv_bigtoc+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
SAVE_LDFLAGS=$LDFLAGS
|
||||
|
||||
SAVE_LDFLAGS=$LDFLAGS
|
||||
case $GCC in
|
||||
yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
|
||||
*) gdb_cv_bigtoc=-bbigtoc ;;
|
||||
esac
|
||||
|
||||
case $GCC in
|
||||
yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
|
||||
*) gdb_cv_bigtoc=-bbigtoc ;;
|
||||
esac
|
||||
|
||||
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
@@ -16044,10 +16007,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||
|
||||
else
|
||||
gdb_cv_bigtoc=
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LDFLAGS="${SAVE_LDFLAGS}"
|
||||
LDFLAGS="${SAVE_LDFLAGS}"
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
|
||||
@@ -16159,8 +16123,9 @@ int
|
||||
main ()
|
||||
{
|
||||
#ifndef PTHDB_VERSION_3
|
||||
#error
|
||||
#endif
|
||||
#error
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -16169,8 +16134,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_have_aix_thread_debug=yes
|
||||
else
|
||||
gdb_cv_have_aix_thread_debug=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
|
||||
@@ -16202,7 +16169,7 @@ _ACEOF
|
||||
fi
|
||||
|
||||
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
|
||||
$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
|
||||
if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -16214,6 +16181,7 @@ int
|
||||
main ()
|
||||
{
|
||||
int i = TD_NOTALLOC;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -16229,7 +16197,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
|
||||
$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
|
||||
$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
|
||||
if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -16241,6 +16210,7 @@ int
|
||||
main ()
|
||||
{
|
||||
int i = TD_VERSION;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -16256,7 +16226,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
|
||||
$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
|
||||
$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
|
||||
if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -16268,6 +16239,7 @@ int
|
||||
main ()
|
||||
{
|
||||
int i = TD_NOTLS;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -16594,13 +16566,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;
|
||||
}
|
||||
@@ -16682,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
|
||||
@@ -16771,13 +16745,13 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
#include "bfd.h"
|
||||
#include "elf-bfd.h"
|
||||
|
||||
#include "bfd.h"
|
||||
#include "elf-bfd.h"
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return bfd_get_elf_phdr_upper_bound (NULL);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -16786,9 +16760,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||
gdb_cv_var_elf=yes
|
||||
else
|
||||
gdb_cv_var_elf=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
|
||||
$as_echo "$gdb_cv_var_elf" >&6; }
|
||||
@@ -16882,13 +16858,13 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
#include "bfd.h"
|
||||
#include "mach-o.h"
|
||||
|
||||
#include "bfd.h"
|
||||
#include "mach-o.h"
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return bfd_mach_o_lookup_command (NULL, 0, NULL);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -16897,9 +16873,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||
gdb_cv_var_macho=yes
|
||||
else
|
||||
gdb_cv_var_macho=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
|
||||
$as_echo "$gdb_cv_var_macho" >&6; }
|
||||
|
||||
374
gdb/configure.ac
374
gdb/configure.ac
@@ -20,7 +20,8 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
m4_include(../config/debuginfod.m4)
|
||||
|
||||
AC_INIT(main.c)
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([main.c])
|
||||
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
@@ -29,11 +30,19 @@ AC_PROG_CXX
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
ACX_LARGEFILE
|
||||
AM_PROG_CC_STDC
|
||||
AM_PROG_INSTALL_STRIP
|
||||
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
# Set build, build_cpu, build_vendor and build_os.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
# Set host, host_cpu, host_vendor, and host_os.
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# Set target, target_cpu, target_vendor, and target_os.
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
# We require a C++11 compiler. Check if one is available, and if
|
||||
@@ -149,7 +158,7 @@ AC_CONFIG_SUBDIRS(testsuite)
|
||||
AC_ARG_ENABLE(targets,
|
||||
AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]),
|
||||
[case "${enableval}" in
|
||||
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
|
||||
yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
|
||||
;;
|
||||
no) enable_targets= ;;
|
||||
*) enable_targets=$enableval ;;
|
||||
@@ -383,22 +392,36 @@ AS_HELP_STRING([--enable-profiling], [enable profiling of GDB]),
|
||||
[enable_profiling=no])
|
||||
|
||||
AC_CHECK_FUNCS(monstartup _mcleanup)
|
||||
AC_CACHE_CHECK([for _etext], ac_cv_var__etext,
|
||||
[AC_TRY_LINK(
|
||||
[#include <stdlib.h>
|
||||
extern char _etext;
|
||||
],
|
||||
[free (&_etext);], ac_cv_var__etext=yes, ac_cv_var__etext=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[for _etext],
|
||||
[ac_cv_var__etext],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <stdlib.h>
|
||||
extern char _etext;],
|
||||
[free (&_etext);]
|
||||
)],
|
||||
[ac_cv_var__etext=yes],
|
||||
[ac_cv_var__etext=no]
|
||||
)]
|
||||
)
|
||||
if test "$ac_cv_var__etext" = yes; then
|
||||
AC_DEFINE(HAVE__ETEXT, 1,
|
||||
[Define to 1 if your system has the _etext variable. ])
|
||||
fi
|
||||
AC_CACHE_CHECK([for etext], ac_cv_var_etext,
|
||||
[AC_TRY_LINK(
|
||||
[#include <stdlib.h>
|
||||
extern char etext;
|
||||
],
|
||||
[free (&etext);], ac_cv_var_etext=yes, ac_cv_var_etext=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[for etext],
|
||||
[ac_cv_var_etext],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <stdlib.h>
|
||||
extern char etext;],
|
||||
[free (&etext);]
|
||||
)],
|
||||
[ac_cv_var_etext=yes],
|
||||
[ac_cv_var_etext=no]
|
||||
)]
|
||||
)
|
||||
if test "$ac_cv_var_etext" = yes; then
|
||||
AC_DEFINE(HAVE_ETEXT, 1,
|
||||
[Define to 1 if your system has the etext variable. ])
|
||||
@@ -411,9 +434,15 @@ if test "$enable_profiling" = yes ; then
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PROFILE_CFLAGS"
|
||||
|
||||
AC_CACHE_CHECK([whether $CC supports -pg], ac_cv_cc_supports_pg,
|
||||
[AC_TRY_COMPILE([], [int x;], ac_cv_cc_supports_pg=yes,
|
||||
ac_cv_cc_supports_pg=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[whether $CC supports -pg],
|
||||
[ac_cv_cc_supports_pg],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([], [int x;])],
|
||||
[ac_cv_cc_supports_pg=yes],
|
||||
[ac_cv_cc_supports_pg=no]
|
||||
)]
|
||||
)
|
||||
|
||||
if test "$ac_cv_cc_supports_pg" = no; then
|
||||
AC_MSG_ERROR(--enable-profiling requires a compiler which supports -pg)
|
||||
@@ -566,16 +595,21 @@ AC_ARG_WITH([system-readline],
|
||||
[use installed readline library])])
|
||||
|
||||
if test "$with_system_readline" = yes; then
|
||||
AC_CACHE_CHECK([whether system readline is new enough],
|
||||
[gdb_cv_readline_ok],
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <stdio.h>
|
||||
#include <readline/readline.h>],
|
||||
[#if RL_VERSION_MAJOR < 7
|
||||
# error "readline version 7 required"
|
||||
#endif],
|
||||
gdb_cv_readline_ok=yes,
|
||||
gdb_cv_readline_ok=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[whether system readline is new enough],
|
||||
[gdb_cv_readline_ok],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <stdio.h>
|
||||
#include <readline/readline.h>],
|
||||
[#if RL_VERSION_MAJOR < 7
|
||||
# error "readline version 7 required"
|
||||
#endif]
|
||||
)],
|
||||
[gdb_cv_readline_ok=yes],
|
||||
[gdb_cv_readline_ok=no]
|
||||
)]
|
||||
)
|
||||
if test "$gdb_cv_readline_ok" != yes; then
|
||||
AC_MSG_ERROR([system readline is not new enough])
|
||||
fi
|
||||
@@ -770,12 +804,12 @@ else
|
||||
python_prog=${with_python}
|
||||
python_prefix=
|
||||
else
|
||||
AC_ERROR(invalid value for --with-python)
|
||||
AC_MSG_ERROR(invalid value for --with-python)
|
||||
fi
|
||||
;;
|
||||
*/*)
|
||||
# Disallow --with-python=foo/bar.
|
||||
AC_ERROR(invalid value for --with-python)
|
||||
AC_MSG_ERROR(invalid value for --with-python)
|
||||
;;
|
||||
*)
|
||||
# The user has either specified auto, yes, or the name of the python
|
||||
@@ -803,7 +837,7 @@ else
|
||||
python_prog="${with_python}"
|
||||
AC_PATH_PROG(python_prog_path, ${python_prog}, missing)
|
||||
if test "${python_prog_path}" = missing; then
|
||||
AC_ERROR(unable to find python program ${python_prog})
|
||||
AC_MSG_ERROR(unable to find python program ${python_prog})
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -817,21 +851,21 @@ else
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
AC_ERROR(failure running python-config --includes)
|
||||
AC_MSG_ERROR(failure running python-config --includes)
|
||||
fi
|
||||
fi
|
||||
python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
AC_ERROR(failure running python-config --ldflags)
|
||||
AC_MSG_ERROR(failure running python-config --ldflags)
|
||||
fi
|
||||
fi
|
||||
python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
|
||||
if test $? != 0; then
|
||||
have_python_config=failed
|
||||
if test "${with_python}" != auto; then
|
||||
AC_ERROR(failure running python-config --exec-prefix)
|
||||
AC_MSG_ERROR(failure running python-config --exec-prefix)
|
||||
fi
|
||||
fi
|
||||
else
|
||||
@@ -936,7 +970,11 @@ if test "${have_libpython}" != no; then
|
||||
# Check that the compiler accepts it
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
AC_TRY_COMPILE([],[],PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag",)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([], [])],
|
||||
[PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"],
|
||||
[]
|
||||
)
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
done
|
||||
AC_MSG_RESULT(${PYTHON_CFLAGS})
|
||||
@@ -1297,15 +1335,21 @@ dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
|
||||
if test "$cross_compiling" = no; then
|
||||
AC_FUNC_SETPGRP
|
||||
else
|
||||
AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <unistd.h>
|
||||
], [
|
||||
if (setpgrp(1,1) == -1)
|
||||
exit (0);
|
||||
else
|
||||
exit (1);
|
||||
], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
|
||||
AC_CACHE_CHECK(
|
||||
[whether setpgrp takes no argument],
|
||||
[ac_cv_func_setpgrp_void],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <unistd.h>],
|
||||
[if (setpgrp(1,1) == -1)
|
||||
exit (0);
|
||||
else
|
||||
exit (1);]
|
||||
)],
|
||||
[ac_cv_func_setpgrp_void=no],
|
||||
[ac_cv_func_setpgrp_void=yes]
|
||||
)]
|
||||
)
|
||||
if test "$ac_cv_func_setpgrp_void" = yes; then
|
||||
AC_DEFINE(SETPGRP_VOID, 1)
|
||||
fi
|
||||
@@ -1319,14 +1363,18 @@ gdb_use_included_regex=yes
|
||||
AC_CACHE_CHECK(
|
||||
[for GNU regex],
|
||||
[gdb_cv_have_gnu_regex],
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <gnu-versions.h>],
|
||||
[#define REGEX_INTERFACE_VERSION 1
|
||||
#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
|
||||
# error "Version mismatch"
|
||||
#endif],
|
||||
gdb_cv_have_gnu_regex=yes,
|
||||
gdb_cv_have_gnu_regex=no)])
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <gnu-versions.h>],
|
||||
[#define REGEX_INTERFACE_VERSION 1
|
||||
#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
|
||||
# error "Version mismatch"
|
||||
#endif]
|
||||
)],
|
||||
[gdb_cv_have_gnu_regex=yes],
|
||||
[gdb_cv_have_gnu_regex=no]
|
||||
)]
|
||||
)
|
||||
if test "$gdb_cv_have_gnu_regex" = yes; then
|
||||
gdb_use_included_regex=no
|
||||
fi
|
||||
@@ -1347,21 +1395,39 @@ AC_CHECK_MEMBERS([struct thread.td_pcb], [], [],
|
||||
])
|
||||
|
||||
# See if <sys/lwp.h> defines `struct lwp`.
|
||||
AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
|
||||
[AC_TRY_COMPILE([#include <sys/param.h>
|
||||
#define _KMEMUSER
|
||||
#include <sys/lwp.h>], [struct lwp l;],
|
||||
gdb_cv_struct_lwp=yes, gdb_cv_struct_lwp=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[for struct lwp],
|
||||
[gdb_cv_struct_lwp],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/param.h>
|
||||
#define _KMEMUSER
|
||||
#include <sys/lwp.h>],
|
||||
[struct lwp l;]
|
||||
)],
|
||||
[gdb_cv_struct_lwp=yes],
|
||||
[gdb_cv_struct_lwp=no]
|
||||
)]
|
||||
)
|
||||
if test "$gdb_cv_struct_lwp" = yes; then
|
||||
AC_DEFINE(HAVE_STRUCT_LWP, 1,
|
||||
[Define to 1 if your system has struct lwp.])
|
||||
fi
|
||||
|
||||
# See if <machine/reg.h> degines `struct reg'.
|
||||
AC_CACHE_CHECK([for struct reg in machine/reg.h], gdb_cv_struct_reg,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <machine/reg.h>], [struct reg r;],
|
||||
gdb_cv_struct_reg=yes, gdb_cv_struct_reg=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[for struct reg in machine/reg.h],
|
||||
[gdb_cv_struct_reg],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/types.h>
|
||||
#include <machine/reg.h>],
|
||||
[struct reg r;]
|
||||
)],
|
||||
[gdb_cv_struct_reg=yes],
|
||||
[gdb_cv_struct_reg=no]
|
||||
)]
|
||||
)
|
||||
if test "$gdb_cv_struct_reg" = yes; then
|
||||
AC_DEFINE(HAVE_STRUCT_REG, 1,
|
||||
[Define to 1 if your system has struct reg in <machine/reg.h>.])
|
||||
@@ -1375,11 +1441,14 @@ AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
|
||||
|
||||
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
|
||||
AC_MSG_CHECKING(for PTRACE_GETREGS)
|
||||
AC_CACHE_VAL(gdb_cv_have_ptrace_getregs,
|
||||
[AC_TRY_COMPILE([#include <sys/ptrace.h>],
|
||||
[PTRACE_GETREGS;],
|
||||
[gdb_cv_have_ptrace_getregs=yes],
|
||||
[gdb_cv_have_ptrace_getregs=no])])
|
||||
AC_CACHE_VAL(
|
||||
[gdb_cv_have_ptrace_getregs],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETREGS;])],
|
||||
[gdb_cv_have_ptrace_getregs=yes],
|
||||
[gdb_cv_have_ptrace_getregs=no]
|
||||
)]
|
||||
)
|
||||
AC_MSG_RESULT($gdb_cv_have_ptrace_getregs)
|
||||
if test "$gdb_cv_have_ptrace_getregs" = yes; then
|
||||
AC_DEFINE(HAVE_PTRACE_GETREGS, 1,
|
||||
@@ -1388,11 +1457,14 @@ fi
|
||||
|
||||
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
|
||||
AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
|
||||
AC_CACHE_VAL(gdb_cv_have_ptrace_getfpxregs,
|
||||
[AC_TRY_COMPILE([#include <sys/ptrace.h>],
|
||||
[PTRACE_GETFPXREGS;],
|
||||
[gdb_cv_have_ptrace_getfpxregs=yes],
|
||||
[gdb_cv_have_ptrace_getfpxregs=no])])
|
||||
AC_CACHE_VAL(
|
||||
[gdb_cv_have_ptrace_getfpxregs],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETFPXREGS;])],
|
||||
[gdb_cv_have_ptrace_getfpxregs=yes],
|
||||
[gdb_cv_have_ptrace_getfpxregs=no]
|
||||
)]
|
||||
)
|
||||
AC_MSG_RESULT($gdb_cv_have_ptrace_getfpxregs)
|
||||
if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
|
||||
AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1,
|
||||
@@ -1401,12 +1473,18 @@ fi
|
||||
|
||||
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
|
||||
AC_MSG_CHECKING(for PT_GETDBREGS)
|
||||
AC_CACHE_VAL(gdb_cv_have_pt_getdbregs,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/ptrace.h>],
|
||||
[PT_GETDBREGS;],
|
||||
[gdb_cv_have_pt_getdbregs=yes],
|
||||
[gdb_cv_have_pt_getdbregs=no])])
|
||||
AC_CACHE_VAL(
|
||||
[gdb_cv_have_pt_getdbregs],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/types.h>
|
||||
#include <sys/ptrace.h>],
|
||||
[PT_GETDBREGS;]
|
||||
)],
|
||||
[gdb_cv_have_pt_getdbregs=yes],
|
||||
[gdb_cv_have_pt_getdbregs=no]
|
||||
)]
|
||||
)
|
||||
AC_MSG_RESULT($gdb_cv_have_pt_getdbregs)
|
||||
if test "$gdb_cv_have_pt_getdbregs" = yes; then
|
||||
AC_DEFINE(HAVE_PT_GETDBREGS, 1,
|
||||
@@ -1415,12 +1493,18 @@ fi
|
||||
|
||||
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
|
||||
AC_MSG_CHECKING(for PT_GETXMMREGS)
|
||||
AC_CACHE_VAL(gdb_cv_have_pt_getxmmregs,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/ptrace.h>],
|
||||
[PT_GETXMMREGS;],
|
||||
[gdb_cv_have_pt_getxmmregs=yes],
|
||||
[gdb_cv_have_pt_getxmmregs=no])])
|
||||
AC_CACHE_VAL(
|
||||
[gdb_cv_have_pt_getxmmregs],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/types.h>
|
||||
#include <sys/ptrace.h>],
|
||||
[PT_GETXMMREGS;]
|
||||
)],
|
||||
[gdb_cv_have_pt_getxmmregs=yes],
|
||||
[gdb_cv_have_pt_getxmmregs=no]
|
||||
)]
|
||||
)
|
||||
AC_MSG_RESULT($gdb_cv_have_pt_getxmmregs)
|
||||
if test "$gdb_cv_have_pt_getxmmregs" = yes; then
|
||||
AC_DEFINE(HAVE_PT_GETXMMREGS, 1,
|
||||
@@ -1543,18 +1627,23 @@ fi
|
||||
|
||||
case ${host_os} in
|
||||
aix*)
|
||||
AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [
|
||||
SAVE_LDFLAGS=$LDFLAGS
|
||||
AC_CACHE_CHECK(
|
||||
[for -bbigtoc option], [gdb_cv_bigtoc],
|
||||
[SAVE_LDFLAGS=$LDFLAGS
|
||||
|
||||
case $GCC in
|
||||
yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
|
||||
*) gdb_cv_bigtoc=-bbigtoc ;;
|
||||
esac
|
||||
case $GCC in
|
||||
yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
|
||||
*) gdb_cv_bigtoc=-bbigtoc ;;
|
||||
esac
|
||||
|
||||
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
|
||||
AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=])
|
||||
LDFLAGS="${SAVE_LDFLAGS}"
|
||||
])
|
||||
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([], [int i;])],
|
||||
[],
|
||||
[gdb_cv_bigtoc=]
|
||||
)
|
||||
LDFLAGS="${SAVE_LDFLAGS}"]
|
||||
)
|
||||
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
|
||||
;;
|
||||
esac
|
||||
@@ -1570,7 +1659,11 @@ if test "${gdb_native}" = yes; then
|
||||
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
||||
LDFLAGS="$LDFLAGS $RDYNAMIC"
|
||||
if test "${have_libpython}" = no; then
|
||||
AC_TRY_LINK([], [], [dynamic_list=true])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([], [])],
|
||||
[dynamic_list=true],
|
||||
[]
|
||||
)
|
||||
else
|
||||
# Workaround http://bugs.python.org/issue4434 where static
|
||||
# libpythonX.Y.a would get its symbols required for
|
||||
@@ -1623,13 +1716,19 @@ if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
|
||||
case ${host_os} in
|
||||
aix*)
|
||||
AC_MSG_CHECKING(for AiX thread debugging library)
|
||||
AC_CACHE_VAL(gdb_cv_have_aix_thread_debug,
|
||||
[AC_TRY_COMPILE([#include <sys/pthdebug.h>],
|
||||
[#ifndef PTHDB_VERSION_3
|
||||
#error
|
||||
#endif],
|
||||
gdb_cv_have_aix_thread_debug=yes,
|
||||
gdb_cv_have_aix_thread_debug=no)])
|
||||
AC_CACHE_VAL(
|
||||
[gdb_cv_have_aix_thread_debug],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/pthdebug.h>],
|
||||
[#ifndef PTHDB_VERSION_3
|
||||
#error
|
||||
#endif]
|
||||
)],
|
||||
[gdb_cv_have_aix_thread_debug=yes],
|
||||
[gdb_cv_have_aix_thread_debug=no]
|
||||
)]
|
||||
)
|
||||
AC_MSG_RESULT($gdb_cv_have_aix_thread_debug)
|
||||
if test "$gdb_cv_have_aix_thread_debug" = yes; then
|
||||
CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
|
||||
@@ -1649,33 +1748,44 @@ fi
|
||||
dnl See if we have a thread_db header file that has TD_NOTALLOC and
|
||||
dnl other error codes.
|
||||
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
|
||||
AC_CACHE_CHECK([whether <thread_db.h> has TD_NOTALLOC],
|
||||
gdb_cv_thread_db_h_has_td_notalloc,
|
||||
AC_TRY_COMPILE(
|
||||
[#include <thread_db.h>],
|
||||
[int i = TD_NOTALLOC;],
|
||||
gdb_cv_thread_db_h_has_td_notalloc=yes,
|
||||
gdb_cv_thread_db_h_has_td_notalloc=no
|
||||
)
|
||||
)
|
||||
AC_CACHE_CHECK([whether <thread_db.h> has TD_VERSION],
|
||||
gdb_cv_thread_db_h_has_td_version,
|
||||
AC_TRY_COMPILE(
|
||||
[#include <thread_db.h>],
|
||||
[int i = TD_VERSION;],
|
||||
gdb_cv_thread_db_h_has_td_version=yes,
|
||||
gdb_cv_thread_db_h_has_td_version=no
|
||||
)
|
||||
)
|
||||
AC_CACHE_CHECK([whether <thread_db.h> has TD_NOTLS],
|
||||
gdb_cv_thread_db_h_has_td_notls,
|
||||
AC_TRY_COMPILE(
|
||||
[#include <thread_db.h>],
|
||||
[int i = TD_NOTLS;],
|
||||
gdb_cv_thread_db_h_has_td_notls=yes,
|
||||
gdb_cv_thread_db_h_has_td_notls=no
|
||||
)
|
||||
)
|
||||
AC_CACHE_CHECK(
|
||||
[whether <thread_db.h> has TD_NOTALLOC],
|
||||
[gdb_cv_thread_db_h_has_td_notalloc],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <thread_db.h>],
|
||||
[int i = TD_NOTALLOC;]
|
||||
)],
|
||||
[gdb_cv_thread_db_h_has_td_notalloc=yes],
|
||||
[gdb_cv_thread_db_h_has_td_notalloc=no]
|
||||
)]
|
||||
)
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[whether <thread_db.h> has TD_VERSION],
|
||||
[gdb_cv_thread_db_h_has_td_version],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <thread_db.h>],
|
||||
[int i = TD_VERSION;]
|
||||
)],
|
||||
[gdb_cv_thread_db_h_has_td_version=yes],
|
||||
[gdb_cv_thread_db_h_has_td_version=no]
|
||||
)]
|
||||
)
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[whether <thread_db.h> has TD_NOTLS],
|
||||
[gdb_cv_thread_db_h_has_td_notls],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <thread_db.h>],
|
||||
[int i = TD_NOTLS;]
|
||||
)],
|
||||
[gdb_cv_thread_db_h_has_td_notls=yes],
|
||||
[gdb_cv_thread_db_h_has_td_notls=no]
|
||||
)]
|
||||
)
|
||||
fi
|
||||
if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
|
||||
AC_DEFINE(THREAD_DB_HAS_TD_NOTALLOC, 1,
|
||||
@@ -2021,7 +2131,7 @@ fi
|
||||
|
||||
# Check for babeltrace and babeltrace-ctf
|
||||
AC_ARG_WITH(babeltrace,
|
||||
AC_HELP_STRING([--with-babeltrace], [include babeltrace support (auto/yes/no)]),
|
||||
AS_HELP_STRING([--with-babeltrace], [include babeltrace support (auto/yes/no)]),
|
||||
[], [with_babeltrace=auto])
|
||||
AC_MSG_CHECKING([whether to use babeltrace])
|
||||
AC_MSG_RESULT([$with_babeltrace])
|
||||
@@ -2064,7 +2174,7 @@ fi
|
||||
|
||||
# Check for xxhash
|
||||
AC_ARG_WITH(xxhash,
|
||||
AC_HELP_STRING([--with-xxhash], [use libxxhash for hashing (faster) (auto/yes/no)]),
|
||||
AS_HELP_STRING([--with-xxhash], [use libxxhash for hashing (faster) (auto/yes/no)]),
|
||||
[], [with_xxhash=auto])
|
||||
|
||||
GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
|
||||
@@ -2125,7 +2235,7 @@ dnl Add dependency for xsltproc if building with maintainer-mode enabled.
|
||||
AC_PATH_PROGS(XSLTPROC, xsltproc, missing)
|
||||
if test "x$USE_MAINTAINER_MODE" = xyes; then
|
||||
if test "${XSLTPROC}" = missing; then
|
||||
AC_ERROR(unable to find xsltproc. maintainer-mode requires xsltproc.)
|
||||
AC_MSG_ERROR(unable to find xsltproc. maintainer-mode requires xsltproc.)
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(XSLTPROC)
|
||||
|
||||
@@ -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
|
||||
|
||||
1
gdb/testsuite/configure
vendored
1
gdb/testsuite/configure
vendored
@@ -2008,6 +2008,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
ac_aux_dir=
|
||||
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
|
||||
if test -f "$ac_dir/install-sh"; then
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_INIT(gdb.base)
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([gdb.base])
|
||||
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
@@ -42,18 +42,20 @@ m4_include(../config/gettext-sister.m4)
|
||||
dnl Check for existence of a type $1 in libthread_db.h
|
||||
dnl Based on BFD_HAVE_SYS_PROCFS_TYPE in bfd/bfd.m4.
|
||||
|
||||
AC_DEFUN([GDBSERVER_HAVE_THREAD_DB_TYPE],
|
||||
[AC_MSG_CHECKING([for $1 in thread_db.h])
|
||||
AC_CACHE_VAL(gdbserver_cv_have_thread_db_type_$1,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <thread_db.h>],
|
||||
[$1 avar],
|
||||
gdbserver_cv_have_thread_db_type_$1=yes,
|
||||
gdbserver_cv_have_thread_db_type_$1=no
|
||||
)])
|
||||
if test $gdbserver_cv_have_thread_db_type_$1 = yes; then
|
||||
AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
|
||||
[Define if <thread_db.h> has $1.])
|
||||
fi
|
||||
AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1)
|
||||
])
|
||||
AC_DEFUN(
|
||||
[GDBSERVER_HAVE_THREAD_DB_TYPE],
|
||||
[AC_MSG_CHECKING([for $1 in thread_db.h])
|
||||
AC_CACHE_VAL(
|
||||
[gdbserver_cv_have_thread_db_type_$1],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <thread_db.h>], [$1 avar])],
|
||||
[gdbserver_cv_have_thread_db_type_$1=yes],
|
||||
[gdbserver_cv_have_thread_db_type_$1=no]
|
||||
)]
|
||||
)
|
||||
if test $gdbserver_cv_have_thread_db_type_$1 = yes; then
|
||||
AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
|
||||
[Define if <thread_db.h> has $1.])
|
||||
fi
|
||||
AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1)]
|
||||
)
|
||||
|
||||
141
gdbserver/configure
vendored
141
gdbserver/configure
vendored
@@ -2713,6 +2713,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h:config.in"
|
||||
|
||||
|
||||
@@ -4245,7 +4246,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
|
||||
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-largefile was given.
|
||||
if test "${enable_largefile+set}" = set; then :
|
||||
enableval=$enable_largefile;
|
||||
@@ -4588,6 +4588,7 @@ fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
|
||||
|
||||
# Set build, build_cpu, build_vendor and build_os.
|
||||
# Make sure we can run config.sub.
|
||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
|
||||
@@ -4626,6 +4627,8 @@ IFS=$ac_save_IFS
|
||||
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
# Set host, host_cpu, host_vendor, and host_os.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
|
||||
$as_echo_n "checking host system type... " >&6; }
|
||||
if ${ac_cv_host+:} false; then :
|
||||
@@ -4659,6 +4662,8 @@ IFS=$ac_save_IFS
|
||||
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
# Set target, target_cpu, target_vendor, and target_os.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
|
||||
$as_echo_n "checking target system type... " >&6; }
|
||||
if ${ac_cv_target+:} false; then :
|
||||
@@ -4699,7 +4704,6 @@ test -n "$target_alias" &&
|
||||
NONENONEs,x,x, &&
|
||||
program_prefix=${target_alias}-
|
||||
|
||||
|
||||
# Find a good install program. We prefer a C program (faster),
|
||||
# so one script is as good as another. But avoid the broken or
|
||||
# incompatible versions:
|
||||
@@ -8025,13 +8029,14 @@ if ${gdb_cv_func_sigsetjmp+:} false; then :
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <setjmp.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
|
||||
sigjmp_buf env;
|
||||
while (! sigsetjmp (env, 1))
|
||||
siglongjmp (env, 1);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -8040,8 +8045,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_sigsetjmp=yes
|
||||
else
|
||||
gdb_cv_func_sigsetjmp=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
|
||||
$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
|
||||
@@ -9444,11 +9451,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;
|
||||
}
|
||||
@@ -9463,6 +9471,7 @@ int
|
||||
main ()
|
||||
{
|
||||
extern int ptrace ();
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -9471,25 +9480,29 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_ret='int'
|
||||
else
|
||||
gdb_cv_func_ptrace_ret='long'
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
|
||||
$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
|
||||
_ACEOF
|
||||
|
||||
|
||||
# Check argument types.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
|
||||
$as_echo_n "checking types of arguments for ptrace... " >&6; }
|
||||
if ${gdb_cv_func_ptrace_args+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
@@ -9497,6 +9510,7 @@ int
|
||||
main ()
|
||||
{
|
||||
extern long ptrace (enum __ptrace_request, ...);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -9504,20 +9518,17 @@ _ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
|
||||
else
|
||||
|
||||
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
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
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
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
extern $gdb_cv_func_ptrace_ret
|
||||
ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
|
||||
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
|
||||
|
||||
;
|
||||
return 0;
|
||||
@@ -9525,43 +9536,45 @@ extern $gdb_cv_func_ptrace_ret
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
|
||||
break 4;
|
||||
break 4;
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
for gdb_arg5 in 'int *' 'int' 'long'; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
|
||||
for gdb_arg5 in 'int *' 'int' 'long'; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
extern $gdb_cv_func_ptrace_ret
|
||||
ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
|
||||
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
|
||||
break 5;
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
|
||||
break 5;
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
|
||||
$as_echo "$gdb_cv_func_ptrace_args" >&6; }
|
||||
|
||||
ac_save_IFS=$IFS; IFS=','
|
||||
set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
|
||||
IFS=$ac_save_IFS
|
||||
@@ -9649,6 +9662,7 @@ int
|
||||
main ()
|
||||
{
|
||||
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -9656,11 +9670,14 @@ _ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; };
|
||||
|
||||
$as_echo "#define HAVE_UST 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }; ustlibs= ; ustinc=
|
||||
$as_echo "no" >&6; }
|
||||
ustlibs= ; ustinc=
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
@@ -9806,13 +9823,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;
|
||||
}
|
||||
@@ -10310,8 +10328,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdbsrv_cv_have_ptrace_getregs=yes
|
||||
else
|
||||
gdbsrv_cv_have_ptrace_getregs=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
|
||||
@@ -10342,8 +10362,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdbsrv_cv_have_ptrace_getfpxregs=yes
|
||||
else
|
||||
gdbsrv_cv_have_ptrace_getfpxregs=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
|
||||
@@ -10364,12 +10386,11 @@ fi
|
||||
if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
|
||||
$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
|
||||
if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
|
||||
if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <thread_db.h>
|
||||
int
|
||||
main ()
|
||||
@@ -10386,14 +10407,15 @@ else
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
|
||||
if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
|
||||
|
||||
$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
|
||||
$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
|
||||
|
||||
fi
|
||||
@@ -10401,12 +10423,11 @@ fi
|
||||
if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
|
||||
$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
|
||||
if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
|
||||
if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <thread_db.h>
|
||||
int
|
||||
main ()
|
||||
@@ -10423,14 +10444,15 @@ else
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
|
||||
if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
|
||||
|
||||
$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
|
||||
$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
|
||||
|
||||
fi
|
||||
@@ -10509,11 +10531,11 @@ main ()
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
found="-Wl,--dynamic-list"
|
||||
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
|
||||
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
|
||||
else
|
||||
RDYNAMIC="-rdynamic"
|
||||
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
@@ -10528,10 +10550,12 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||
found="-rdynamic"
|
||||
else
|
||||
found="no"
|
||||
RDYNAMIC=""
|
||||
RDYNAMIC=""
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
@@ -10567,8 +10591,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdbsrv_cv_have_td_version=yes
|
||||
else
|
||||
gdbsrv_cv_have_td_version=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
|
||||
$as_echo "$gdbsrv_cv_have_td_version" >&6; }
|
||||
@@ -10615,14 +10641,15 @@ $as_echo_n "checking whether the target supports __sync_*_compare_and_swap... "
|
||||
if ${gdbsrv_cv_have_sync_builtins+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
|
||||
int foo, bar;
|
||||
bar = __sync_val_compare_and_swap(&foo, 0, 1);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -10631,9 +10658,11 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||
gdbsrv_cv_have_sync_builtins=yes
|
||||
else
|
||||
gdbsrv_cv_have_sync_builtins=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
|
||||
$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
|
||||
|
||||
@@ -18,18 +18,26 @@ dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(server.cc)
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([server.cc])
|
||||
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_GNU_SOURCE
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_SYS_LARGEFILE
|
||||
AM_PROG_INSTALL_STRIP
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
# Set build, build_cpu, build_vendor and build_os.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
# Set host, host_cpu, host_vendor, and host_os.
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# Set target, target_cpu, target_vendor, and target_os.
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
@@ -117,12 +125,19 @@ if test "x$with_ust" != "xno"; then
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $ustinc"
|
||||
AC_MSG_CHECKING([for ust])
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[
|
||||
#define CONFIG_UST_GDB_INTEGRATION
|
||||
#include <ust/ust.h>
|
||||
],[],
|
||||
[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_UST, 1, [Define if UST is available])],
|
||||
[AC_MSG_RESULT([no]); ustlibs= ; ustinc= ])
|
||||
],
|
||||
[]
|
||||
)],
|
||||
[AC_MSG_RESULT([yes]);
|
||||
AC_DEFINE(HAVE_UST, 1, [Define if UST is available])],
|
||||
[AC_MSG_RESULT([no])
|
||||
ustlibs= ; ustinc= ]
|
||||
)
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
fi
|
||||
|
||||
@@ -242,11 +257,14 @@ if test "${srv_linux_regsets}" = "yes"; then
|
||||
[Define if the target supports register sets.])
|
||||
|
||||
AC_MSG_CHECKING(for PTRACE_GETREGS)
|
||||
AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getregs,
|
||||
[AC_TRY_COMPILE([#include <sys/ptrace.h>],
|
||||
[PTRACE_GETREGS;],
|
||||
[gdbsrv_cv_have_ptrace_getregs=yes],
|
||||
[gdbsrv_cv_have_ptrace_getregs=no])])
|
||||
AC_CACHE_VAL(
|
||||
[gdbsrv_cv_have_ptrace_getregs],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETREGS;])],
|
||||
[gdbsrv_cv_have_ptrace_getregs=yes],
|
||||
[gdbsrv_cv_have_ptrace_getregs=no]
|
||||
)]
|
||||
)
|
||||
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getregs)
|
||||
if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
|
||||
AC_DEFINE(HAVE_PTRACE_GETREGS, 1,
|
||||
@@ -255,11 +273,14 @@ if test "${srv_linux_regsets}" = "yes"; then
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
|
||||
AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getfpxregs,
|
||||
[AC_TRY_COMPILE([#include <sys/ptrace.h>],
|
||||
[PTRACE_GETFPXREGS;],
|
||||
[gdbsrv_cv_have_ptrace_getfpxregs=yes],
|
||||
[gdbsrv_cv_have_ptrace_getfpxregs=no])])
|
||||
AC_CACHE_VAL(
|
||||
[gdbsrv_cv_have_ptrace_getfpxregs],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETFPXREGS;])],
|
||||
[gdbsrv_cv_have_ptrace_getfpxregs=yes],
|
||||
[gdbsrv_cv_have_ptrace_getfpxregs=no]
|
||||
)]
|
||||
)
|
||||
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getfpxregs)
|
||||
if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
|
||||
AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1,
|
||||
@@ -301,15 +322,19 @@ if test "$srv_linux_thread_db" = "yes"; then
|
||||
# supported there.
|
||||
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
|
||||
LDFLAGS="$LDFLAGS $RDYNAMIC"
|
||||
AC_TRY_LINK([], [],
|
||||
[found="-Wl,--dynamic-list"
|
||||
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],
|
||||
[RDYNAMIC="-rdynamic"
|
||||
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
||||
AC_TRY_LINK([], [],
|
||||
[found="-rdynamic"],
|
||||
[found="no"
|
||||
RDYNAMIC=""])])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([],[])],
|
||||
[found="-Wl,--dynamic-list"
|
||||
RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],
|
||||
[RDYNAMIC="-rdynamic"
|
||||
LDFLAGS="$old_LDFLAGS $RDYNAMIC"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([], [])],
|
||||
[found="-rdynamic"],
|
||||
[found="no"
|
||||
RDYNAMIC=""]
|
||||
)]
|
||||
)
|
||||
AC_SUBST(RDYNAMIC)
|
||||
LDFLAGS="$old_LDFLAGS"
|
||||
AC_MSG_RESULT($found)
|
||||
@@ -319,10 +344,15 @@ if test "$srv_linux_thread_db" = "yes"; then
|
||||
|
||||
srv_thread_depfiles="thread-db.o proc-service.o"
|
||||
AC_DEFINE(USE_THREAD_DB, 1, [Define if we should use libthread_db.])
|
||||
AC_CACHE_CHECK([for TD_VERSION], gdbsrv_cv_have_td_version,
|
||||
[AC_TRY_COMPILE([#include <thread_db.h>], [TD_VERSION;],
|
||||
[gdbsrv_cv_have_td_version=yes],
|
||||
[gdbsrv_cv_have_td_version=no])])
|
||||
AC_CACHE_CHECK(
|
||||
[for TD_VERSION],
|
||||
[gdbsrv_cv_have_td_version],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <thread_db.h>], [TD_VERSION;])],
|
||||
[gdbsrv_cv_have_td_version=yes],
|
||||
[gdbsrv_cv_have_td_version=no]
|
||||
)]
|
||||
)
|
||||
if test "$gdbsrv_cv_have_td_version" = yes; then
|
||||
AC_DEFINE(HAVE_TD_VERSION, 1, [Define if TD_VERSION is available.])
|
||||
fi
|
||||
@@ -353,11 +383,19 @@ GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_dep
|
||||
GDBSERVER_LIBS="$srv_libs"
|
||||
|
||||
dnl Check whether the target supports __sync_*_compare_and_swap.
|
||||
AC_CACHE_CHECK([whether the target supports __sync_*_compare_and_swap],
|
||||
gdbsrv_cv_have_sync_builtins, [
|
||||
AC_TRY_LINK([], [int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);],
|
||||
gdbsrv_cv_have_sync_builtins=yes,
|
||||
gdbsrv_cv_have_sync_builtins=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[whether the target supports __sync_*_compare_and_swap],
|
||||
[gdbsrv_cv_have_sync_builtins],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[],
|
||||
[int foo, bar;
|
||||
bar = __sync_val_compare_and_swap(&foo, 0, 1);]
|
||||
)],
|
||||
[gdbsrv_cv_have_sync_builtins=yes],
|
||||
[gdbsrv_cv_have_sync_builtins=no]
|
||||
)]
|
||||
)
|
||||
if test "$gdbsrv_cv_have_sync_builtins" = yes; then
|
||||
AC_DEFINE(HAVE_SYNC_BUILTINS, 1,
|
||||
[Define to 1 if the target supports __sync_*_compare_and_swap])
|
||||
|
||||
29
gdbsupport/aclocal.m4
vendored
29
gdbsupport/aclocal.m4
vendored
@@ -751,35 +751,6 @@ else
|
||||
fi
|
||||
])
|
||||
|
||||
# -*- Autoconf -*-
|
||||
# Obsolete and "removed" macros, that must however still report explicit
|
||||
# error messages when used, to smooth transition.
|
||||
#
|
||||
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([AM_CONFIG_HEADER],
|
||||
[AC_DIAGNOSE([obsolete],
|
||||
['$0': this macro is obsolete.
|
||||
You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
|
||||
AC_CONFIG_HEADERS($@)])
|
||||
|
||||
AC_DEFUN([AM_PROG_CC_STDC],
|
||||
[AC_PROG_CC
|
||||
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
|
||||
AC_DIAGNOSE([obsolete],
|
||||
['$0': this macro is obsolete.
|
||||
You should simply use the 'AC][_PROG_CC' macro instead.
|
||||
Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
|
||||
but upon 'ac_cv_prog_cc_stdc'.])])
|
||||
|
||||
AC_DEFUN([AM_C_PROTOTYPES],
|
||||
[AC_FATAL([automatic de-ANSI-fication support has been removed])])
|
||||
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
|
||||
|
||||
@@ -50,7 +50,7 @@ AC_DEFUN([GDB_AC_COMMON], [
|
||||
poll.h sys/poll.h sys/select.h)
|
||||
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_VFORK
|
||||
AC_FUNC_FORK
|
||||
AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
|
||||
ptrace64 sbrk setns sigaltstack sigprocmask \
|
||||
setpgid setpgrp getrusage getauxval])
|
||||
@@ -127,11 +127,20 @@ AC_DEFUN([GDB_AC_COMMON], [
|
||||
|
||||
dnl Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't
|
||||
dnl do since sigsetjmp might only be defined as a macro.
|
||||
AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <setjmp.h>
|
||||
], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
|
||||
gdb_cv_func_sigsetjmp=yes, gdb_cv_func_sigsetjmp=no)])
|
||||
AC_CACHE_CHECK(
|
||||
[for sigsetjmp],
|
||||
[gdb_cv_func_sigsetjmp],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <setjmp.h>],
|
||||
[sigjmp_buf env;
|
||||
while (! sigsetjmp (env, 1))
|
||||
siglongjmp (env, 1);]
|
||||
)],
|
||||
[gdb_cv_func_sigsetjmp=yes],
|
||||
[gdb_cv_func_sigsetjmp=no]
|
||||
)]
|
||||
)
|
||||
if test "$gdb_cv_func_sigsetjmp" = "yes"; then
|
||||
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
|
||||
fi
|
||||
|
||||
821
gdbsupport/configure
vendored
821
gdbsupport/configure
vendored
@@ -2728,6 +2728,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h:config.in"
|
||||
|
||||
|
||||
# Set build, build_cpu, build_vendor and build_os.
|
||||
ac_aux_dir=
|
||||
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
|
||||
if test -f "$ac_dir/install-sh"; then
|
||||
@@ -2795,6 +2797,8 @@ IFS=$ac_save_IFS
|
||||
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
# Set host, host_cpu, host_vendor, and host_os.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
|
||||
$as_echo_n "checking host system type... " >&6; }
|
||||
if ${ac_cv_host+:} false; then :
|
||||
@@ -2828,6 +2832,8 @@ IFS=$ac_save_IFS
|
||||
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
# Set target, target_cpu, target_vendor, and target_os.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
|
||||
$as_echo_n "checking target system type... " >&6; }
|
||||
if ${ac_cv_target+:} false; then :
|
||||
@@ -5882,734 +5888,6 @@ rm -rf conftest*
|
||||
fi
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}gcc; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
if test -n "$CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
|
||||
$as_echo "$CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_CC"; then
|
||||
ac_ct_CC=$CC
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ac_ct_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_CC"; then
|
||||
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CC="gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_CC=$ac_cv_prog_ac_ct_CC
|
||||
if test -n "$ac_ct_CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
|
||||
$as_echo "$ac_ct_CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_CC" = x; then
|
||||
CC=""
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
CC=$ac_ct_CC
|
||||
fi
|
||||
else
|
||||
CC="$ac_cv_prog_CC"
|
||||
fi
|
||||
|
||||
if test -z "$CC"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}cc; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}cc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
if test -n "$CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
|
||||
$as_echo "$CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
fi
|
||||
if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
ac_prog_rejected=no
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
|
||||
ac_prog_rejected=yes
|
||||
continue
|
||||
fi
|
||||
ac_cv_prog_CC="cc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
if test $ac_prog_rejected = yes; then
|
||||
# We found a bogon in the path, so make sure we never use it.
|
||||
set dummy $ac_cv_prog_CC
|
||||
shift
|
||||
if test $# != 0; then
|
||||
# We chose a different compiler from the bogus one.
|
||||
# However, it has the same basename, so the bogon will be chosen
|
||||
# first if we set CC to just the basename; use the full file name.
|
||||
shift
|
||||
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
if test -n "$CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
|
||||
$as_echo "$CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$CC"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
for ac_prog in cl.exe
|
||||
do
|
||||
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
CC=$ac_cv_prog_CC
|
||||
if test -n "$CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
|
||||
$as_echo "$CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$CC" && break
|
||||
done
|
||||
fi
|
||||
if test -z "$CC"; then
|
||||
ac_ct_CC=$CC
|
||||
for ac_prog in cl.exe
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_ac_ct_CC+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_CC"; then
|
||||
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CC="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_CC=$ac_cv_prog_ac_ct_CC
|
||||
if test -n "$ac_ct_CC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
|
||||
$as_echo "$ac_ct_CC" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
test -n "$ac_ct_CC" && break
|
||||
done
|
||||
|
||||
if test "x$ac_ct_CC" = x; then
|
||||
CC=""
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
CC=$ac_ct_CC
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "no acceptable C compiler found in \$PATH
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
|
||||
# Provide some information about the compiler.
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
|
||||
set X $ac_compile
|
||||
ac_compiler=$2
|
||||
for ac_option in --version -v -V -qversion; do
|
||||
{ { ac_try="$ac_compiler $ac_option >&5"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
sed '10a\
|
||||
... rest of stderr output deleted ...
|
||||
10q' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
fi
|
||||
rm -f conftest.er1 conftest.err
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }
|
||||
done
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
|
||||
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
|
||||
if ${ac_cv_c_compiler_gnu+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef __GNUC__
|
||||
choke me
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_compiler_gnu=yes
|
||||
else
|
||||
ac_compiler_gnu=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
ac_cv_c_compiler_gnu=$ac_compiler_gnu
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
|
||||
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
|
||||
if test $ac_compiler_gnu = yes; then
|
||||
GCC=yes
|
||||
else
|
||||
GCC=
|
||||
fi
|
||||
ac_test_CFLAGS=${CFLAGS+set}
|
||||
ac_save_CFLAGS=$CFLAGS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
|
||||
$as_echo_n "checking whether $CC accepts -g... " >&6; }
|
||||
if ${ac_cv_prog_cc_g+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_save_c_werror_flag=$ac_c_werror_flag
|
||||
ac_c_werror_flag=yes
|
||||
ac_cv_prog_cc_g=no
|
||||
CFLAGS="-g"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_prog_cc_g=yes
|
||||
else
|
||||
CFLAGS=""
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
else
|
||||
ac_c_werror_flag=$ac_save_c_werror_flag
|
||||
CFLAGS="-g"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_prog_cc_g=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
ac_c_werror_flag=$ac_save_c_werror_flag
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
|
||||
$as_echo "$ac_cv_prog_cc_g" >&6; }
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS=$ac_save_CFLAGS
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-g"
|
||||
fi
|
||||
else
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="-O2"
|
||||
else
|
||||
CFLAGS=
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
|
||||
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
|
||||
if ${ac_cv_prog_cc_c89+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_prog_cc_c89=no
|
||||
ac_save_CC=$CC
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
struct stat;
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
static char *e (p, i)
|
||||
char **p;
|
||||
int i;
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
static char *f (char * (*g) (char **, int), char **p, ...)
|
||||
{
|
||||
char *s;
|
||||
va_list v;
|
||||
va_start (v,p);
|
||||
s = g (p, va_arg (v,int));
|
||||
va_end (v);
|
||||
return s;
|
||||
}
|
||||
|
||||
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
|
||||
function prototypes and stuff, but not '\xHH' hex character constants.
|
||||
These don't provoke an error unfortunately, instead are silently treated
|
||||
as 'x'. The following induces an error, until -std is added to get
|
||||
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
|
||||
array size at least. It's necessary to write '\x00'==0 to get something
|
||||
that's true only with -std. */
|
||||
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
||||
|
||||
/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|
||||
inside strings and character constants. */
|
||||
#define FOO(x) 'x'
|
||||
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
||||
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};
|
||||
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
||||
int argc;
|
||||
char **argv;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
|
||||
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_prog_cc_c89=$ac_arg
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext
|
||||
test "x$ac_cv_prog_cc_c89" != "xno" && break
|
||||
done
|
||||
rm -f conftest.$ac_ext
|
||||
CC=$ac_save_CC
|
||||
|
||||
fi
|
||||
# AC_CACHE_VAL
|
||||
case "x$ac_cv_prog_cc_c89" in
|
||||
x)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
|
||||
$as_echo "none needed" >&6; } ;;
|
||||
xno)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
|
||||
$as_echo "unsupported" >&6; } ;;
|
||||
*)
|
||||
CC="$CC $ac_cv_prog_cc_c89"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
|
||||
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
|
||||
esac
|
||||
if test "x$ac_cv_prog_cc_c89" != xno; then :
|
||||
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
|
||||
$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
|
||||
if ${am_cv_prog_cc_c_o+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
# Make sure it works both with $CC and with simple cc.
|
||||
# Following AC_PROG_CC_C_O, we do the test twice because some
|
||||
# compilers refuse to overwrite an existing .o file with -o,
|
||||
# though they will create one.
|
||||
am_cv_prog_cc_c_o=yes
|
||||
for am_i in 1 2; do
|
||||
if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
|
||||
($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } \
|
||||
&& test -f conftest2.$ac_objext; then
|
||||
: OK
|
||||
else
|
||||
am_cv_prog_cc_c_o=no
|
||||
break
|
||||
fi
|
||||
done
|
||||
rm -f core conftest*
|
||||
unset am_i
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
|
||||
$as_echo "$am_cv_prog_cc_c_o" >&6; }
|
||||
if test "$am_cv_prog_cc_c_o" != yes; then
|
||||
# Losing compiler, so override with the script.
|
||||
# FIXME: It is wrong to rewrite CC.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__CC in this case,
|
||||
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||
CC="$am_aux_dir/compile $CC"
|
||||
fi
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
depcc="$CC" am_compiler_list=
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
|
||||
$as_echo_n "checking dependency style of $depcc... " >&6; }
|
||||
if ${am_cv_CC_dependencies_compiler_type+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named 'D' -- because '-MD' means "put the output
|
||||
# in D".
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_CC_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
|
||||
fi
|
||||
am__universal=false
|
||||
case " $depcc " in #(
|
||||
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
||||
esac
|
||||
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
|
||||
# Solaris 10 /bin/sh.
|
||||
echo '/* dummy */' > sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
# We check with '-c' and '-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle '-M -o', and we need to detect this. Also, some Intel
|
||||
# versions had trouble with output in subdirs.
|
||||
am__obj=sub/conftest.${OBJEXT-o}
|
||||
am__minus_obj="-o $am__obj"
|
||||
case $depmode in
|
||||
gcc)
|
||||
# This depmode causes a compiler race in universal mode.
|
||||
test "$am__universal" = false || continue
|
||||
;;
|
||||
nosideeffect)
|
||||
# After this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested.
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok '-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
am__obj=conftest.${OBJEXT-o}
|
||||
am__minus_obj=
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=$am__obj \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_CC_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_CC_dependencies_compiler_type=none
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
|
||||
$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
|
||||
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
|
||||
|
||||
if
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
|
||||
am__fastdepCC_TRUE=
|
||||
am__fastdepCC_FALSE='#'
|
||||
else
|
||||
am__fastdepCC_TRUE='#'
|
||||
am__fastdepCC_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
|
||||
|
||||
|
||||
# We require a C++11 compiler. Check if one is available, and if
|
||||
# necessary, set CXX_DIALECT to some -std=xxx switch.
|
||||
@@ -9765,13 +9043,14 @@ if ${gdb_cv_func_sigsetjmp+:} false; then :
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <setjmp.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
|
||||
sigjmp_buf env;
|
||||
while (! sigsetjmp (env, 1))
|
||||
siglongjmp (env, 1);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -9780,8 +9059,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_sigsetjmp=yes
|
||||
else
|
||||
gdb_cv_func_sigsetjmp=no
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
|
||||
$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
|
||||
@@ -10739,11 +10020,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;
|
||||
}
|
||||
@@ -10758,6 +10040,7 @@ int
|
||||
main ()
|
||||
{
|
||||
extern int ptrace ();
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -10766,25 +10049,29 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_ret='int'
|
||||
else
|
||||
gdb_cv_func_ptrace_ret='long'
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
|
||||
$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
|
||||
_ACEOF
|
||||
|
||||
|
||||
# Check argument types.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
|
||||
$as_echo_n "checking types of arguments for ptrace... " >&6; }
|
||||
if ${gdb_cv_func_ptrace_args+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
@@ -10792,6 +10079,7 @@ int
|
||||
main ()
|
||||
{
|
||||
extern long ptrace (enum __ptrace_request, ...);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -10799,20 +10087,17 @@ _ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
|
||||
else
|
||||
|
||||
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
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
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
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
extern $gdb_cv_func_ptrace_ret
|
||||
ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
|
||||
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
|
||||
|
||||
;
|
||||
return 0;
|
||||
@@ -10820,43 +10105,45 @@ extern $gdb_cv_func_ptrace_ret
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
|
||||
break 4;
|
||||
break 4;
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
for gdb_arg5 in 'int *' 'int' 'long'; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
|
||||
for gdb_arg5 in 'int *' 'int' 'long'; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$gdb_ptrace_headers
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
extern $gdb_cv_func_ptrace_ret
|
||||
ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
|
||||
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
|
||||
break 5;
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
|
||||
break 5;
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
|
||||
$as_echo "$gdb_cv_func_ptrace_args" >&6; }
|
||||
|
||||
ac_save_IFS=$IFS; IFS=','
|
||||
set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
|
||||
IFS=$ac_save_IFS
|
||||
@@ -11022,13 +10309,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;
|
||||
}
|
||||
@@ -11183,6 +10471,7 @@ DEFS=-DHAVE_CONFIG_H
|
||||
|
||||
ac_libobjs=
|
||||
ac_ltlibobjs=
|
||||
U=
|
||||
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
|
||||
# 1. Remove the extension, and $U if already installed.
|
||||
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
|
||||
@@ -11229,10 +10518,6 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
|
||||
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
|
||||
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${SELFTEST_TRUE}" && test -z "${SELFTEST_FALSE}"; then
|
||||
as_fn_error $? "conditional \"SELFTEST\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
||||
@@ -19,7 +19,16 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT([gdbsupport], 1.0)
|
||||
AC_CONFIG_SRCDIR(common-defs.h)
|
||||
AC_CONFIG_HEADER(config.h:config.in)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
# Set build, build_cpu, build_vendor and build_os.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
# Set host, host_cpu, host_vendor, and host_os.
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# Set target, target_cpu, target_vendor, and target_os.
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
AM_INIT_AUTOMAKE
|
||||
@@ -31,7 +40,6 @@ AC_PROG_RANLIB
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
ACX_LARGEFILE
|
||||
AM_PROG_CC_STDC
|
||||
|
||||
# We require a C++11 compiler. Check if one is available, and if
|
||||
# necessary, set CXX_DIALECT to some -std=xxx switch.
|
||||
|
||||
@@ -34,45 +34,74 @@ gdb_ptrace_headers='
|
||||
|
||||
# Check return type. Varargs (used on GNU/Linux) conflict with the
|
||||
# empty argument list, so check for that explicitly.
|
||||
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($gdb_ptrace_headers,
|
||||
[extern int ptrace ();],
|
||||
gdb_cv_func_ptrace_ret='int',
|
||||
gdb_cv_func_ptrace_ret='long')))
|
||||
AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret,
|
||||
[Define as the return type of ptrace.])
|
||||
AC_CACHE_CHECK(
|
||||
[return type of ptrace],
|
||||
[gdb_cv_func_ptrace_ret],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[$gdb_ptrace_headers],
|
||||
[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']
|
||||
)]
|
||||
)]
|
||||
)
|
||||
|
||||
AC_DEFINE_UNQUOTED(
|
||||
[PTRACE_TYPE_RET],
|
||||
[$gdb_cv_func_ptrace_ret],
|
||||
[Define as the return type of ptrace.]
|
||||
)
|
||||
|
||||
# Check argument types.
|
||||
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, ...);],
|
||||
[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);
|
||||
], [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);
|
||||
], [
|
||||
gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
|
||||
break 5;])
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
|
||||
])])
|
||||
AC_CACHE_CHECK(
|
||||
[types of arguments for ptrace],
|
||||
[gdb_cv_func_ptrace_args],
|
||||
[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_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_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;]
|
||||
)
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
# Provide a safe default value.
|
||||
: ${gdb_cv_func_ptrace_args='int,int,long,long'}]
|
||||
)]
|
||||
)
|
||||
|
||||
ac_save_IFS=$IFS; IFS=','
|
||||
set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
|
||||
IFS=$ac_save_IFS
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user