enable_maintainer_mode
enable_largefile
enable_libmcheck
+enable_unit_tests
with_ust
with_ust_include
with_ust_lib
sometimes confusing) to the casual installer
--disable-largefile omit support for large files
--enable-libmcheck Try linking with -lmcheck if available
+ --enable-unit-tests Enable the inclusion of unit tests when compiling
+ GDB
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
--enable-gdb-build-warnings
fi
-if $development; then
- srv_selftest_objs="common/selftest.o"
+
+# Check whether we will enable the inclusion of unit tests when
+# compiling GDB.
+#
+# The default value of this option changes depending whether we're on
+# development mode (in which case it's "true") or not (in which case
+# it's "false").
+# Check whether --enable-unit-tests was given.
+if test "${enable_unit_tests+set}" = set; then :
+ enableval=$enable_unit_tests; case "${enableval}" in
+ yes) enable_unittests=true ;;
+ no) enable_unittests=false ;;
+ *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
+esac
+else
+ enable_unittests=$development
+fi
+
+
+if $enable_unittests; then
$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
+
+ srv_selftest_objs="gdbsupport/selftest.o"
+
fi
+
case ${build_alias} in
"") build_noncanonical=${build} ;;
*) build_noncanonical=${build_alias} ;;
# Create sub-directories for objects and dependencies.
-CONFIG_SRC_SUBDIR="arch common"
+CONFIG_SRC_SUBDIR="arch gdbsupport"
ac_config_commands="$ac_config_commands gdbdepdir"
# "gnulib", to avoid the problem of both GDB and GDBserver wanting to
# build it in the same directory, when building in the source dir.
- in_src="../gnulib"
+ in_src="../../gnulib"
in_build="build-gnulib-gdbserver"
in_extra_args="$gnulib_extra_configure_args"
-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
-Wno-switch -Wno-char-subscripts \
-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
+-Wno-sign-compare -Wno-error=maybe-uninitialized \
-Wno-mismatched-tags \
-Wno-error=deprecated-register \
-Wsuggest-override \
-Wimplicit-fallthrough=3 \
--Wduplicated-cond"
+-Wduplicated-cond \
+-Wshadow=local \
+-Wdeprecated-copy \
+-Wdeprecated-copy-dtor \
+-Wredundant-move"
case "${host}" in
*-*-mingw32*)
build_warnings="$build_warnings -Wno-unknown-pragmas"
# Solaris 11 <unistd.h> marks vfork deprecated.
build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
- *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+ *)
+ # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
+ # but there's a special case for this below.
+ build_warnings="$build_warnings -Wformat-nonliteral" ;;
esac
# Check whether --enable-build-warnings was given.
case $w in
-Wno-*)
wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+ -Wformat-nonliteral)
+ # gcc requires -Wformat before -Wformat-nonliteral
+ # will work, so stick them together.
+ w="-Wformat $w"
+ wtest="$w"
+ ;;
*)
wtest=$w ;;
esac
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-case " $WARN_CFLAGS " in
-*" -Wmissing-prototypes "*)
- WARN_CFLAGS="$WARN_CFLAGS -Wno-missing-prototypes"
- ;;
-esac
old_LIBS="$LIBS"
LIBS="$LIBS -ldl"
. ${srcdir}/configure.srv
# Add in the common host objects.
-. ${srcdir}/../common/common.host
+. ${srcdir}/../gdbsupport/common.host
srv_host_obs="$common_host_obs"
if test "${srv_mingwce}" = "yes"; then