Re: Newlib-3.3.0 build failed with gcc-9.3.0 armv6-m

Emmanuel Blot via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>

On 21 Mar 2020, at 18:45, bitmap kid via Newlib wrote:

> Hello,
>
> When I compile newlib with a gcc-9.3.0, i get the following error :

> arm-unknown-eabi-gcc
> ../../../../newlib-3.3.0/libgloss/arm/linux-syscalls0.S:103: Error: 
> SVC is
> not permitted on this architecture
> make[3]: *** [Makefile:126 : linux-syscalls0.o] Erreur 1

I’ve bumped on this one so many times :-)
I do not get why the build system tries to build Linux syscalls for a 
baremetal target, hence the error.

> Am I at an impasse ?

Not really. If there is no better way, you can apply a small patch to 
disable building those files.
See for example the patch files from 
https://github.com/eblot/homebrew-armeabi/blob/master/armv6m-cortex-m0plus.rb, 
I’d day the one you want to have a look at is 
https://gist.githubusercontent.com/eblot/2f0af31b27cf3d6300b190906ae58c5c/raw/de43bc16b7280c97467af09ef329fc527296226e/newlib-arm-eabi-3.1.0.patch/

HTH,
Manu
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.