Opened 3 years ago

Closed 20 months ago

#63707 closed defect (fixed)

clang-13: fix for SnowLeopard

Reported by: kencu (Ken) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version:
Keywords: snowleopard haspatch Cc: mascguy (Christopher Nielsen)
Port: clang-13

Description (last modified by kencu (Ken))

FYI clang-13 / flang-13 / mlir-13 builds without trouble on SnowLeopard if libcxx has been upgraded to the version that supports thread_local_storage:

To rebuild libcxx with full thread_local support, please install clang-9.0 or any macports-clang >= clang-5.0 and then rebuild libcxx like this:

sudo port -v -n upgrade --force --enforce-variants libcxx +emulated_tls

and if the attached patch is used.

$ port -v installed clang-13
The following ports are currently installed:
  clang-13 @13.0.0_0+analyzer+defaultlibcxx+libstdcxx (active) requested_variants='' platform='darwin 10' archs='x86_64' date='2021-10-27T09:39:39-0700'

Attachments (1)

0017-10.6-and-less-libcxxabi-work-around-no-reexported_symbo.patch (1.4 KB) - added by kencu (Ken) 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 3 years ago by kencu (Ken)

Keywords: snowleopard added
Port: clang-13 added

comment:2 Changed 3 years ago by kencu (Ken)

Keywords: haspatch added

comment:3 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:4 Changed 3 years ago by kencu (Ken)

Description: modified (diff)

comment:5 Changed 2 years ago by devernay (Frédéric Devernay)

Great!

Any reason why +emulated_tls should not be the default (and maybe not even a variant) on Snow Leopard, since a modern clang is pretty much a requirement anyway?

comment:6 Changed 2 years ago by kencu (Ken)

We have not been able to automatically bootstrap from bare metal SnowLeopard to a full TLS-supporting libc++ to date.

It is still a two step process -- install libcxx, install clang-9.0 or so, then reinstall libcxx with emulated_tls.

I had an idea to use a bootstrap self-contained version of gcc7 or gcc10 to build clang-something (maybe clang-5.0?) against libstdc++, which is what Ubuntu does, and use that clang as the bootstrap, to build libcxx (with emulated TLS) in one go, and then build clang-9.0, etc against that libc++. Just never got around to it.

Another option -- to download and install a prebuilt libc++ with emulated_tls enabled, and then use that to bootstrap to a new one that we build, was less desirable.

Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:7 Changed 2 years ago by mojca (Mojca Miklavec)

Ken, would you be willing to add that patch to the git tree (even if the build itself is kept disabled for now)?

comment:8 Changed 2 years ago by kencu (Ken)

sure can.

comment:9 Changed 20 months ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In f42838cad0d35f2a2d48e70e5b22d96f7769a0f5/macports-ports (master):

clang-13: fix and allow build on 10.6

closes: #63707

Note: See TracTickets for help on using tickets.