I tried to build git master (33d88ce2549d4888cf617281d15777b94f5915af) on fedora 21.
I got:
{{{
cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include -I/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c
In file included from gcc-callgraph.c:29:0:
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h: In function ‘bool gimple_store_p(gimple)’:
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h:2346:36: error: is_gimple_reg’ was not declared in this scope
return lhs && !is_gimple_reg (lhs);
^
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h: In function ‘tree_node* gimple_call_fndecl(const_gimple)’:
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h:2559:54: error: gimple_call_addr_fndecl’ was not declared in this scope
return gimple_call_addr_fndecl (gimple_call_fn (gs));
^
}}}
From gcc-callback.c:
{{{
if (GCC_VERSION >= 5000)
include "gimple-expr.h"
endif
}}}
Unconditionally including gimple-expr.h made it build for me, but I don't know if that is a viable generic fix.
The resulting plugin did not completely pass its tests, though the differences seem minor.
I tried to build git master (33d88ce2549d4888cf617281d15777b94f5915af) on fedora 21. I got:
{{{ cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include -I/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c In file included from gcc-callgraph.c:29:0: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h: In function ‘bool gimple_store_p(gimple)’: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h:2346:36: error: is_gimple_reg’ was not declared in this scope return lhs && !is_gimple_reg (lhs); ^ /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h: In function ‘tree_node* gimple_call_fndecl(const_gimple)’: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h:2559:54: error: gimple_call_addr_fndecl’ was not declared in this scope return gimple_call_addr_fndecl (gimple_call_fn (gs)); ^ }}}
From gcc-callback.c:
{{{
if (GCC_VERSION >= 5000)
include "gimple-expr.h"
endif
}}}
Unconditionally including gimple-expr.h made it build for me, but I don't know if that is a viable generic fix.
The resulting plugin did not completely pass its tests, though the differences seem minor.