-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Language-specific PIC flags #15474
Language-specific PIC flags #15474
Conversation
The patch solves the compiler dependent |
@aradi good point, let me open up a separate PR to address that. |
Not sure this is the right direction to go. Do I understand correctly that this works just because |
You are correct, that’s how we’ve handled all language-specific flags in the past. We do this for NAG and Clang (assume GCC is the other half of the compiler). |
From what I can tell, #15443 is a step in the right direction, but better mixed compiler support is still a long way off. Without this PR, NAG users can't build anything right now, due to both the |
Ping ping @alalazo |
1909e42
to
b09a3f2
Compare
Ping ping ping @alalazo |
2734c70
to
6e7a8bb
Compare
@adamjstewart I put this in the 0.15.0 dashboard (and not 0.14.X) since I think it needs some discussions on the opportunity to merge a workaround that is fairly large and we know it needs to be undone in the mid-long term (because of the reworking of compilers). If it was a 10 lines change I would merge it straight away, likewise if it was a more permanent fix without its own issues. In this case I think more discussion is needed as we are dealing with something sizeable and that comes with known limitations. |
I agree that more discussion is welcome (thanks for pinging more reviewers). The long and short of it is that it is currently impossible to use the NAG compiler with Spack because:
I would hate to see the NAG compiler go unsupported for months while we wait for 0.15.0, although I'm fine with reaching a consensus on this PR and merging it into develop in the meantime. Also see #15445 and #15776 for more discussion. Adding @ThemosTsikas to the discussion as our official NAG representative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this change -- it's consistent with how we currently handle different which, as Massimiliano points out, is less than optimal. I also agree that we should enable NAG to continue functioning until we get to 0.15, where we'll have compilers as dependencies.
So, I think this is the right solution for now, and @adamjstewart has already done it.
I would say that maybe we should think about avoiding 4 prefixes for every attribute on compiler
, and enabling something like self.cc.pic_flag
, self.cxx.pic_flag
, etc. on packages (it would reduce redundant code). But since we're redoing this anyway and things like c
and cxx
will eventually be virtuals, I don't think it's worth the work to do that. So I think this is the best case scenario for now and could be a patch for 0.14.3.
@alalazo: if you're ok with the above, then I am fine with this. Do you have other objections? |
I think the only thing left we need to decide (either in this PR or a separate PR) is what to do about the
|
@adamjstewart I'll have a look at |
Since this affects a lot of packages, and users may submit PRs that use the removed |
#2375 added compiler-specific PIC flags.
This PR adds language-specific PIC flags.
Fixes #15445
@aradi can you test this?