Bug 260284

Summary: [math/gmp] v6.2.1 does not compile on an armv7 host
Product: Ports & Packages Reporter: Bertrand Petit <bsdpr>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: bsdpr
Priority: --- Flags: bugzilla: maintainer-feedback? (ale)
Version: Latest   
Hardware: arm   
OS: Any   
Attachments:
Description Flags
Build log with the CPU_OPTS knob enabled
none
Build log with the CPU_OPTS knob disabled
none
Build log with the CPU_OPTS knob enabled (including error messages)
none
Build log with the CPU_OPTS knob disabled (including error messages) none

Description Bertrand Petit 2021-12-09 04:49:52 UTC
On a RPi 2B host, freshly updated to 12/stable (rev d891ee6ac7e6af693959c6d11c5af7c440919ea9), gmp v6.2.1 fails to be built on an attempt to assemble the divrem1 module. 

The failure occurs with and without the CPU_OPTS knob at the same place. Both of the attached build logs were produced with MAKE_JOBS_UNSAFE=yes for clarity.

What could I do to help resolve this situation? Please note that my knowledge of ARM assembler amounts to nil.
Comment 1 Bertrand Petit 2021-12-09 04:51:34 UTC
Created attachment 229986 [details]
Build log with the CPU_OPTS knob enabled
Comment 2 Bertrand Petit 2021-12-09 04:52:12 UTC
Created attachment 229987 [details]
Build log with the CPU_OPTS knob disabled
Comment 3 Bertrand Petit 2021-12-09 06:00:25 UTC
Created attachment 229990 [details]
Build log with the CPU_OPTS knob enabled (including error messages)
Comment 4 Bertrand Petit 2021-12-09 06:01:30 UTC
Created attachment 229991 [details]
Build log with the CPU_OPTS knob disabled (including error messages)
Comment 5 Alex Dupre freebsd_committer freebsd_triage 2021-12-09 08:17:07 UTC
Is the compiler gcc 4.x?
Comment 6 Bertrand Petit 2021-12-09 08:44:29 UTC
The compiler is the base clang, no other compiler is installed.

cc --version
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
Target: armv6-unknown-freebsd12.3-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
Comment 7 Bertrand Petit 2022-01-30 04:44:09 UTC
The issue was caused by a discrepancy between userland (uname -p gave armv7) and base clang default target (armv6). I don't know how I ended up with such a mix. I completely reinstalled this host, the issue if now gone.