Gcc is not involved for creating the native compiler and from what I can see also not for executables created by crosscompiler.
No, but Free Pascal has the opportunity to 'interact' with c libraries (dynamically/statically loaded/linked) in which case c conventions need to be followed. If that is something that the riscos target does not wish to support then that is up to you (riscos users/devs).
have a look at e.g.
( was What do you look at)
OK ,, I didn't see the rest of that sentens. :-)
If you read my rants here I have modified rtl/linux/arm/syscall.inc to call riscos swi and that seems to work without issues.
I know perfectly well how to do swi calls and I also know the riscos kernel works.
I believe marcov meant that you can have a look at where it si located and how fpc implements it. It basically/usually means copy-paste with some minor adjustments.
One library is OSLib which gives you C functions for swis, but it doesn't give much advantage in the fpc context.
That depends. see my previous remark but also note that things become a lot easier wrt porting when the RTL is able to rely on something more 'generic'. Most if not all OS are written predominantly using c.
Not trying impress , but I have done 4 bringups of riscos to new arm targets. That means that I talk arm assembly pretty fluently.
No one is questioning your capabilities. My background originates from 65xx and 68k asm but that isn't particularly helpful in trying to bring up a compiler such as fpc either (yes it is good to understand the generated asm code so that you can figure out why/where things go wrong but usually that is caused by something buried in the compiler and being able to figure out where exactly is usually more productive but requires knowledge on the (undocumented) internals of the compiler).
I do not know if I told in public or to stefan personally but because things are undocumented I am trying to write things down so that the situation can be improved (the documentation that does exist is pretty much outdated). It is pretty easy to figure out what files need to be touched by looking at the commit history of a (previous) bring-up but that doesn't really explain the why and nitty gritty details. What does become clear when you see such commit history is how for instance things influences others in the compiler, which startup-code is used and how to instruct the assembler/linker for a specific target. That is besides adding the RTL for the target and some other internal details of what a target supports (or not).
We are fortunate that the cpu is (already) supported by Free Pascal (otherwise that would have to done as well) and that FPC is already able to target (more or less) generic
operating systems for that CPU. That mans that we can have a look at what is already done and copy-paste whatever is required/supported (plus/minus some adjustments).