Fix libbsd's cdefs.h to be compatible with gcc 4.8.x#4979
Merged
adamjstewart merged 2 commits intospack:developfrom Aug 5, 2017
Merged
Fix libbsd's cdefs.h to be compatible with gcc 4.8.x#4979adamjstewart merged 2 commits intospack:developfrom
adamjstewart merged 2 commits intospack:developfrom
Conversation
See the discussion in spack#4945 (after the merge) for additional background. libbsd builds with [email protected] on CentOS 7, but not with the system's [email protected]. Others have reported problems with [email protected] on Fedora 19. The problem boils down to the lack of support for the clang extension `__has_include_next`. The immediate symptom seems to be the pre-processor using defining macro like this ``` ``` then then tripping over an expansion of it like this: ``` blah.h:13:23: error: missing binary operator before token "(" ``` This patch changes the macro definition to: ``` ``` which swallows the arguments with which the macro is invoked. The end result is that libbsd builds for me on CentOS 7 using the system compiler.
Contributor
Author
|
@jgalarowicz -- can you see if this branch ( |
Member
According to the GCC 5 Changelog, changes to the C/C++ compilers include:
So I would constrain the patch like so: patch('cdefs.h.patch', when='%gcc@:4') |
This includes subversions of 4, like 4.8.5.
Contributor
Author
|
I didn't realize this:
Thanks! |
adamjstewart
approved these changes
Aug 5, 2017
Contributor
|
Hi George,
It does. Sorry - didn't see this until now. Just tried it and it works!
Thanks,
Jim G
…On 08/05/2017 11:22 AM, George Hartzell wrote:
@jgalarowicz <https://github.com/jgalarowicz> -- can you see if this
branch (|hartzell:libbsd-cdefs-fix|) builds on your Fedora 19 system
w/ ***@***.***|?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4979 (comment)>, or
mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmdtXTfjvIyFkpyI0NOL-U4VVH8FG7wks5sVJbSgaJpZM4OuTA9>.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the discussion in #4945 (after the merge) for additional background.
libbsd builds with [email protected] on CentOS 7, but not with the system's [email protected]. Others have reported problems with [email protected] on Fedora 19.
The problem boils down to the lack of support for the clang extension
__has_include_next. The immediate symptom seems to be the pre-processor using defining macro like thisthen then tripping over an expansion of it like this:
This patch changes the macro definition to:
which swallows the arguments with which the macro is invoked.
The end result is that libbsd builds for me on CentOS 7 using the system compiler.
I'm unsure about how to constrain the compiler version, this is the only system I have at hand to test.