Re: Undefined __aeabi_uidivmod in 14.0 armv7

From: Robert Clausecker <fuz_at_freebsd.org>
Date: Thu, 23 Nov 2023 18:23:54 UTC
Hi John,

This is a long standing open issue in base.  These __aeabi symbols are
shims used by the ARM EABI to implement functionality missing in the
instruction set.  Back when this was implemented, whoever did the port
hacked something up and only added those symbols that were initially
needed.  However, turns out a bunch more will be used by gcc/clang
under certain circumstances.

While we actually have code for all of these symbols in clang's runtime,
the version scripts were never fixed and the symbols remain unexposed.
I have previously raised this issue with a bunch of people involved in
the ARM bits of FreeBSD but never managed to get anybody to fix it.

Maybe it'll be different this time.

If you want to give it a try yourself, check the ARM EABI document.  It
has a list of all __aeabi symbols that should be present.  You could try
and add the missing ones to the appropriate libraries.

Yours,
Robert Clausecker

Am Thu, Nov 23, 2023 at 12:15:58PM +0000 schrieb John F Carr:
> Before submitting this as a bug, I want to know which component is at fault.
> 
> I upgraded my armv8 host and armv7 jail to 14.0.  Using poudriere to build
> armv7 packages, ruby33 fails:
> 
>     making encs
>     Generating RDoc documentation
>     ld-elf.so.1: /usr/local/lib/libunwind.so.8: Undefined symbol "__aeabi_uidivmod"
>     *** Error code 1
> 
> I confirmed that libunwind.so does have a dynamic dependency
> on __aeabi_uidivmod.  That function is defined in /usr/lib/libgcc.a
> as a wrapper around __udivmodsi4 in the same library.  It is
> not defined in /lib/libgcc_s.so.
> 
> Linking something against libgcc.a would fix this.
> 
> The _aeabi_ family of functions, as far as I can tell, is only used
> with -target arm-none-eabi and not with the default target.  Using
> better compiler flags would also fix this.
> 
> So...
> 
> Is this a bug in base: libgcc.so lacks or does not export __aeabi_uidivmod?
> Is this a bug in base: the compiler does not link libgcc.a?
> Is this a bug in devel/libtool: libtool does not link libgcc.a?
> Is this a bug in devel/libunwind?
> Is this a bug in lang/ruby33?
> Is this a bug in some unknown component compiled for EABI instead of FreeBSD?
> 
> 
> 
> 

-- 
()  ascii ribbon campaign - for an 8-bit clean world 
/\  - against html email  - against proprietary attachments