-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8295795: hsdis does not build with binutils 2.39+ #15138
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
Closed
+83
−36
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2d23bab
Binutils fix
robehn a8ce2d3
Added parameter name
robehn b3c81f8
Reverted bad change
robehn f305e56
Check API during conf
robehn b514c33
Minor fixes
robehn 57d5a24
Merge branch 'master' into binutils-working
robehn 36226f8
Fix installed binutils
robehn ae9624c
Fixed include
robehn b717547
Merge branch 'master' into binutils-working
robehn ac75ae2
Added back guard
robehn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
Seems to me this is not working as expected but I don't have an env to verify this.
I've been working on something similar to deal with
capstone
API changes and the pattern here seemed to not compile but not for the reasons expected.For example, I created:
And when I looked the compilation error it showed:
So, the code was not compiling not because of the wrong
cs_arch
value but because you cannot define a method within main.Instead I made my
AC_COMPILE_IFELSE
looks like this:And that works as expected. For example, when using a
capstone
library that supportsCS_ARCH_AARCH64
, it does:And when the capstone library does not have
CS_ARCH_AARCH64
, the compilation error I get is the expected one:/cc @theRealAph
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.
To make it clear, seems to me this line should be this instead:
You could probably remove the
;
since it's already included.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.
Yes, you are correct, this was not my intention.
For some reason I mixed up AC_LANG_SOURCE and AC_LANG_PROGRAM.
But nested function are fine, so there is actually no issue with it.
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.
Is it? The compilation error above says "error: function definition is not allowed here". It seems to me is saying that the compilation fails because of the nested function. Am I missing something?
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 don't know why.
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.
@robehn I think that is a gcc extension; not ANSI C.
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.
Yea, you are correct. Apparently the gcc extension is not turned off even if you use -ansi.
clang on the other hand complains.
@galderz your suggested patch is correct, can you open PR ?
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.
@robehn Way ahead of you: https://bugs.openjdk.org/browse/JDK-8320663 :)
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.
Thank you @magicus !
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.
That was fast! Thx @magicus and thanks @robehn for verifying things!