summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhang Nguyen <khang.nguyen.xw@renesas.com>2019-07-11 18:13:16 +0700
committerKhang Nguyen <khang.nguyen.xw@renesas.com>2019-09-24 08:16:24 +0700
commit3e0ff568a09954d556859d8eb67a2f4449c039ba (patch)
tree8a12162325965567115114acaf2708882533aa45
parent7d6d6c50950dc59b5bb51a3e6c87f15ba45cef8e (diff)
rcar-gen3: kernel-module-gles: WORKAROUND to build with GCC 9.x
Current GFX source code will get compilation error with GCC 9.x, because it is defined in makefile to use -Wall to enable all Warnings check. -Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation, -Wmissing-attributes, -Waddress-of-packed-member are new command-line options have been added for the C and C++ compilers in GCC 9. This commit applies a W/A patch to silence -Wcast-function-type, -Wsizeof-pointer-div, -Wstringop-truncation, -Wmissing-attributes and -Waddress-of-packed-member errors. Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com> Change-Id: Ic14200e68d0c3a666f9ef1906a3e40b9d6a721dc
-rw-r--r--meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb3
-rw-r--r--meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch25
2 files changed, 28 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb b/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb
index f43a791..50a6765 100644
--- a/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb
+++ b/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb
@@ -18,6 +18,9 @@ SRC_URI_r8a77990 = 'file://GSX_KM_E3.tar.bz2'
S = "${WORKDIR}/rogue_km"
+# W/A fix build errors with GCC 8.1
+SRC_URI_append = " file://0001-Silence-warnings-being-treated-as-errors.patch"
+
KBUILD_DIR_r8a7795 = "${S}/build/linux/r8a7795_linux"
KBUILD_DIR_r8a7796 = "${S}/build/linux/r8a7796_linux"
KBUILD_DIR_r8a77965 = "${S}/build/linux/r8a77965_linux"
diff --git a/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch b/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch
new file mode 100644
index 0000000..a9ddfa5
--- /dev/null
+++ b/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch
@@ -0,0 +1,25 @@
+Current GFX source code will get compilation error with GCC 9.x,
+because it is defined in makefile to use -Wall to enable all Warnings
+check.
+-Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation
+-Wmissing-attributes -Waddress-of-packed-member
+are new Warnings from GCC 9.
+
+Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com>
+---
+ build/linux/buildvars.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: rogue_km/build/linux/buildvars.mk
+===================================================================
+--- rogue_km.orig/build/linux/buildvars.mk
++++ rogue_km/build/linux/buildvars.mk
+@@ -51,7 +51,7 @@
+
+ # These flags are used for kernel, User C and User C++
+ #
+-COMMON_FLAGS := -W -Wall
++COMMON_FLAGS := -W -Wall -Wno-cast-function-type -Wno-sizeof-pointer-div -Wno-stringop-truncation -Wno-missing-attributes -Wno-address-of-packed-member
+
+ # Enable 64-bit file & memory handling on 32-bit systems.
+ #