From nobody Thu Nov 23 18:23:54 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sbmj02Wfqz52JGw for ; Thu, 23 Nov 2023 18:24:04 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sbmhz6zJpz3NWL for ; Thu, 23 Nov 2023 18:24:03 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.17.1/8.17.1) with ESMTPS id 3ANINthg013514 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 23 Nov 2023 19:23:55 +0100 (CET) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.17.1/8.17.1/Submit) id 3ANINspX013513; Thu, 23 Nov 2023 19:23:54 +0100 (CET) (envelope-from fuz) Date: Thu, 23 Nov 2023 19:23:54 +0100 From: Robert Clausecker To: John F Carr Cc: FreeBSD ARM List Subject: Re: Undefined __aeabi_uidivmod in 14.0 armv7 Message-ID: References: <0EBEB2B6-198D-47C5-8715-02F19EF5ED06@mit.edu> List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0EBEB2B6-198D-47C5-8715-02F19EF5ED06@mit.edu> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Queue-Id: 4Sbmhz6zJpz3NWL 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