Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restrict compiler for C++11 and thread-local storage #161

Merged
merged 2 commits into from
Jan 27, 2020

Conversation

MarcusCalhoun-Lopez
Copy link
Contributor

@kencu
Copy link
Contributor

kencu commented Nov 23, 2019

It looks like compiler.thread_local_storage will only function properly if the compiler.cxxstandard is set to 2011 or greater?

We'd have to add that to the guide.

Or we could unhide it from the cxxstandard block, and then it could always work.

up to you.

@jmroot
Copy link
Member

jmroot commented Nov 23, 2019

There is no thread local storage prior to C++11. Asking for it with an earlier C++ standard can't be expected to work.

Copy link
Member

@jmroot jmroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check on line 806 should probably look at ${compiler.thread_local_storage} too.

Older compilers provided by Apple do not support thread-local storage.
@MarcusCalhoun-Lopez
Copy link
Contributor Author

I have added a ${compiler.thread_local_storage} check for the older Apple-provided compilers.
The change might be more for the sake of completeness since a previous check alone might be sufficient.

@jmroot
Copy link
Member

jmroot commented Nov 23, 2019

It's possible to be using llvm-gcc-4.2 on Lion without the added check. Thanks.

@kencu
Copy link
Contributor

kencu commented Nov 23, 2019

So be sure to add to the guide then that this command only works if the cxx standard is also set.

@MarcusCalhoun-Lopez
Copy link
Contributor Author

You point about proper documentation is well-taken.
If this pull request is accepted, I will add a few words on the Trac.

However, I would respectively suggest that this command does not only work when compiler.cxx_standard is set.
compiler.thread_local_storage yes is proper and correct if the code uses __thread or _Thread_local.

Apple even suggests that _Thread_local is to be preferred over thread_local for performance reasons.

@kencu
Copy link
Contributor

kencu commented Nov 23, 2019

for a c++ port that gets a thread_local error when building, adding

"compiler.thread_local_storage yes"

will not fix the port unless a cxxstandard is also set >= 2011.

yes, that's precise. Just imho in would be less confusing, less tickets, less time wasted, and simpler if it just blacklisted Xcode clangs <800 no matter what, because then it would always work.

But I know my "practical just-works" approach bangs heads with you guys sometimes.

@MarcusCalhoun-Lopez MarcusCalhoun-Lopez merged commit 47a0112 into macports:master Jan 27, 2020
@MarcusCalhoun-Lopez MarcusCalhoun-Lopez deleted the thread-local branch January 27, 2020 16:11
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Aug 25, 2020
macports/macports-base#161 is included in 2.6.3 release
compiler.blacklist no longer necessary
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Aug 25, 2020
macports/macports-base#161 is included in 2.6.3 release
compiler.blacklist no longer necessary
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Aug 25, 2020
…instead of compiler.blacklist-append {clang < 800} since
macports/macports-base#161 is included in 2.6.3 release
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Aug 25, 2020
…instead of compiler.blacklist as macports/macports-base#161
is included in 2.6.3 release
michaelld pushed a commit to macports/macports-ports that referenced this pull request Aug 25, 2020
…instead of compiler.blacklist as macports/macports-base#161
is included in 2.6.3 release
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Aug 26, 2020
kencu pushed a commit to macports/macports-ports that referenced this pull request Aug 26, 2020
macports/macports-base#161 is included in 2.6.3 release
compiler.blacklist no longer necessary
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Aug 26, 2020
qt4-mac: use compiler.cxx_standard instead of compiler.blacklist

py-scipy: macports/macports-base#162 is included in 2.6.3 release

uhd: macports/macports-base#161 is included in 2.6.3 release;
can use compiler.thread_local_storage instead of compiler.blacklist

glfw: use known_fail yes on macOS ≤ 10.5, HTTPS homepage, use
compiler.c_standard to cleanup compiler.blacklist while keeping it to
check for Xcode clang with stdatomic.h
ryandesign pushed a commit to macports/macports-ports that referenced this pull request Aug 26, 2020
macports/macports-base#161 is included in 2.6.3 release
compiler.blacklist no longer necessary
ryandesign pushed a commit to macports/macports-ports that referenced this pull request Aug 29, 2020
…instead of compiler.blacklist-append {clang < 800} since
macports/macports-base#161 is included in 2.6.3 release
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Sep 26, 2020
macports/macports-base#161 is included in 2.6.3 release
compiler.blacklist no longer necessary
kencu pushed a commit to macports/macports-ports that referenced this pull request Oct 3, 2020
macports/macports-base#161 is included in 2.6.3 release
compiler.blacklist no longer necessary
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Oct 10, 2020
kencu pushed a commit to macports/macports-ports that referenced this pull request Oct 10, 2020
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Oct 10, 2020
dbevans pushed a commit to macports/macports-ports that referenced this pull request Oct 10, 2020
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Oct 11, 2020
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Oct 11, 2020
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Oct 11, 2020
Use compiler.cxx_standard 2011
instead of deprecated cxx11 1.1 portgroup

Use compiler.thread_local_storage yes
macports/macports-base#161 included in 2.6.3 release
ryandesign pushed a commit to macports/macports-ports that referenced this pull request Oct 11, 2020
cjones051073 pushed a commit to macports/macports-ports that referenced this pull request Oct 25, 2020
ryandesign pushed a commit to macports/macports-ports that referenced this pull request Oct 27, 2020
Use compiler.cxx_standard 2011
instead of deprecated cxx11 1.1 portgroup

Use compiler.thread_local_storage yes
macports/macports-base#161 included in 2.6.3 release
@chrstphrchvz
Copy link
Contributor

See #214 and https://trac.macports.org/ticket/61418: the original approach here only affected C++11 ports, but should also affect C++14 ports.

ryandesign pushed a commit that referenced this pull request Jan 20, 2021
chrstphrchvz added a commit to chrstphrchvz/macports-ports that referenced this pull request Jun 7, 2021
nheko, openimageio, openal-soft, poppler:
macports/macports-base#214 included in MacPorts 2.7.0
See: https://trac.macports.org/ticket/61418

xaos: compiler blacklist is redundant due to
macports/macports-base#161
cjones051073 pushed a commit to macports/macports-ports that referenced this pull request Jun 10, 2021
nheko, openimageio, openal-soft, poppler:
macports/macports-base#214 included in MacPorts 2.7.0
See: https://trac.macports.org/ticket/61418

xaos: compiler blacklist is redundant due to
macports/macports-base#161
seabadger pushed a commit to seabadger/macports-ports that referenced this pull request Jun 12, 2021
nheko, openimageio, openal-soft, poppler:
macports/macports-base#214 included in MacPorts 2.7.0
See: https://trac.macports.org/ticket/61418

xaos: compiler blacklist is redundant due to
macports/macports-base#161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants