kpatch/kpatch-build
Kamalesh Babulal fde1a75b7f gcc-plugin: Fix build failure with GCC 10
Building on Fedora 32 with GCC 10.1.1, triggers build failures:

In file included from gcc-plugins/ppc64le-plugin.c:1:
gcc-plugins/gcc-common.h:37:10: fatal error: params.h: No such file or directory
   37 | #include "params.h"
      |          ^~~~~~~~~~
compilation terminated.

In file included from gcc-plugins/ppc64le-plugin.c:1:
gcc-plugins/gcc-common.h:841:13: error: redefinition of ‘static bool is_a_helper<T>::test(U*) [with U = const gimple; T = const ggoto*]’
  841 | inline bool is_a_helper<const ggoto *>::test(const_gimple gs)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gcc-plugins/gcc-common.h:124,
                 from gcc-plugins/ppc64le-plugin.c:1:
/usr/lib/gcc/ppc64le-redhat-linux/10/plugin/include/gimple.h:1037:1:
note: ‘static bool is_a_helper<T>::test(U*) [with U = const gimple; T = const ggoto*]’ previously declared here
 1037 | is_a_helper <const ggoto *>::test (const gimple *gs)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gcc-plugins/ppc64le-plugin.c:1:
gcc-plugins/gcc-common.h:848:13: error: redefinition of ‘static bool is_a_helper<T>::test(U*) [with U = const gimple; T = const greturn*]’
  848 | inline bool is_a_helper<const greturn *>::test(const_gimple gs)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gcc-plugins/gcc-common.h:124,
                 from gcc-plugins/ppc64le-plugin.c:1:
/usr/lib/gcc/ppc64le-redhat-linux/10/plugin/include/gimple.h:1489:1:
note: ‘static bool is_a_helper<T>::test(U*) [with U = const gimple; T = const greturn*]’ previously declared here
 1489 | is_a_helper <const greturn *>::test (const gimple *gs)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

as per kernel commit c7527373fe28 ("gcc-common.h: Update for GCC 10")
 "params.h header file has been dropped from GCC 10 and is_a_helper()
  macro is now defined in gimple.h"

this patch fix them by guarding the both param.h header file and
is_a_helper() with #ifdef checking for gcc version < 10000.

Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
2020-06-09 20:34:27 +05:30
..
gcc-plugins gcc-plugin: Fix build failure with GCC 10 2020-06-09 20:34:27 +05:30
insn insn: get it to compile in create-diff-object 2014-05-30 15:19:57 -05:00
create-diff-object.c create-diff-object: Add ppc64le mcount support 2020-05-18 08:35:33 -04:00
create-klp-module.c lookup: rename 'pos' to 'sympos' 2020-04-06 15:18:58 -05:00
create-kpatch-module.c kpatch-build: Detect R_X86_64_64 dynrelas with large addends 2020-05-05 23:21:16 +03:00
kpatch-build create-diff-object: add support for .klp.arch removal 2020-04-14 12:44:04 -05:00
kpatch-elf.c kpatch-build: Allow function to have multiple child functions 2020-03-30 14:14:17 +01:00
kpatch-elf.h kpatch-build: Allow function to have multiple child functions 2020-03-30 14:14:17 +01:00
kpatch-gcc Making kpatch-build compatible with custom gcc names 2019-05-09 19:15:11 +02:00
kpatch-intermediate.h lookup: rename 'pos' to 'sympos' 2020-04-06 15:18:58 -05:00
kpatch.h kpatch-build: add exit status enum 2018-06-15 07:11:48 -04:00
list.h new .fixup group size algorithm 2014-09-15 14:54:57 -05:00
log.h kpatch-build: add exit status enum 2018-06-15 07:11:48 -04:00
lookup.c lookup: fix Module.symvers reading for newer kernels 2020-04-14 12:44:00 -05:00
lookup.h create-diff-object: refactor dynrela conversion 2020-04-06 15:18:58 -05:00
Makefile kpatch-build/Makefile: Skip build insn/plugin with -Wconversion 2020-01-23 12:59:38 +05:30