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

Fix couple of problems revealed by non-gcc compiler #209

Merged
merged 2 commits into from
Nov 3, 2017

Conversation

bircoph
Copy link

@bircoph bircoph commented Nov 3, 2017

First change checks for lcc compiler and its version and disables not yet supported C++ features the same way as for ARMEL.

Second change fixes OpenMP detection to use standard cmake find_package(openmp).

LCC compiler for e2k architecture currently has no support for C++11
exceptions extensions. This patch is future compatible, since newer
compiler releases will have such support.
According to the official gcc documentation[1] in order to use OpenMP
one must specify -fopenmp flag. It is wrong to link with internal
compiler library like -lgomp. This breaks other compilers like lcc.
Note that special care for clang is not needed in case -fopenmp is used
as described above.

Furthermore cmake provides standard FindOpenMP.cmake module, so in order
to check for OpenMP it is sufficient to use find_package(openmp).

[1] https://gcc.gnu.org/onlinedocs/libgomp/Enabling-OpenMP.html
@manisandro manisandro merged commit 9ee4bcf into manisandro:master Nov 3, 2017
@manisandro
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants