Blame 0103-gcc-plugin-update-headers-for-gcc-12.patch

642cd7
From 13182e50b027c70bd63f53ca43598557d6b41e2e Mon Sep 17 00:00:00 2001
642cd7
From: Joe Lawrence <joe.lawrence@redhat.com>
642cd7
Date: Tue, 27 Sep 2022 16:41:48 -0400
642cd7
Subject: [PATCH 103/108] gcc-plugin: update headers for gcc-12
642cd7
MIME-Version: 1.0
642cd7
Content-Type: text/plain; charset=UTF-8
642cd7
Content-Transfer-Encoding: 8bit
642cd7
642cd7
Fix build error seen on gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1):
642cd7
642cd7
  g++ -MMD -MP -I../kmod/patch -Iinsn -Wall -Wsign-compare -Wno-sign-conversion -g -Werror -shared -I/usr/lib/gcc/ppc64le-redhat-linux/12/plugin/include -Igcc-plugins -fPIC -fno-rtti -O2 -Wall gcc-plugins/ppc64le-plugin.c -o gcc-plugins/ppc64le-plugin.so
642cd7
  In file included from /usr/include/features.h:490,
642cd7
                   from /usr/include/bits/libc-header-start.h:33,
642cd7
                   from /usr/include/stdio.h:27,
642cd7
                   from /usr/lib/gcc/ppc64le-redhat-linux/12/plugin/include/system.h:46,
642cd7
                   from /usr/lib/gcc/ppc64le-redhat-linux/12/plugin/include/gcc-plugin.h:28,
642cd7
                   from gcc-plugins/gcc-common.h:6,
642cd7
                   from gcc-plugins/ppc64le-plugin.c:1:
642cd7
  /usr/include/bits/error-ldbl.h:23:1: error: type of ‘error’ is unknown
642cd7
     23 | __LDBL_REDIR_DECL (error)
642cd7
        | ^~~~~~~~~~~~~~~~~
642cd7
  /usr/include/bits/error-ldbl.h:23:1: error: ‘int error’ redeclared as different kind of entity
642cd7
     23 | __LDBL_REDIR_DECL (error)
642cd7
        | ^~~~~~~~~~~~~~~~~
642cd7
  In file included from gcc-plugins/ppc64le-plugin.c:2:
642cd7
  /usr/include/error.h:31:13: note: previous declaration ‘void error(int, int, const char*, ...)’
642cd7
     31 | extern void error (int __status, int __errnum, const char *__format, ...)
642cd7
        |             ^~~~~
642cd7
  make[1]: *** [Makefile:39: gcc-plugins/ppc64le-plugin.so] Error 1
642cd7
642cd7
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
642cd7
---
642cd7
 kpatch-build/gcc-plugins/ppc64le-plugin.c | 2 +-
642cd7
 1 file changed, 1 insertion(+), 1 deletion(-)
642cd7
642cd7
diff --git a/kpatch-build/gcc-plugins/ppc64le-plugin.c b/kpatch-build/gcc-plugins/ppc64le-plugin.c
642cd7
index e3ec20f..ba4a01e 100644
642cd7
--- a/kpatch-build/gcc-plugins/ppc64le-plugin.c
642cd7
+++ b/kpatch-build/gcc-plugins/ppc64le-plugin.c
642cd7
@@ -1,5 +1,5 @@
642cd7
-#include "gcc-common.h"
642cd7
 #include <error.h>
642cd7
+#include "gcc-common.h"
642cd7
 
642cd7
 #define PLUGIN_NAME "ppc64le-plugin"
642cd7
 
642cd7
-- 
642cd7
2.37.3
642cd7