FreeBSD arm EABI5 documentation?

adr adr at SDF.ORG
Wed Jul 10 20:00:35 UTC 2019


> It is both a toolchain and an OS matter.  The OS comes into play with
> things like syscalls and signal handling, where arg passing and stack
> alignment requirements have to be compatible between kernel and
> userland.  Also, the toolchain and the OS are more tightly coupled in
> freebsd than you may be used to.  Freebsd isn't a kernel with other
> stuff from other sources glommed on, it's the full combination of
> kernel and userland and toolchain and build system all integrated
> together into a single source base.

That is what I like of BSD. As I said before, I'm new to FreeBSD, but
not to BSD. I only use Linux when I have no other option, mostly because
of lack of hardware support.

> The good news is that freebsd is in sync with pretty much the entire
> rest of the world in this regard.  EABI (aka gnueabihf) is the standard
> used by all major OSes and toolchains these days for armv7.  And clang
> is very gcc-compatible; if you have code that compiles with modern gcc,
> it should compile with no changes using clang; even command-line
> options and flags are compatible.

In NetBSD (and Linux by the way) the C stack aligment of 32bit arm code 
doesn't have to be 8 bytes. The last version I tested of gcc was 8.3.
I'm talking about assembler, of course, using gcc to link the runtime
c code without going crazy. I have not used OpenBSD for years, so I don't
know how things are there today.

Anyway it seems that clang is just following the Arm standards. I think
this is more a gcc vs clang issue. Things are going to be much harder when
porting my code to arm64.

Thanks a lot for the info,
adr.


More information about the freebsd-arm mailing list