Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2019 12:28:56 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        adr <adr@SDF.ORG>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: FreeBSD arm EABI5 documentation?
Message-ID:  <da6a8f7e596da9bf9015f76798a5575908ad1be4.camel@freebsd.org>
In-Reply-To: <alpine.NEB.2.21.1907101735020.3201@sdf.lonestar.org>
References:  <alpine.NEB.2.21.1907101508370.22895@sdf.lonestar.org> <f2967859f68f1d40f260661791126956f48f4d12.camel@freebsd.org> <alpine.NEB.2.21.1907101735020.3201@sdf.lonestar.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2019-07-10 at 18:19 +0000, adr wrote:
> On Wed, 10 Jul 2019, Ian Lepore wrote:
> > Stack alignment requirement is 8 bytes.  The full EABI spec is
> > here:
> > 
> > https://static.docs.arm.com/ihi0042/g/aapcs32.pdf
> 
> I suppose then that this behavior is not a OS imposition, but
> the llvm calling convention. I'll search in their documentation.
> I've never used clang before.
> 

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.

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.

-- Ian

> > I can't help with the gcc thing, I've only used clang from base for
> > compiling proprietary code.
> 
> Well, deinstalling gcc fix the problem. I almost heard the soup nazi:
> not gcc for you!
> 
> Regards,
> adr.
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org
> "




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?da6a8f7e596da9bf9015f76798a5575908ad1be4.camel>