[MacPorts] #69073: pcre2 fails to build for i386 with gcc-13: no such instruction: `lzcnt %eax, %eax'
MacPorts
noreply at macports.org
Mon Jan 8 18:35:40 UTC 2024
#69073: pcre2 fails to build for i386 with gcc-13: no such instruction: `lzcnt
%eax, %eax'
---------------------------+-------------------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: i386, snowleopard
Port: pcre2 |
---------------------------+-------------------------------
Comment (by kencu):
The assembler doesn't understand the noted instruction.
The assembler used by gcc when building on older Intel systems is
something that requires a bit of understanding. By default, the original
"gas" assembler is used. This is very very old now, however, and is
missing support for a lot of commonly used instructions.
Josh modified MacPorts' cctools some years ago now to have the assembler
spin off to any new clang version that might be installed instead (clang
can function as just the assembler, and it has support for more modern
assembly instructions).
Exactly which clang will be used is where things get murky, but it is
basically going to be the newest clang you have installed. The details of
how it is selected are in the cctools portfile and patches.
In practice, if you have clang-9.0 and clang-11 installed, which you
commonly do have on these systems, gcc will use one of those as the
assembler and usually that is sufficient.
Because this issue didn't come up all that often, it was decided not to
force gcc to always have a clang installed. However, as time goes by, it
is coming up more, so perhaps that will need to be forced eventually.
If you already do have some fairly recent clang installed, and you are
still seeing this assembler error, then there might be something else
going on that needs tweaking.
--
Ticket URL: <https://trac.macports.org/ticket/69073#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list