davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
196 stars 58 forks source link

Don't include "params.h" if building with GCC 10 #183

Closed frederik-h closed 4 years ago

frederik-h commented 4 years ago

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

doko42 commented 4 years ago

still doesn't build with that patch and current gcc-10 branch:

In file included from gcc-python.c:21: gcc-python.h:234:10: error: ‘compiler_param’ does not name a type 234 | compiler_param, param_num) | ^~~~~~

gcc-python.c:245:40: error: ‘compiler_params’ was not declared in this scope 245 | compiler_params[i].option,

davidmalcolm commented 4 years ago

Thanks for this; sorry about the delay in reviewing it.

davidmalcolm commented 4 years ago

IIRC parameters were reworked internally within GCC 10 to be more like regular options, hence these internal changes.