package/glibc: glibc on or1k needs a toolchain w/ headers >= 5.4
PATCH 1/2 package/glibc: glibc on or1k needs a toolchain w/ headers >= 5.4
Commit [1] enabled glibc on or1k since it's now supported but it requires a toolchain with linux-headers >= 5.4.
From [2]:
"Here we define the minumum linux kernel version at 5.4.0, as that is the long term support version where 32-bit architectures start to support 64-bit time API's. The OpenRISC kernel had some bugs up until version 5.8 which caused issues with glibc fork/clone, they have been backported to 5.4 but not previous versions."
Fixes:
checking installed Linux kernel header files... 3.2.0 or later checking for kernel header at least 5.4.0... too old!
configure: error: *** The available kernel headers are older than the requested
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/2875256686
[1] 68d0aede597d32816c5b2ff32de0ce33cc14eb93
[2] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c3c62ca7d9ff3bdacdd13e636bc858101e3e288
--- package/glibc/Config.in | 1 + toolchain/toolchain-buildroot/Config.in | 4 ++++ 2 files changed, 5 insertions(+)
package/glibc/Config.in +1 -0
@@ -36,6 +36,7 @@ config BR2_PACKAGE_GLIBC_SUPPORTS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008 depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 || !BR2_RISCV_64 depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 || !BR2_arc + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 || !BR2_or1k if BR2_TOOLCHAIN_BUILDROOT_GLIBC
toolchain/toolchain-buildroot/Config.in +4 -0
@@ -67,6 +67,10 @@ comment "glibc on ARC needs a toolchain w/ headers >= 5.1" depends on BR2_arc depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 +comment "glibc on or1k needs a toolchain w/ headers >= 5.4" + depends on BR2_or1k + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + config BR2_TOOLCHAIN_BUILDROOT_MUSL bool "musl" depends on BR2_PACKAGE_MUSL_SUPPORTS
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/gdb: prevent gdbserver being selected for or1k builds
There is currently no version of gdbserver for or1k. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for or1k builds. In practice this means that 'cross gdb for the host' cannot be selected and that 'full debugger' must be automatically selected for the gdb target package
---
gdbserver for or1k requires gdb 12.1 [1] but this version is not available in Buildroot 2022.08 and only in the next branch (upcoming 2022.011).
--- package/gdb/Config.in | 3 +++ package/gdb/Config.in.host | 1 + 2 files changed, 4 insertions(+)
package/gdb/Config.in +3 -0
@@ -17,6 +17,8 @@ config BR2_PACKAGE_GDB depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_INSTALL_LIBSTDCPP + # no gdbserver on or1k + select BR2_PACKAGE_GDB_DEBUGGER if BR2_or1k # When the external toolchain gdbserver is copied to the # target, we don't allow building a separate gdbserver. The # one from the external toolchain should be used.
@@ -43,6 +45,7 @@ if BR2_PACKAGE_GDB config BR2_PACKAGE_GDB_SERVER bool "gdbserver" depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + depends on !BR2_or1k help Build the gdbserver stub to run on the target. A full gdb is needed to debug the progam.
package/gdb/Config.in.host +1 -0
@@ -3,6 +3,7 @@ config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS default y depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT) depends on !BR2_microblaze + depends on !BR2_or1k comment "Host GDB Options" depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [for-master 2/2] package/gdb: prevent gdbserver being selected for or1k builds
Hello Romain,
Quoted 7 lines · On Sat, 27 Aug 2022 18:14:31 +0200 Romain Naour <[email protected]> wrote:
There is currently no version of gdbserver for or1k. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for or1k builds. In practice this means that 'cross gdb for the host' cannot be selected and that 'full debugger' must be automatically selected for the gdb target package
Quoted 6 lines
Signed-off-by Romain Naour <[email protected]>Cc Stafford Horne <[email protected]>---
gdbserver for or1k requires gdb 12.1 [1] but this version is not available in Buildroot 2022.08 and only in the next branch (upcoming 2022.011).
But in:
commit 991b7b990ad8cd4a37564cd91d5bb0ee7e1e9f11
Author: Stafford Horne <[email protected]> Date: Sat Jul 30 07:07:48 2022 +0900
package/gdb: Enable OpenRISC GDB support
The OpenRiSC gdb port has supported native debugging since version 8.3 and remote debugging since before that. So it is now safe to enabled this.
This patch removes the conditions blocking gdb from being built on or1k architecture builds.
Stafford said that "remote debugging" works.
So, what is correct? :-)
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [for-master 2/2] package/gdb: prevent gdbserver being selected for or1k builds
Hello Thomas,
Le 29/08/2022 à 15:46, Thomas Petazzoni a écrit :
Quoted 31 lines
Hello Romain,
Quoted 7 lines · On Sat, 27 Aug 2022 18:14:31 +0200 Romain Naour <[email protected]> wrote:
There is currently no version of gdbserver for or1k. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for or1k builds. In practice this means that 'cross gdb for the host' cannot be selected and that 'full debugger' must be automatically selected for the gdb target package
Quoted 6 lines
Signed-off-by Romain Naour <[email protected]>Cc Stafford Horne <[email protected]>---
gdbserver for or1k requires gdb 12.1 [1] but this version is not available in Buildroot 2022.08 and only in the next branch (upcoming 2022.011).But in:
commit
991b7b990ad8cd4a37564cd91d5bb0ee7e1e9f11Author: Stafford Horne <[email protected]> Date: Sat Jul 30 07:07:48 2022 +0900package/gdb: Enable OpenRISC GDB support
The OpenRiSC gdb port has supported native debugging since version 8.3 and remote debugging since before that. So it is now safe to enabled this.
Quoted 7 lines
This patch removes the conditions blocking gdb from being built on or1k architecture builds.
Signed-off-by Stafford Horne <[email protected]>Signed-off-by Yann E. MORIN <[email protected]>Stafford said that "remote debugging" works.
I'm not sure about "remote debugging" but the commit I'm referring is titled "gdb: or1k: implement gdb server"
I noticed that or1k entry is missing in gdbserver/configure.srv until gdb 12.
Quoted 2 lines
So, what is correct? :-)
I guess git has the answer:
$ git tag --contains 4933265c3f71b9134363d0c05f09542d5cc677f4 binutils-2_38 binutils-2_39 gdb-12-branchpoint gdb-12.1-release
Best regards,
Romain
Quoted 2 lines
Thomas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedRe: [Buildroot] [for-master 2/2] package/gdb: prevent gdbserver being selected for or1k builds
In reply to Romain NaourQuoted 9 lines · Romain Naour
There is currently no version of gdbserver for or1k. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for or1k builds. In practice this means that 'cross gdb for the host' cannot be selected and that 'full debugger' must be automatically selected for the gdb target package
Signed-off-by Romain Naour <[email protected]>Cc Stafford Horne <[email protected]>
Applied to master, thanks, after extending the commit message with:
This partially reverts commit 991b7b990ad8cd4a37564cd91d5bb0ee7e1e9f11 which claimed that gdbserver for or1k was already supported before version 8.3. That is not true - the commit that adds gdbserver support for or1k [1] was only merged for version 12.1, which hasn't been integrated in Buildroot yet.
Without that support, the build of gdbserver fails with
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: server.o: in function `main':
server.cc:(.text.startup+0x6dc): undefined reference to `initialize_low()'
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: remote-utils.o: in function `prepare_resume_reply(char*, ptid_t, target_waitstatus*)':
remote-utils.cc:(.text+0x28a8): undefined reference to `using_threads'
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: remote-utils.cc:(.text+0x28b0): undefined reference to `using_threads'
Fixes:
http://autobuild.buildroot.net/results/b3c/b3c0df53d09d9facaf0c3c2bc4529f9fcf7737ee
[1]
Regards,
Arnout
Quoted 37 lines
---
gdbserver for or1k requires gdb 12.1 [1] but this version is not available in Buildroot 2022.08 and only in the next branch (upcoming 2022.011).--- package/gdb/Config.in | 3 +++ package/gdb/Config.in.host | 1 + 2 files changed, 4 insertions(+)package/gdb/Config.in +3
-0@@ -17,6 +17,8 @@ config BR2_PACKAGE_GDB depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_INSTALL_LIBSTDCPP + # no gdbserver on or1k + select BR2_PACKAGE_GDB_DEBUGGER if BR2_or1k # When the external toolchain gdbserver is copied to the # target, we don't allow building a separate gdbserver. The # one from the external toolchain should be used.@@ -43,6 +45,7 @@ if BR2_PACKAGE_GDB config BR2_PACKAGE_GDB_SERVER bool "gdbserver" depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + depends on !BR2_or1k help Build the gdbserver stub to run on the target. A full gdb is needed to debug the progam.package/gdb/Config.in.host +0
-0
package/gdb/Config.in.host config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS · line 9
Quoted 7 lines
package/gdb/Config.in.host +1
-0@@ -3,6 +3,7 @@ config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS default y depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT) depends on !BR2_microblaze + depends on !BR2_or1k comment "Host GDB Options" depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedQuoted 16 lines · Romain Naour
Commit [1] enabled glibc on or1k since it's now supported but it requires a toolchain with linux-headers >= 5.4.
From [2]:
"Here we define the minumum linux kernel version at 5.4.0, as that is the long term support version where 32-bit architectures start to support 64-bit time API's. The OpenRISC kernel had some bugs up until version 5.8 which caused issues with glibc fork/clone, they have been backported to 5.4 but not previous versions."Fixes:
checking installed Linux kernel header files... 3.2.0 or later checking for kernel header at least 5.4.0... too old!
configure: error: *** The available kernel headers are older than the requested
Quoted 6 lines
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/2875256686
[1]
68d0aede597d32816c5b2ff32de0ce33cc14eb93
[2] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c3c62ca7d9ff3bdacdd13e636bc858101e3e288Signed-off-by Romain Naour <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 22 lines
--- package/glibc/Config.in | 1 + toolchain/toolchain-buildroot/Config.in | 4 ++++ 2 files changed, 5 insertions(+)package/glibc/Config.in +1
-0@@ -36,6 +36,7 @@ config BR2_PACKAGE_GLIBC_SUPPORTS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008 depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 || !BR2_RISCV_64 depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 || !BR2_arc + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 || !BR2_or1k if BR2_TOOLCHAIN_BUILDROOT_GLIBCtoolchain/toolchain-buildroot/Config.in +0
-0
toolchain/toolchain-buildroot/Config.in comment "glibc on ARC needs a toolchain w/ headers >= 5.1" · line 76
Quoted 10 lines
toolchain/toolchain-buildroot/Config.in +4
-0@@ -67,6 +67,10 @@ comment "glibc on ARC needs a toolchain w/ headers >= 5.1" depends on BR2_arc depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 +comment "glibc on or1k needs a toolchain w/ headers >= 5.4" + depends on BR2_or1k + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + config BR2_TOOLCHAIN_BUILDROOT_MUSL bool "musl" depends on BR2_PACKAGE_MUSL_SUPPORTS
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 18 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
Commit [1] enabled glibc on or1k since it's now supported but it requires a toolchain with linux-headers >= 5.4.
From [2]:
"Here we define the minumum linux kernel version at 5.4.0, as that is the long term support version where 32-bit architectures start to support 64-bit time API's. The OpenRISC kernel had some bugs up until version 5.8 which caused issues with glibc fork/clone, they have been backported to 5.4 but not previous versions."Fixes:
checking installed Linux kernel header files... 3.2.0 or later checking for kernel header at least 5.4.0... too old!
configure: error: *** The available kernel headers are older than the requested
Quoted 6 lines
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/2875256686
[1]
68d0aede597d32816c5b2ff32de0ce33cc14eb93
[2] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c3c62ca7d9ff3bdacdd13e636bc858101e3e288Signed-off-by Romain Naour <[email protected]>
Committed to 2022.05.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot