[MacPorts] #69480: llvm-17 fails to build agains port:legacy-support=1.1.1 when the latter is build with -flto
MacPorts
noreply at macports.org
Wed May 29 17:46:23 UTC 2024
#69480: llvm-17 fails to build agains port:legacy-support=1.1.1 when the latter is
build with -flto
-----------------------------+--------------------
Reporter: RJVB | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: legacy-support |
-----------------------------+--------------------
Comment (by fhgwright):
Replying to [comment:10 RJVB]:
> Sorry, no, I moved on to other things since I had a workaround (and
llvm-17 turns out to be barely useable for me anyway). You must have
sensed though that I was planning to update my legacy-support install
(with the tiny hope that'll fix `go` from crashing systematically).
At the time of my previous response, the symptom you were seeing looked
very much like a compatibility issue that I'd already fixed. At the time,
the fix was only in `legacy-support-devel`, but that was a few releases
ago. So the question is, if you do exactly the same thing as you were
doing before, but with the current `legacy-support`, do you still see the
problem? If not, then this ticket should be closed.
BTW, was my comment about `ccache` relevant?
> Do you have any interest in knowing whether building the components of
the static library with `-fPIC` fixes the issue (supposing it persists
otherwise)? As I implied above, that ''should'' allow you to simplify the
buildsystem and reduce the build time; compile everything once, `$(AR)`
the static library and then invoke `$(CC)` (or `$(CXX)`) to link that
archive into a shared library.
The reason one normally doesn't use `-fPIC` unconditionally is because
there's usually some performance cost, albeit not necessarily a large one.
Granted, most uses are for the shared library, where `-fPIC` is mandatory,
but I don't think it makes sense to inflict it on the static library
without good reason. Build time isn't really an issue, given that it
typically builds in well under a minute, even without parallel builds.
It's not `gcc` or `llvm`. :-)
I wouldn't be inclined to apply `-fPIC` unconditionally just as a potshot
at a nonunderstood problem.
--
Ticket URL: <https://trac.macports.org/ticket/69480#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list