[MacPorts] #70859: GMP build with GCC, not Clang
MacPorts
noreply at macports.org
Sat Sep 21 23:48:28 UTC 2024
#70859: GMP build with GCC, not Clang
-----------------------+---------------------
Reporter: haberg-1 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: ventura
Port: gmp |
-----------------------+---------------------
Comment (by kencu):
If you download the current gmp software from here:
https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
decompress it and just build in on a current arm64 Mac system, outside of
MacPorts, just with standard tools (Xcode and CLT installed, clang and
standard tools used) you get a 100% pass:
{{{
========================================
GNU MP 6.3.0: tests/test-suite.log
========================================
# TOTAL: 8
# PASS: 8
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
}}}
I realize, looking at the above message and <https://gmplib.org/list-
archives/gmp-bugs/2024-June/005494.html>, there is an alignment error with
the x86_64 assembly code that now flags on MacOS as recent MacOS versions
are intolerant of unaligned pointers. We have several MacPorts tickets
about software trying to force unaligned pointers and Xcode clang / linker
rejecting that.
The unaligned pointer issue seemed to be in one assembly file
{{{bdiv_q_1.asm}}}. I noticed that file was forcing a low alignment of 8:
https://github.com/gmp-
mirror/gmp/blob/14fe69d7f56e00917e9fd9ab616afc798a1af6c1/mpn/x86_64/bdiv_q_1.asm#L137
I wondered if that might be the problem. I haven't as yet tried to fix it
though.
So it might be premature to say clang is broken here.
--
Ticket URL: <https://trac.macports.org/ticket/70859#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list