package/gdb: move patch directory
PATCH 1/2 package/gdb: move patch directory
commit 9cf4964da56863dfe4ce729c32400bd9acf25ee7 forgot to move patch directory.
Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552306
---
.../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%)package/gdb/8.1.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch renamed from package/gdb/8.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +0 -0
package/gdb/8.1.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch renamed from package/gdb/8.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch +0 -0
package/gdb/8.1.1/0003-use-asm-sgidefs.h.patch renamed from package/gdb/8.1/0003-use-asm-sgidefs.h.patch +0 -0
package/gdb/8.1.1/0004-gdbserver-fix-build-for-m68k.patch renamed from package/gdb/8.1/0004-gdbserver-fix-build-for-m68k.patch +0 -0
package/gdb/8.1.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch renamed from package/gdb/8.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch +0 -0
Signature · 1 line
2.14.4
PATCH 2/2 package/gdb: 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
--- ...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
package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch new file +37 -0
@@ -0,0 +1,37 @@ +From a7848d4244ffa8db7bf4ab0d5152f57e71600420 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +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 <[email protected]> +--- + 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 +
Signature · 1 line
2.14.4
PATCH 2/2 package/gdb: use stat() privided by the system
Hello,
Quoted 11 lines · Romain Naour
Use the same workaround [1] as gnulib use to get the original definition of stat. Otherwise with musl toolchains, gnulib try to use
rpl_statwhich is not defined.Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308Signed-off-by Romain Naour <[email protected]>Cc Thomas Petazzoni <[email protected]>
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 ?
package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch line 8
Quoted 3 lines
package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch new file +3
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 package/gdb: use stat() privided by the system
Hi Thomas,
Adding the gdb-patches ml and Rich Felker in Cc.
Le 10/09/2018 ? 17:49, Thomas Petazzoni a ?crit?:
Quoted 15 lines
Hello,
Quoted 11 lines · Romain Naour
Use the same workaround [1] as gnulib use to get the original definition of stat. Otherwise with musl toolchains, gnulib try to use
rpl_statwhich is not defined.Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308Signed-off-by Romain Naour <[email protected]>Cc Thomas Petazzoni <[email protected]>
Quoted 8 lines
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 ownstat()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...
Quoted 10 lines
package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch line 8
Quoted 4 lines
package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch new file +3
-0+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 usestat()but myrpl_stat()wrapper, but then gnulib doesn't providerpl_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
Quoted 3 lines
Thomas
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 package/gdb: use stat() privided by the system
Hello,
Quoted 8 lines · Rich Felker
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_statfunction isn't defined, but gdb'scommon-utils-ipa.cfile (or rather the gnulibstat.hincluded 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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 package/gdb: use stat() privided by the system
In reply to Romain NaourHello,
Quoted 11 lines · Romain Naour
Use the same workaround [1] as gnulib use to get the original definition of stat. Otherwise with musl toolchains, gnulib try to use
rpl_statwhich is not defined.Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308Signed-off-by Romain Naour <[email protected]>Cc Thomas Petazzoni <[email protected]>
Upstream has fixed the issue. Could you try to backport upstream commit 3c025cfe5efc44eb4dfb03b53dca28e75096dd1e instead, and see if it solves the problem ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Thomas Petazzoni
AppliedPATCH 1/2 package/gdb: move patch directory
In reply to Romain NaourHello,
Quoted 6 lines · Romain Naour
commit
9cf4964da56863dfe4ce729c32400bd9acf25ee7forgot to move patch directory.Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552306Signed-off-by Romain Naour <[email protected]>
Quoted 12 lines
---
.../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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 package/gdb: move patch directory
In reply to Romain NaourQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
commit
9cf4964da56863dfe4ce729c32400bd9acf25ee7forgot to move patch directory. Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552306Signed-off-by Romain Naour <[email protected]>
Committed to 2018.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard