Re: Build error for moxiebox architecture

Torbjorn SVENSSON <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>

On 2023-09-19 10:04, Chris Packham wrote:
> On Mon, Aug 14, 2023 at 10:24 PM Torbjorn SVENSSON
> <[email protected]> wrote:
>>
>> Hello,
>>
>> On 2023-08-13 02:27, Chris Packham wrote:
>>> Hi All,
>>>
>>> I'm getting the next crosstool-ng release together and one build
>>> failure we're having is for the moxiebox architecture:
>>>
>>> moxie-unknown-moxiebox/lib/libc.a(libc_a-closer.o): in function `_close_r':
>>> moxie-unknown-moxiebox/src/newlib/newlib/libc/reent/closer.c:47:
>>> undefined reference to `_close'
>>>
>>> and similar for _lseek, _read, _write and _sbrk
>>
>> As you do not include the link line, I'm assuming that you are not using
>> anything out of the ordinary. In this case, maybe you should give
>> --specs=nosys.specs a go and see if it helps.
>> Regardless if it helps or not, it will likely only provide you with
>> stubs that you need to override in you application to get something working.
> 
> Yeah sorry. I'll get things in an issue for ct-ng so we have a proper
> record to refer back to.
> 
> One thing I have found is that things work fine with 4.2.0.20211231
> but fail with 4.3.0.20230120 (or the tip of main). I did see the
> recent commit 55485616b ("Bring back libsim.a for riscv") and I note
> the moxiebox definition of _close() is in libsim.a so this made me
> wonder if whatever issue was affecting riscv was related to the moxie
> failure. But I also note that there has been a bit of a change in some
> Makefiles as per commit 66dfedc28 ("libgloss: merge bfin into
> top-level Makefile").

I think you should not link with libsim.a when you are not using a 
simulator.

> 
> So as a first step maybe I need to do a similar conversion. It looks
> like those conversions involve some code changes and then the result
> of running automake but I'm not sure what parts are manual and what
> parts are from running automake. Any pointers on doing this for
> another architecture.

Sorry, but I can't help you on that.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.