mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Stafford Horne <shorne@gmail.com>
Cc: buildroot@buildroot.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	mmayer@broadcom.com, yann.morin.1998@free.fr,
	musl@lists.openwall.com
Subject: [musl] Re: [Buildroot] [PATCH] package/cpulimit: Disable build on OpenRISC with musl-libc
Date: Sat, 14 May 2022 20:42:57 -0700	[thread overview]
Message-ID: <faa43149-a101-746e-89be-2859a057e1d2@gmail.com> (raw)
In-Reply-To: <YoByu/uEWlDx+AT9@antec>



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

      reply	other threads:[~2022-05-15  3:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220511001947.2112747-1-f.fainelli@gmail.com>
     [not found] ` <YoBg1aDzr7cEYB/l@antec>
     [not found]   ` <14506c30-bf1c-71b3-bda5-b9105adf85b4@gmail.com>
2022-05-15  3:25     ` Stafford Horne
2022-05-15  3:42       ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=faa43149-a101-746e-89be-2859a057e1d2@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=mmayer@broadcom.com \
    --cc=musl@lists.openwall.com \
    --cc=shorne@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).