Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] memmem removed from gdbserver's AC_CHECK_DECLS.
Date: Thu, 19 Apr 2012 12:21:00 -0000	[thread overview]
Message-ID: <4F9002A0.30303@redhat.com> (raw)
In-Reply-To: <20120419102444.16030.63019.stgit@brno.lan>

On 04/19/2012 11:24 AM, Pedro Alves wrote:

> 2012-04-19  Pedro Alves  <palves@redhat.com>
> 
> 	* configure.ac: Remove AC_CHECK_DECLS check for memmem.
> 	* server.h (memmem): Remove declaration.
> 	* config.in: Regenerate.
> 	* configure: Regenerate.


This actually breaks the build on Windows ...

../../../src/gdb/gdbserver/server.c: In function 'handle_search_memory_1':
../../../src/gdb/gdbserver/server.c:757:7: error: implicit declaration of function 'memmem' [-Werror=implicit-function-declaration]
../../../src/gdb/gdbserver/server.c:757:17: error: assignment makes pointer from integer without a cast [-Werror]

because nothing is pointing the compiler at gnulib's build directory, which
contains the generated replacement headers (string.h in this case), which contain
the memmem declaration for systems that need it, such as mingw32.

Missed it before because I had originally written that patch against the
new wrapper gnulib, which didn't have this bug.

This fixes it.  Applied.

Note GDB does the exact same thing (discounting the source path difference):

  INCGNU = -I$(srcdir)/gnulib -Ignulib

2012-04-19  Pedro Alves  <palves@redhat.com>

	* Makefile.in (INCGNU): Add -Ignulib.
---
 gdb/gdbserver/Makefile.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 94b9cae..1e78f98 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -77,7 +77,7 @@ ustinc = @ustinc@

 # gnulib
 LIBGNU = gnulib/libgnu.a
-INCGNU = -I$(srcdir)/../gnulib
+INCGNU = -I$(srcdir)/../gnulib -Ignulib

 # We build gnulib directly under the gdbserver build directory, but
 # its sources don't live directly under gdbserver's source directory.


  reply	other threads:[~2012-04-19 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 12:01 Pedro Alves
2012-04-19 12:21 ` Pedro Alves [this message]
2012-04-19 13:18 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F9002A0.30303@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox