This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Properly building newlib to install spec files
- From: Jozef Lawrynowicz <jozef dot l at mittosystems dot com>
- To: Orlando Arias <orlandoarias at gmail dot com>
- Cc: Mojca Miklavec <mojca at macports dot org>, "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Wed, 6 Nov 2019 12:25:06 +0000
- Subject: Re: Properly building newlib to install spec files
- References: <3456e0e8-6b7a-2180-7726-e9c41bad2a59@gmail.com> <20191106110753.699ec1ce@jozef-kubuntu>
On Wed, 6 Nov 2019 11:07:53 +0000
Jozef Lawrynowicz <jozef.l@mittosystems.com> wrote:
.. snip ..
>
> As you discovered, nosys still exists but it is enabled by using the GCC -msim
> option. The real use case for stubbing out system calls is when running programs
> in the simulator.
Whoops, that should actually say that nosys (libnosys.a) is used when running on
real hardware (the default), whilst a separate simulator library (libsim.a) is
used when -msim is passed to GCC.
Jozef
>
> In the default configuration which assumes the program will run on real
> hardware, most system calls (except write() and unlink()) are stubbed out
> and just loop forever. So there will be very little (if any) code size
> bloat from using the default configuration over -msim.
>
> When TI CIO functionality is added to the other syscalls, there could be a
> use case to provide an option (--specs or otherwise) which enables them to be
> stubbed out again.
>
> Hope this helps,
> Jozef
>
> >
> > Again, thank you.
> >
> > Cheers,
> > Orlando.
> >
> > [1] ftp://sourceware.org/pub/newlib/index.html
> >
>