public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCHv2] gnulib: update to 776af40e0
@ 2021-01-22 19:55 Paul E. Murphy
  2021-01-22 20:40 ` Simon Marchi
  2021-02-05 17:29 ` Paul E Murphy
  0 siblings, 2 replies; 5+ messages in thread
From: Paul E. Murphy @ 2021-01-22 19:55 UTC (permalink / raw)
  To: gdb-patches; +Cc: simon.marchi, cbiesinger, Paul E. Murphy

Changes generated by rerunning are left out as the
resulting patch is too big for the mailing list.

Likewise, tested compilation on x86 and ppc64le,
and I do not have commit access, but I do have
gnu copyright assignment.

V2 updates:

Apply suggested fixes from Simon Marchi and
Christian Biesinger for unoptimized gcc builds
and mingw.

---8<---

This fixes PR27184, a failure to compile gdb due to
cdefs.h being out of sync with glibc on ppc64le targets
which are compiled with -mabi=ieeelongdouble and glibc
2.32.

Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.

Likewise, disable newly added rpl_free gnulib api in
gdbserver support libraries.

Likewise, undefine read/write macros before redefining them
on mingw targets.

Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
as needed.
---
 gdbserver/ChangeLog       | 7 +++++++
 gdbserver/Makefile.in     | 2 +-
 gdbserver/remote-utils.cc | 4 ++++
 gdbsupport/ChangeLog      | 7 +++++++
 gdbsupport/common-defs.h  | 4 ++--
 gdbsupport/common-utils.h | 6 +++++-
 gnulib/ChangeLog          | 5 +++++
 gnulib/update-gnulib.sh   | 2 +-
 8 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index 3323ecfbf89..8aa82967471 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-22  Paul E. Murphy <murphyp@linux.ibm.com>
+
+	* Makefile.in (UNDO_GNULIB_CFLAGS): disable
+	gnulib free replacement too.
+	* common-defs.h [USE_WIN32API](read, write): undefine
+	gnulib versions before defining these macros.
+
 2021-01-07  Tom de Vries  <tdevries@suse.de>
 
 	* Makefile.in (LIBIBERTY_NORMAL, LIBIBERTY_NOASAN, LIBIBERTY_PIC):
diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index a14d3a7bc18..8e174da8dcf 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -490,7 +490,7 @@ UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION
 # Undo gnulib replacements for the IPA shared library build.
 # The gnulib headers are still needed, but gnulib is not linked
 # into the IPA lib so replacement apis don't work.
-UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r
+UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r -Drpl_free=free
 
 # Note, we only build the IPA if -fvisibility=hidden is supported in
 # the first place.
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index cfdf1c1883c..4f63d73785d 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -102,6 +102,10 @@ static int remote_desc = -1;
 static int listen_desc = -1;
 
 #ifdef USE_WIN32API
+/* gnulib wraps these as macros, undo them.  */
+# undef read
+# undef write
+
 # define read(fd, buf, len) recv (fd, (char *) buf, len, 0)
 # define write(fd, buf, len) send (fd, (char *) buf, len, 0)
 #endif
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index d973a6daa4f..f032f445693 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-22  Paul E. Murphy  <murphy@linux.ibm.com>
+
+	* common-defs.h (ATTRIBUTE_PRINTF): rename
+	_GL_ATTRIBUTE_FORMAT_PRINTF to _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
+	* common-utils.h (xfree): use GNULIB_NAMESPACE namespace when calling
+	free if this macro is defined.
+
 2021-01-08  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	PR gdb/27157
diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h
index e5ece3baccc..5b644010cd9 100644
--- a/gdbsupport/common-defs.h
+++ b/gdbsupport/common-defs.h
@@ -105,10 +105,10 @@
 /* This is defined by ansidecl.h, but we prefer gnulib's version.  On
    MinGW, gnulib might enable __USE_MINGW_ANSI_STDIO, which may or not
    require use of attribute gnu_printf instead of printf.  gnulib
-   checks that at configure time.  Since _GL_ATTRIBUTE_FORMAT_PRINTF
+   checks that at configure time.  Since _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
    is compatible with ATTRIBUTE_PRINTF, simply use it.  */
 #undef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF
+#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
 
 #if GCC_VERSION >= 3004
 #define ATTRIBUTE_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
diff --git a/gdbsupport/common-utils.h b/gdbsupport/common-utils.h
index 4429f086fce..28c08ee9766 100644
--- a/gdbsupport/common-utils.h
+++ b/gdbsupport/common-utils.h
@@ -59,7 +59,11 @@ xfree (T *ptr)
 data type.  Use operator delete instead.");
 
   if (ptr != NULL)
-    free (ptr);		/* ARI: free */
+#ifdef GNULIB_NAMESPACE
+    GNULIB_NAMESPACE::free (ptr);	/* ARI: free */
+#else
+    free (ptr);				/* ARI: free */
+#endif
 }
 
 
diff --git a/gnulib/ChangeLog b/gnulib/ChangeLog
index 909df781797..8adb8156518 100644
--- a/gnulib/ChangeLog
+++ b/gnulib/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-22  Paul E. Murphy  <murphyp@linux.ibm.com>
+	* update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
+	776af40e09b476a41073131a90022572f448c189.
+	* Makefile.in, config.in, configure, import/*: Re-generate.
+
 2020-10-09  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* Makefile.gnulib.inc.in: New file.
diff --git a/gnulib/update-gnulib.sh b/gnulib/update-gnulib.sh
index e9b377ca475..02d045b5348 100755
--- a/gnulib/update-gnulib.sh
+++ b/gnulib/update-gnulib.sh
@@ -70,7 +70,7 @@ IMPORTED_GNULIB_MODULES="\
 "
 
 # The gnulib commit ID to use for the update.
-GNULIB_COMMIT_SHA1="4e3f2d4cfdba14e1d89479362061a9280f2f22b6"
+GNULIB_COMMIT_SHA1="776af40e09b476a41073131a90022572f448c189"
 
 # The expected version number for the various auto tools we will
 # use after the import.
-- 
2.26.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] gnulib: update to 776af40e0
  2021-01-22 19:55 [PATCHv2] gnulib: update to 776af40e0 Paul E. Murphy
@ 2021-01-22 20:40 ` Simon Marchi
  2021-01-25 13:15   ` Christian Biesinger
  2021-02-05 17:29 ` Paul E Murphy
  1 sibling, 1 reply; 5+ messages in thread
From: Simon Marchi @ 2021-01-22 20:40 UTC (permalink / raw)
  To: Paul E. Murphy, gdb-patches

Thanks, branch updated:

https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/users/simark/update-gnulib

On 2021-01-22 2:55 p.m., Paul E. Murphy wrote:
> Changes generated by rerunning are left out as the
> resulting patch is too big for the mailing list.
> 
> Likewise, tested compilation on x86 and ppc64le,
> and I do not have commit access, but I do have
> gnu copyright assignment.
> 
> V2 updates:
> 
> Apply suggested fixes from Simon Marchi and
> Christian Biesinger for unoptimized gcc builds
> and mingw.
> 
> ---8<---
> 
> This fixes PR27184, a failure to compile gdb due to
> cdefs.h being out of sync with glibc on ppc64le targets
> which are compiled with -mabi=ieeelongdouble and glibc
> 2.32.
> 
> Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
> _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
> 
> Likewise, disable newly added rpl_free gnulib api in
> gdbserver support libraries.
> 
> Likewise, undefine read/write macros before redefining them
> on mingw targets.
> 
> Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
> as needed.
> ---
>  gdbserver/ChangeLog       | 7 +++++++
>  gdbserver/Makefile.in     | 2 +-
>  gdbserver/remote-utils.cc | 4 ++++
>  gdbsupport/ChangeLog      | 7 +++++++
>  gdbsupport/common-defs.h  | 4 ++--
>  gdbsupport/common-utils.h | 6 +++++-
>  gnulib/ChangeLog          | 5 +++++
>  gnulib/update-gnulib.sh   | 2 +-
>  8 files changed, 32 insertions(+), 5 deletions(-)
> 
> diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
> index 3323ecfbf89..8aa82967471 100644
> --- a/gdbserver/ChangeLog
> +++ b/gdbserver/ChangeLog
> @@ -1,3 +1,10 @@
> +2021-01-22  Paul E. Murphy <murphyp@linux.ibm.com>
> +
> +	* Makefile.in (UNDO_GNULIB_CFLAGS): disable
> +	gnulib free replacement too.
> +	* common-defs.h [USE_WIN32API](read, write): undefine
> +	gnulib versions before defining these macros.

Note: use capital letters at beginning of the sentences.

> diff --git a/gnulib/ChangeLog b/gnulib/ChangeLog
> index 909df781797..8adb8156518 100644
> --- a/gnulib/ChangeLog
> +++ b/gnulib/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-22  Paul E. Murphy  <murphyp@linux.ibm.com>
> +	* update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
> +	776af40e09b476a41073131a90022572f448c189.
> +	* Makefile.in, config.in, configure, import/*: Re-generate.

Missing line after the name/email entry.

No need to send a new version for that, whoever pushes can fix that.

Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] gnulib: update to 776af40e0
  2021-01-22 20:40 ` Simon Marchi
@ 2021-01-25 13:15   ` Christian Biesinger
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Biesinger @ 2021-01-25 13:15 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Paul E. Murphy, gdb-patches

On Fri, Jan 22, 2021 at 9:40 PM Simon Marchi <simon.marchi@polymtl.ca> wrote:
>
> Thanks, branch updated:
>
> https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/users/simark/update-gnulib

Thanks, this works for me on Mingw64 now (there's a presumably
unrelated link error with readline)

Also works on cygwin except for a gdb_select error in gdbserver and a
thread local sigsegv error in gdb, which are probably unrelated.

Christian

> On 2021-01-22 2:55 p.m., Paul E. Murphy wrote:
> > Changes generated by rerunning are left out as the
> > resulting patch is too big for the mailing list.
> >
> > Likewise, tested compilation on x86 and ppc64le,
> > and I do not have commit access, but I do have
> > gnu copyright assignment.
> >
> > V2 updates:
> >
> > Apply suggested fixes from Simon Marchi and
> > Christian Biesinger for unoptimized gcc builds
> > and mingw.
> >
> > ---8<---
> >
> > This fixes PR27184, a failure to compile gdb due to
> > cdefs.h being out of sync with glibc on ppc64le targets
> > which are compiled with -mabi=ieeelongdouble and glibc
> > 2.32.
> >
> > Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
> > _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
> >
> > Likewise, disable newly added rpl_free gnulib api in
> > gdbserver support libraries.
> >
> > Likewise, undefine read/write macros before redefining them
> > on mingw targets.
> >
> > Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
> > as needed.
> > ---
> >  gdbserver/ChangeLog       | 7 +++++++
> >  gdbserver/Makefile.in     | 2 +-
> >  gdbserver/remote-utils.cc | 4 ++++
> >  gdbsupport/ChangeLog      | 7 +++++++
> >  gdbsupport/common-defs.h  | 4 ++--
> >  gdbsupport/common-utils.h | 6 +++++-
> >  gnulib/ChangeLog          | 5 +++++
> >  gnulib/update-gnulib.sh   | 2 +-
> >  8 files changed, 32 insertions(+), 5 deletions(-)
> >
> > diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
> > index 3323ecfbf89..8aa82967471 100644
> > --- a/gdbserver/ChangeLog
> > +++ b/gdbserver/ChangeLog
> > @@ -1,3 +1,10 @@
> > +2021-01-22  Paul E. Murphy <murphyp@linux.ibm.com>
> > +
> > +     * Makefile.in (UNDO_GNULIB_CFLAGS): disable
> > +     gnulib free replacement too.
> > +     * common-defs.h [USE_WIN32API](read, write): undefine
> > +     gnulib versions before defining these macros.
>
> Note: use capital letters at beginning of the sentences.
>
> > diff --git a/gnulib/ChangeLog b/gnulib/ChangeLog
> > index 909df781797..8adb8156518 100644
> > --- a/gnulib/ChangeLog
> > +++ b/gnulib/ChangeLog
> > @@ -1,3 +1,8 @@
> > +2021-01-22  Paul E. Murphy  <murphyp@linux.ibm.com>
> > +     * update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
> > +     776af40e09b476a41073131a90022572f448c189.
> > +     * Makefile.in, config.in, configure, import/*: Re-generate.
>
> Missing line after the name/email entry.
>
> No need to send a new version for that, whoever pushes can fix that.
>
> Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] gnulib: update to 776af40e0
  2021-01-22 19:55 [PATCHv2] gnulib: update to 776af40e0 Paul E. Murphy
  2021-01-22 20:40 ` Simon Marchi
@ 2021-02-05 17:29 ` Paul E Murphy
  2021-02-05 18:06   ` Simon Marchi
  1 sibling, 1 reply; 5+ messages in thread
From: Paul E Murphy @ 2021-02-05 17:29 UTC (permalink / raw)
  To: gdb-patches



On 1/22/21 1:55 PM, Paul E. Murphy wrote:
> Changes generated by rerunning are left out as the
> resulting patch is too big for the mailing list.
> 
> Likewise, tested compilation on x86 and ppc64le,
> and I do not have commit access, but I do have
> gnu copyright assignment.
> 
> V2 updates:
> 
> Apply suggested fixes from Simon Marchi and
> Christian Biesinger for unoptimized gcc builds
> and mingw.
> 
> ---8<---
> 
> This fixes PR27184, a failure to compile gdb due to
> cdefs.h being out of sync with glibc on ppc64le targets
> which are compiled with -mabi=ieeelongdouble and glibc
> 2.32.
> 
> Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
> _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
> 
> Likewise, disable newly added rpl_free gnulib api in
> gdbserver support libraries.
> 
> Likewise, undefine read/write macros before redefining them
> on mingw targets.
> 
> Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
> as needed.

Ping.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] gnulib: update to 776af40e0
  2021-02-05 17:29 ` Paul E Murphy
@ 2021-02-05 18:06   ` Simon Marchi
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Marchi @ 2021-02-05 18:06 UTC (permalink / raw)
  To: Paul E Murphy, gdb-patches

On 2021-02-05 12:29 p.m., Paul E Murphy via Gdb-patches wrote:
> 
> 
> On 1/22/21 1:55 PM, Paul E. Murphy wrote:
>> Changes generated by rerunning are left out as the
>> resulting patch is too big for the mailing list.
>>
>> Likewise, tested compilation on x86 and ppc64le,
>> and I do not have commit access, but I do have
>> gnu copyright assignment.
>>
>> V2 updates:
>>
>> Apply suggested fixes from Simon Marchi and
>> Christian Biesinger for unoptimized gcc builds
>> and mingw.
>>
>> ---8<---
>>
>> This fixes PR27184, a failure to compile gdb due to
>> cdefs.h being out of sync with glibc on ppc64le targets
>> which are compiled with -mabi=ieeelongdouble and glibc
>> 2.32.
>>
>> Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
>> _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
>>
>> Likewise, disable newly added rpl_free gnulib api in
>> gdbserver support libraries.
>>
>> Likewise, undefine read/write macros before redefining them
>> on mingw targets.
>>
>> Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
>> as needed.
> 
> Ping.

Since we didn't get any more feedback, I'll push the patch, if anybody
hits some problem they'll report it.

Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-05 18:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 19:55 [PATCHv2] gnulib: update to 776af40e0 Paul E. Murphy
2021-01-22 20:40 ` Simon Marchi
2021-01-25 13:15   ` Christian Biesinger
2021-02-05 17:29 ` Paul E Murphy
2021-02-05 18:06   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).