* [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc
@ 2022-05-11 0:19 Florian Fainelli
2022-05-14 9:46 ` Arnout Vandecappelle
2022-05-15 2:09 ` Stafford Horne
0 siblings, 2 replies; 6+ messages in thread
From: Florian Fainelli @ 2022-05-11 0:19 UTC (permalink / raw)
To: buildroot; +Cc: Florian Fainelli, Thomas Petazzoni, mmayer, yann.morin.1998
As reported in the following autobuild report:
http://autobuild.buildroot.net/results/2a9cf20949beac46d1c689df2c5b7ab0d59c08b5/
cpulimit does not build due to a lack of definition for elf_gregset_t
which is not currently provided in the or1k musl-libc port. While this
is being worked on, disable the build for or1k and musl-libc.
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Fixes: 9e8e80d1e335 ("package: Add cpulimit")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
package/cpulimit/Config.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/cpulimit/Config.in b/package/cpulimit/Config.in
index 7cab152fc0ea..cca74afc9955 100644
--- a/package/cpulimit/Config.in
+++ b/package/cpulimit/Config.in
@@ -1,7 +1,12 @@
+comment "cpulimit needs a toolchain w/ threads, does not build open openrisc with musl"
+ depends on BR2_USE_MMU
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || (BR2_or1k && BR2_TOOLCHAIN_USES_MUSL)
+
config BR2_PACKAGE_CPULIMIT
bool "cpulimit"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on !(BR2_or1k && BR2_TOOLCHAIN_USES_MUSL)
help
Cpulimit is a tool which limits the CPU usage of a process
(expressed in percentage, not in CPU time)
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc 2022-05-11 0:19 [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc Florian Fainelli @ 2022-05-14 9:46 ` Arnout Vandecappelle 2022-05-15 2:09 ` Stafford Horne 1 sibling, 0 replies; 6+ messages in thread From: Arnout Vandecappelle @ 2022-05-14 9:46 UTC (permalink / raw) To: Florian Fainelli, buildroot; +Cc: mmayer, yann.morin.1998, Thomas Petazzoni On 11/05/2022 02:19, Florian Fainelli wrote: > As reported in the following autobuild report: > > http://autobuild.buildroot.net/results/2a9cf20949beac46d1c689df2c5b7ab0d59c08b5/ > > cpulimit does not build due to a lack of definition for elf_gregset_t > which is not currently provided in the or1k musl-libc port. While this > is being worked on, disable the build for or1k and musl-libc. > > Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > Fixes: 9e8e80d1e335 ("package: Add cpulimit") > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Applied to master, thanks. Regards, Arnout > --- > package/cpulimit/Config.in | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/package/cpulimit/Config.in b/package/cpulimit/Config.in > index 7cab152fc0ea..cca74afc9955 100644 > --- a/package/cpulimit/Config.in > +++ b/package/cpulimit/Config.in > @@ -1,7 +1,12 @@ > +comment "cpulimit needs a toolchain w/ threads, does not build open openrisc with musl" > + depends on BR2_USE_MMU > + depends on !BR2_TOOLCHAIN_HAS_THREADS || (BR2_or1k && BR2_TOOLCHAIN_USES_MUSL) > + > config BR2_PACKAGE_CPULIMIT > bool "cpulimit" > depends on BR2_USE_MMU # fork() > depends on BR2_TOOLCHAIN_HAS_THREADS > + depends on !(BR2_or1k && BR2_TOOLCHAIN_USES_MUSL) > help > Cpulimit is a tool which limits the CPU usage of a process > (expressed in percentage, not in CPU time) _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc 2022-05-11 0:19 [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc Florian Fainelli 2022-05-14 9:46 ` Arnout Vandecappelle @ 2022-05-15 2:09 ` Stafford Horne 2022-05-15 2:14 ` Florian Fainelli 1 sibling, 1 reply; 6+ messages in thread From: Stafford Horne @ 2022-05-15 2:09 UTC (permalink / raw) To: Florian Fainelli; +Cc: yann.morin.1998, mmayer, Thomas Petazzoni, buildroot On Tue, May 10, 2022 at 05:19:47PM -0700, Florian Fainelli wrote: > As reported in the following autobuild report: > > http://autobuild.buildroot.net/results/2a9cf20949beac46d1c689df2c5b7ab0d59c08b5/ > > cpulimit does not build due to a lack of definition for elf_gregset_t > which is not currently provided in the or1k musl-libc port. While this > is being worked on, disable the build for or1k and musl-libc. Hello, You mention this is being worked on. I am curious who is working on this? I try to look over OpenRISC stuff, do you need me to do anything on musl for this? -Stafford _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc 2022-05-15 2:09 ` Stafford Horne @ 2022-05-15 2:14 ` Florian Fainelli 2022-05-15 3:25 ` Stafford Horne 0 siblings, 1 reply; 6+ messages in thread From: Florian Fainelli @ 2022-05-15 2:14 UTC (permalink / raw) To: Stafford Horne; +Cc: yann.morin.1998, mmayer, Thomas Petazzoni, buildroot On 5/14/2022 7:09 PM, Stafford Horne wrote: > On Tue, May 10, 2022 at 05:19:47PM -0700, Florian Fainelli wrote: >> As reported in the following autobuild report: >> >> http://autobuild.buildroot.net/results/2a9cf20949beac46d1c689df2c5b7ab0d59c08b5/ >> >> cpulimit does not build due to a lack of definition for elf_gregset_t >> which is not currently provided in the or1k musl-libc port. While this >> is being worked on, disable the build for or1k and musl-libc. > > Hello, > > You mention this is being worked on. I am curious who is working on this? > > I try to look over OpenRISC stuff, do you need me to do anything on musl for > this? I posted this: https://www.openwall.com/lists/musl/2022/05/10/1 if you don't mind reviewing, thanks! -- Florian _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc 2022-05-15 2:14 ` Florian Fainelli @ 2022-05-15 3:25 ` Stafford Horne 2022-05-15 3:42 ` Florian Fainelli 0 siblings, 1 reply; 6+ messages in thread From: Stafford Horne @ 2022-05-15 3:25 UTC (permalink / raw) To: Florian Fainelli Cc: yann.morin.1998, musl, mmayer, Thomas Petazzoni, buildroot On Sat, May 14, 2022 at 07:14:21PM -0700, Florian Fainelli wrote: > > > On 5/14/2022 7:09 PM, Stafford Horne wrote: > > On Tue, May 10, 2022 at 05:19:47PM -0700, Florian Fainelli wrote: > > > As reported in the following autobuild report: > > > > > > http://autobuild.buildroot.net/results/2a9cf20949beac46d1c689df2c5b7ab0d59c08b5/ > > > > > > cpulimit does not build due to a lack of definition for elf_gregset_t > > > which is not currently provided in the or1k musl-libc port. While this > > > is being worked on, disable the build for or1k and musl-libc. > > > > Hello, > > > > You mention this is being worked on. I am curious who is working on this? > > > > I try to look over OpenRISC stuff, do you need me to do anything on musl for > > this? > > I posted this: > > https://www.openwall.com/lists/musl/2022/05/10/1 > > if you don't mind reviewing, thanks! No problem, I don't have the mail in my inbox, I've subscribed to musl now. Put some comments below based on what I had configured in glibc. diff --git a/arch/or1k/bits/user.h b/arch/or1k/bits/user.h index e69de29bb2d1..3405bf771c0f 100644 --- a/arch/or1k/bits/user.h +++ b/arch/or1k/bits/user.h @@ -0,0 +1,11 @@ +struct user_regs { + unsigned long gpr[32]; + unsigned long pc; + unsigned long sr; +}; OK, matches glibc. +#define ELF_NGREG 34 In glibc we define this as 32. Howerver, we define elf_gregset_t as elf_gregset_t[34]. I don't see where ELF_NGREG is really used so I am not sure of the impact to this. I also can't remember why I set these different in glibc. +typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; + +/* or32 does not have floating point support, placeholder */ +typedef unsigned long elf_fpregset_t; OpenRISC uses the same registers and floating point and integer. This is defined in glibc as: /* Register set for the floating-point registers. */ typedef elf_greg_t elf_fpregset_t[32]; -Stafford _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc 2022-05-15 3:25 ` Stafford Horne @ 2022-05-15 3:42 ` Florian Fainelli 0 siblings, 0 replies; 6+ messages in thread From: Florian Fainelli @ 2022-05-15 3:42 UTC (permalink / raw) To: Stafford Horne; +Cc: yann.morin.1998, musl, mmayer, Thomas Petazzoni, buildroot On 5/14/2022 8:25 PM, Stafford Horne wrote: > On Sat, May 14, 2022 at 07:14:21PM -0700, Florian Fainelli wrote: >> >> >> On 5/14/2022 7:09 PM, Stafford Horne wrote: >>> On Tue, May 10, 2022 at 05:19:47PM -0700, Florian Fainelli wrote: >>>> As reported in the following autobuild report: >>>> >>>> http://autobuild.buildroot.net/results/2a9cf20949beac46d1c689df2c5b7ab0d59c08b5/ >>>> >>>> cpulimit does not build due to a lack of definition for elf_gregset_t >>>> which is not currently provided in the or1k musl-libc port. While this >>>> is being worked on, disable the build for or1k and musl-libc. >>> >>> Hello, >>> >>> You mention this is being worked on. I am curious who is working on this? >>> >>> I try to look over OpenRISC stuff, do you need me to do anything on musl for >>> this? >> >> I posted this: >> >> https://www.openwall.com/lists/musl/2022/05/10/1 >> >> if you don't mind reviewing, thanks! > > No problem, I don't have the mail in my inbox, I've subscribed to musl now. > > Put some comments below based on what I had configured in glibc. > > diff --git a/arch/or1k/bits/user.h b/arch/or1k/bits/user.h > index e69de29bb2d1..3405bf771c0f 100644 > --- a/arch/or1k/bits/user.h > +++ b/arch/or1k/bits/user.h > @@ -0,0 +1,11 @@ > +struct user_regs { > + unsigned long gpr[32]; > + unsigned long pc; > + unsigned long sr; > +}; > > OK, matches glibc. > > +#define ELF_NGREG 34 > > In glibc we define this as 32. Howerver, we define elf_gregset_t as > elf_gregset_t[34]. I don't see where ELF_NGREG is really used so I am > not sure of the impact to this. I also can't remember why I set these > different in glibc. If it this is meant to be number of general purpose registers as the name suggests, then it looks like 32 would be more adequate. > > +typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; > + > +/* or32 does not have floating point support, placeholder */ > +typedef unsigned long elf_fpregset_t; > > OpenRISC uses the same registers and floating point and integer. This is defined > in glibc as: > > /* Register set for the floating-point registers. */ > typedef elf_greg_t elf_fpregset_t[32]; OK, I will send a v2 with those fixes, thanks for taking a look! -- Florian _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-15 3:43 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-05-11 0:19 [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc Florian Fainelli 2022-05-14 9:46 ` Arnout Vandecappelle 2022-05-15 2:09 ` Stafford Horne 2022-05-15 2:14 ` Florian Fainelli 2022-05-15 3:25 ` Stafford Horne 2022-05-15 3:42 ` Florian Fainelli
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.