diff options
author | Thuy Tran <thuy.tran.xh@renesas.com> | 2018-07-17 17:45:32 +0700 |
---|---|---|
committer | Thuy Tran <thuy.tran.xh@renesas.com> | 2019-02-28 09:43:53 +0700 |
commit | 45a75eda120b6e27ea8c2c42f54442abde710cb9 (patch) | |
tree | 2ddd92114ca1d02e92d475cc2a7a35063dde5ffb /meta-rcar-gen3/recipes-kernel | |
parent | fffade1b0b12f46279a6a72791153c57dfed2bc6 (diff) |
rcar-gen3: kernel-module-gles: WORKAROUND to build with GCC 8.1
Current GFX source code will get compilation error with GCC 8.1,
because it is defined in makefile to use -Wall to enable all
Warnings check.
-Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation
are new command-line options have been added for the C and C++
compilers in GCC 8.
This commit applies a W/A patch to silence -Wcast-function-type,
-Wsizeof-pointer-div and -Wstringop-truncation errors.
Signed-off-by: Thuy Tran <thuy.tran.xh@renesas.com>
Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
Diffstat (limited to 'meta-rcar-gen3/recipes-kernel')
2 files changed, 63 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..844b41f 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-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.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-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch b/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch new file mode 100644 index 0000000..fd91158 --- /dev/null +++ b/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch @@ -0,0 +1,60 @@ +From 1bc7c0daece11b36abebc48b9113193056289fe6 Mon Sep 17 00:00:00 2001 +From: Thuy Tran <thuy.tran.xh@renesas.com> +Date: Tue, 17 Jul 2018 15:01:56 +0700 +Subject: [PATCH] Silenced -Wcast-function-type, -Wsizeof-pointer-div and + -Wstringop-truncation options of GCC 8.1 + +Current GFX source code will get compilation error with GCC 8.1, +because it is defined in makefile to use -Wall to enable all Warnings +check. +-Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation +are new Warnings from GCC 8. + +===================================================================== +* Error generated by -Wcast-function-type + + rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/module_common.c:43: + kernel-source/include/linux/timer.h: In function 'timer_setup': + error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type] + __setup_timer(timer, (TIMER_FUNC_TYPE)callback, + ^ +/ssd/thuy/FS2.6/M1/build_m3ulcb_mmp/tmp/work-shared/m3ulcb/kernel-source/include/linux/timer.h:144:25: note: in definition of macro '__setup_timer' + (_timer)->function = (_fn); \ + ^~~ +====================================================================== +* Error generated by -Wsizeof-pointer-div + + rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/km_apphint.c:229:48: error: division 'sizeof (void *) / sizeof (void)' does not compute the number of array elements [-Werror=sizeof-pointer-div] + #define APPHINT_HELP_ARRAY_SIZE(a) (sizeof((a))/(sizeof((a[0])))) + ^ + rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/km_apphint.c:233:49: note: in expansion of macro 'APPHINT_HELP_ARRAY_SIZE' + {APPHINT_ID_ ## a, APPHINT_DATA_TYPE_ ## b, e, APPHINT_HELP_ARRAY_SIZE(e) }, + ^~~~~~~~~~~~~~~~~~~~~~~ +====================================================================== +* Error generated by -Wstringop-truncation + + rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/devices/rgx/rgxfwutils.c:1294:2: error: 'strncat' output truncated before terminating nul copying 7 bytes from a string of the same length [-Werror=stringop-truncation] + strncat(sCCBCtlName, sAppend, APPEND_STR_SIZE); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Thuy Tran <thuy.tran.xh@renesas.com> +--- + build/linux/buildvars.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/linux/buildvars.mk b/build/linux/buildvars.mk +index a871d37..ddf12eb 100644 +--- a/build/linux/buildvars.mk ++++ b/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 + + # Enable 64-bit file & memory handling on 32-bit systems. + # +-- +2.7.4 + |