* [Buildroot] [PATCH 1/2] package/gdb: move patch directory
@ 2018-09-09 16:37 Romain Naour
2018-09-09 16:37 ` [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system Romain Naour
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Romain Naour @ 2018-09-09 16:37 UTC (permalink / raw)
To: buildroot
commit 9cf4964da56863dfe4ce729c32400bd9acf25ee7 forgot to move patch directory.
Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552306
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
.../0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 0
.../0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch | 0
package/gdb/{8.1 => 8.1.1}/0003-use-asm-sgidefs.h.patch | 0
package/gdb/{8.1 => 8.1.1}/0004-gdbserver-fix-build-for-m68k.patch | 0
.../{8.1 => 8.1.1}/0005-nat-fork-inferior-include-linux-ptrace.h.patch | 0
5 files changed, 0 insertions(+), 0 deletions(-)
rename package/gdb/{8.1 => 8.1.1}/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch (100%)
rename package/gdb/{8.1 => 8.1.1}/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch (100%)
rename package/gdb/{8.1 => 8.1.1}/0003-use-asm-sgidefs.h.patch (100%)
rename package/gdb/{8.1 => 8.1.1}/0004-gdbserver-fix-build-for-m68k.patch (100%)
rename package/gdb/{8.1 => 8.1.1}/0005-nat-fork-inferior-include-linux-ptrace.h.patch (100%)
diff --git a/package/gdb/8.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/package/gdb/8.1.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
similarity index 100%
rename from package/gdb/8.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
rename to package/gdb/8.1.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
diff --git a/package/gdb/8.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch b/package/gdb/8.1.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
similarity index 100%
rename from package/gdb/8.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
rename to package/gdb/8.1.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
diff --git a/package/gdb/8.1/0003-use-asm-sgidefs.h.patch b/package/gdb/8.1.1/0003-use-asm-sgidefs.h.patch
similarity index 100%
rename from package/gdb/8.1/0003-use-asm-sgidefs.h.patch
rename to package/gdb/8.1.1/0003-use-asm-sgidefs.h.patch
diff --git a/package/gdb/8.1/0004-gdbserver-fix-build-for-m68k.patch b/package/gdb/8.1.1/0004-gdbserver-fix-build-for-m68k.patch
similarity index 100%
rename from package/gdb/8.1/0004-gdbserver-fix-build-for-m68k.patch
rename to package/gdb/8.1.1/0004-gdbserver-fix-build-for-m68k.patch
diff --git a/package/gdb/8.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch b/package/gdb/8.1.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch
similarity index 100%
rename from package/gdb/8.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch
rename to package/gdb/8.1.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch
--
2.14.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system
2018-09-09 16:37 [Buildroot] [PATCH 1/2] package/gdb: move patch directory Romain Naour
@ 2018-09-09 16:37 ` Romain Naour
2018-09-10 15:49 ` Thomas Petazzoni
2018-09-12 21:46 ` Thomas Petazzoni
2018-09-10 15:22 ` [Buildroot] [PATCH 1/2] package/gdb: move patch directory Thomas Petazzoni
2018-10-01 14:59 ` Peter Korsgaard
2 siblings, 2 replies; 8+ messages in thread
From: Romain Naour @ 2018-09-09 16:37 UTC (permalink / raw)
To: buildroot
Use the same workaround [1] as gnulib use to get the original
definition of stat. Otherwise with musl toolchains, gnulib try to use
rpl_stat which is not defined.
Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308
[1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
...mon-utils-use-stat-privided-by-the-system.patch | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch
diff --git a/package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch b/package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch
new file mode 100644
index 0000000000..650d963b9e
--- /dev/null
+++ b/package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch
@@ -0,0 +1,37 @@
+From a7848d4244ffa8db7bf4ab0d5152f57e71600420 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sun, 9 Sep 2018 12:53:34 +0200
+Subject: [PATCH] gdb/common-utils: use stat() privided by the system
+
+Use the same workaround [1] as gnulib use to get the original
+definition of stat. Otherwise with musl toolchains, gnulib try to use
+rpl_stat which is not defined.
+
+Fixes:
+https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308
+
+[1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ gdb/common/common-utils.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
+index 80de826ba78..d3577c7ff5c 100644
+--- a/gdb/common/common-utils.c
++++ b/gdb/common/common-utils.c
+@@ -20,7 +20,10 @@
+ #include "common-defs.h"
+ #include "common-utils.h"
+ #include "host-defs.h"
++/* Get the original definition of stat. It might be defined as a macro. */
++#define __need_system_sys_stat_h
+ #include <sys/stat.h>
++#undef __need_system_sys_stat_h
+ #include <ctype.h>
+
+ /* The xmalloc() (libiberty.h) family of memory management routines.
+--
+2.14.4
+
--
2.14.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] package/gdb: move patch directory
2018-09-09 16:37 [Buildroot] [PATCH 1/2] package/gdb: move patch directory Romain Naour
2018-09-09 16:37 ` [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system Romain Naour
@ 2018-09-10 15:22 ` Thomas Petazzoni
2018-10-01 14:59 ` Peter Korsgaard
2 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2018-09-10 15:22 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 9 Sep 2018 18:37:49 +0200, Romain Naour wrote:
> commit 9cf4964da56863dfe4ce729c32400bd9acf25ee7 forgot to move patch directory.
>
> Fixes:
> https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552306
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
> .../0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 0
> .../0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch | 0
> package/gdb/{8.1 => 8.1.1}/0003-use-asm-sgidefs.h.patch | 0
> package/gdb/{8.1 => 8.1.1}/0004-gdbserver-fix-build-for-m68k.patch | 0
> .../{8.1 => 8.1.1}/0005-nat-fork-inferior-include-linux-ptrace.h.patch | 0
> 5 files changed, 0 insertions(+), 0 deletions(-)
> rename package/gdb/{8.1 => 8.1.1}/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch (100%)
> rename package/gdb/{8.1 => 8.1.1}/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch (100%)
> rename package/gdb/{8.1 => 8.1.1}/0003-use-asm-sgidefs.h.patch (100%)
> rename package/gdb/{8.1 => 8.1.1}/0004-gdbserver-fix-build-for-m68k.patch (100%)
> rename package/gdb/{8.1 => 8.1.1}/0005-nat-fork-inferior-include-linux-ptrace.h.patch (100%)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system
2018-09-09 16:37 ` [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system Romain Naour
@ 2018-09-10 15:49 ` Thomas Petazzoni
2018-09-10 21:20 ` Romain Naour
2018-09-12 21:46 ` Thomas Petazzoni
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2018-09-10 15:49 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 9 Sep 2018 18:37:50 +0200, Romain Naour wrote:
> Use the same workaround [1] as gnulib use to get the original
> definition of stat. Otherwise with musl toolchains, gnulib try to use
> rpl_stat which is not defined.
>
> Fixes:
> https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308
>
> [1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
I am confused by this patch. Why do we need that? The <sys/stat.h> on
my system doesn't test __need_system_sys_stat_h. Is this a workaround
to force gnulib to not provide its own stat() replacement ?
Why is gnulib misbehaving here ? We have tons of gnulib related hacks
in gdb.mk, and this start to pile up quite a bit. Why do we have all
those gnulib issues with gdb ? Why not with tons of other packages that
also use gnulib ?
> +Use the same workaround [1] as gnulib use to get the original
> +definition of stat. Otherwise with musl toolchains, gnulib try to use
> +rpl_stat which is not defined.
Well rpl_stat() is supposed to be implemented by gnulib. So basically
gnulib tells gdb: please don't use stat() but my rpl_stat() wrapper,
but then gnulib doesn't provide rpl_stat().
Any idea what's happening here ?
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system
2018-09-10 15:49 ` Thomas Petazzoni
@ 2018-09-10 21:20 ` Romain Naour
[not found] ` <20180910224128.GT1878@brightrain.aerifal.cx>
0 siblings, 1 reply; 8+ messages in thread
From: Romain Naour @ 2018-09-10 21:20 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Adding the gdb-patches ml and Rich Felker in Cc.
Le 10/09/2018 ? 17:49, Thomas Petazzoni a ?crit?:
> Hello,
>
> On Sun, 9 Sep 2018 18:37:50 +0200, Romain Naour wrote:
>> Use the same workaround [1] as gnulib use to get the original
>> definition of stat. Otherwise with musl toolchains, gnulib try to use
>> rpl_stat which is not defined.
>>
>> Fixes:
>> https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308
>>
>> [1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>
> I am confused by this patch. Why do we need that? The <sys/stat.h> on
> my system doesn't test __need_system_sys_stat_h. Is this a workaround
> to force gnulib to not provide its own stat() replacement ?
>
> Why is gnulib misbehaving here ? We have tons of gnulib related hacks
> in gdb.mk, and this start to pile up quite a bit. Why do we have all
> those gnulib issues with gdb ? Why not with tons of other packages that
> also use gnulib ?
There are too many questions here, I can't answer.
There are some (old) hack with coreutils like gl_cv_func_gettimeofday_clobber
which is in Buildroot since a long time. I can't tell for every gnulib based
packages...
>
>> +Use the same workaround [1] as gnulib use to get the original
>> +definition of stat. Otherwise with musl toolchains, gnulib try to use
>> +rpl_stat which is not defined.
>
> Well rpl_stat() is supposed to be implemented by gnulib. So basically
> gnulib tells gdb: please don't use stat() but my rpl_stat() wrapper,
> but then gnulib doesn't provide rpl_stat().
>
> Any idea what's happening here ?
As far I can tell, the regression has been introduced by this commit:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2441702a72f324e41a1624dc042b334f375e2d81
Best regards,
Romain
>
> Thomas
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system
[not found] ` <20180910224128.GT1878@brightrain.aerifal.cx>
@ 2018-09-11 6:46 ` Thomas Petazzoni
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2018-09-11 6:46 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 10 Sep 2018 18:41:28 -0400, Rich Felker wrote:
> I'm not aware of all the context, but it looks like different source
> files disagree on whether gnulib has replaced stat or not -- the
> gnulib source file thinks it hasn't, so the rpl_stat function isn't
> defined, but gdb's common-utils-ipa.c file (or rather the gnulib
> stat.h included into it?) thinks it has been replaced and is trying to
> use the replacement. This is likely the result of an incorrect hack
> somewhere. Do you know if it happens with upstream gdb and musl or
> just in buildroot's package?
Well, Buildroot is using upstream musl and gdb. For both packages, we
have only very few patches:
https://git.buildroot.org/buildroot/tree/package/musl/
https://git.buildroot.org/buildroot/tree/package/gdb/8.1.1/
Note that we already have a number of gnulib related hacks in gdb.mk:
https://git.buildroot.org/buildroot/tree/package/gdb/gdb.mk#n77
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system
2018-09-09 16:37 ` [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system Romain Naour
2018-09-10 15:49 ` Thomas Petazzoni
@ 2018-09-12 21:46 ` Thomas Petazzoni
1 sibling, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2018-09-12 21:46 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 9 Sep 2018 18:37:50 +0200, Romain Naour wrote:
> Use the same workaround [1] as gnulib use to get the original
> definition of stat. Otherwise with musl toolchains, gnulib try to use
> rpl_stat which is not defined.
>
> Fixes:
> https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308
>
> [1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Upstream has fixed the issue. Could you try to backport upstream
commit 3c025cfe5efc44eb4dfb03b53dca28e75096dd1e instead, and see if it
solves the problem ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] package/gdb: move patch directory
2018-09-09 16:37 [Buildroot] [PATCH 1/2] package/gdb: move patch directory Romain Naour
2018-09-09 16:37 ` [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system Romain Naour
2018-09-10 15:22 ` [Buildroot] [PATCH 1/2] package/gdb: move patch directory Thomas Petazzoni
@ 2018-10-01 14:59 ` Peter Korsgaard
2 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2018-10-01 14:59 UTC (permalink / raw)
To: buildroot
>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:
> commit 9cf4964da56863dfe4ce729c32400bd9acf25ee7 forgot to move patch directory.
> Fixes:
> https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552306
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
Committed to 2018.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-10-01 14:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-09 16:37 [Buildroot] [PATCH 1/2] package/gdb: move patch directory Romain Naour
2018-09-09 16:37 ` [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system Romain Naour
2018-09-10 15:49 ` Thomas Petazzoni
2018-09-10 21:20 ` Romain Naour
[not found] ` <20180910224128.GT1878@brightrain.aerifal.cx>
2018-09-11 6:46 ` Thomas Petazzoni
2018-09-12 21:46 ` Thomas Petazzoni
2018-09-10 15:22 ` [Buildroot] [PATCH 1/2] package/gdb: move patch directory Thomas Petazzoni
2018-10-01 14:59 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.