[libcxx-commits] [libcxx] [libcxx] Re-include <osreldate.h> in __config for FreeBSD (PR #77242)

Dimitry Andric via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 8 10:32:33 PST 2024


DimitryAndric wrote:

> Is it not an option to instead compile openjdk11 with a supported version of Clang?

For various reasons, it is not. (There is a long history there, but suffice to say that openjdk11 code is also pretty old by now, and contains constructs that don't fare well with more recent versions of clang.)

> Or, alternatively, you could compile openjdk11 with Clang 12, but also with libc++ 12 which would be a supported configuration.

Unfortunately that is something we haven't yet implemented. At least, nobody stepped up to make that work with the FreeBSD ports system, although various attempts have been made. They always end up failing due to the many tricky details that have to be worked out.

A similar situation exists with the various gcc ports available in the ports system, where if I recall correctly, gcc 4.8 only very recently got dropped (as some older software or architecture still required it). All these gcc ports come with their own copy of libstdc++, and there is no end to trouble when applications mix different versions of libstdc++.so, and even sometimes attempt to mix libc++ and libstdc++...


> The current situation of using Clang 12 with libc++ 17 is actually prone to a lot more issues than this `[[using_if_exists]]` attribute lacking, I would expect a bunch more stuff to start failing in the future and I am a bit surprised you haven't run into other issues yet.

I have applied a few local workarounds, and most things seem to work fine. Though I recognize that this will become a bigger problem in the future. For now I will kick the can down the road.


> Because this is generally a non-supported configuration and this issue is likely just the tip of the iceberg, I would rather not move forward with this patch and instead remove `_LIBCPP_C_HAS_NO_GETS`.

That's also fine, and we'll probably carry a local patch to work around this.


https://github.com/llvm/llvm-project/pull/77242


More information about the libcxx-commits mailing list