-
Notifications
You must be signed in to change notification settings - Fork 58
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
Don't include "params.h" if building with GCC 10 #183
Conversation
The params.h header has been removed from GCC 10. To allow building the plugin for GCC 10, the header should be included conditionally for older GCC versions only.
int i = option_enabled (opt_code, global_dc->option_state); | ||
#else | ||
/* Starting with GCC 10, options can be distinguished by language. */ | ||
/* TODO Expose the lang_mask to the user. */ |
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 this a TODO? ;-)
#else | ||
/* Starting with GCC 10, options can be distinguished by language. */ | ||
/* TODO Expose the lang_mask to the user. */ | ||
int i = option_enabled (opt_code, CL_LANG_ALL, global_dc->option_state); |
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 the CL_LANG_ALL
right here?
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 believe that that param is used as a mask, so using CL_LANG_ALL here looks correct to me.
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 for doing this work
still doesn't build with that patch and current gcc-10 branch: In file included from gcc-python.c:21: gcc-python.c:245:40: error: ‘compiler_params’ was not declared in this scope |
Thanks for this; sorry about the delay in reviewing it. |
IIRC parameters were reworked internally within GCC 10 to be more like regular options, hence these internal changes. |
Hi,
The params.h header has been removed from GCC 10.
As reported by @doko42 in issue #181, this breaks the gcc-python-plugin build.
The changes of this commit allow me to build the plugin with GCC 10.
I have no idea if that's all that needs to be done, but I have tested the commit with GCC 10 and an old GCC 7 distribution package with both Python 2 and 3 and everything seems to work.
Best regards,
Frederik