aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rwxr-xr-xgdb/gdbserver/configure19
-rw-r--r--gdb/gdbserver/configure.ac11
3 files changed, 20 insertions, 16 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 0010e27..6d9e314 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,11 @@
2020-01-14 Tom Tromey <tom@tromey.com>
+ * configure.ac (LIBS): Use WIN32APILIBS.
+ (USE_WIN32API): Don't define.
+ * configure: Rebuild.
+
+2020-01-14 Tom Tromey <tom@tromey.com>
+
* configure: Rebuild.
2020-01-13 Simon Marchi <simon.marchi@efficios.com>
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 9d262bf..154eeac 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -6959,6 +6959,16 @@ _ACEOF
fi
+ WIN32APILIBS=
+ case ${host} in
+ *mingw32*)
+
+$as_echo "#define USE_WIN32API 1" >>confdefs.h
+
+ WIN32APILIBS="-lws2_32"
+ ;;
+ esac
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
@@ -8705,19 +8715,14 @@ esac
if test "${srv_mingwce}" = "yes"; then
LIBS="$LIBS -lws2"
elif test "${srv_mingw}" = "yes"; then
- LIBS="$LIBS -lws2_32"
+ # WIN32APILIBS is set by GDB_AC_COMMON.
+ LIBS="$LIBS $WIN32APILIBS"
elif test "${srv_qnx}" = "yes"; then
LIBS="$LIBS -lsocket"
elif test "${srv_lynxos}" = "yes"; then
LIBS="$LIBS -lnetinet"
fi
-if test "${srv_mingw}" = "yes"; then
-
-$as_echo "#define USE_WIN32API 1" >>confdefs.h
-
-fi
-
if test "${srv_linux_usrregs}" = "yes"; then
$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 817a861..fab765e 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -248,21 +248,14 @@ esac
if test "${srv_mingwce}" = "yes"; then
LIBS="$LIBS -lws2"
elif test "${srv_mingw}" = "yes"; then
- LIBS="$LIBS -lws2_32"
+ # WIN32APILIBS is set by GDB_AC_COMMON.
+ LIBS="$LIBS $WIN32APILIBS"
elif test "${srv_qnx}" = "yes"; then
LIBS="$LIBS -lsocket"
elif test "${srv_lynxos}" = "yes"; then
LIBS="$LIBS -lnetinet"
fi
-if test "${srv_mingw}" = "yes"; then
- AC_DEFINE(USE_WIN32API, 1,
- [Define if we should use the Windows API, instead of the
- POSIX API. On Windows, we use the Windows API when
- building for MinGW, but the POSIX API when building
- for Cygwin.])
-fi
-
if test "${srv_linux_usrregs}" = "yes"; then
AC_DEFINE(HAVE_LINUX_USRREGS, 1,
[Define if the target supports PTRACE_PEEKUSR for register ]