Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes as GCC-14 by default errors out on more what used to be warnings #1832

Merged
merged 5 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ PACKAGECONFIG_G2D:imxgpu2d ??= "g2d"
PACKAGECONFIG[g2d] = ",,virtual/libg2d"
PACKAGECONFIG[tinycompress] = "-Dtinycompress=enabled,-Dtinycompress=disabled,tinycompress"

# GCC-14 otherwise errors out
CFLAGS += " \
-Wno-error=implicit-function-declaration \
-Wno-error=incompatible-pointer-types \
-Wno-error=return-mismatch \
-Wno-error=int-conversion \
"
EXTRA_OEMESON += " \
-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ PACKAGECONFIG_G2D:imxgpu2d ??= "g2d"
PACKAGECONFIG[g2d] = ",,virtual/libg2d"
PACKAGECONFIG[viv-fb] = ",,virtual/libgles2"

# GCC-14 otherwise errors out
CFLAGS += "-Wno-error=incompatible-pointer-types"
EXTRA_OEMESON += "-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}""

# links with imx-gpu libs which are pre-built for glibc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ GLIBC_64BIT_TIME_FLAGS:mx7-nxp-bsp = ""
INSANE_SKIP:mx6-nxp-bsp:append = " 32bit-time"
INSANE_SKIP:mx7-nxp-bsp:append = " 32bit-time"

# GCC-14 otherwise errors out
CFLAGS += " \
-Wno-error=implicit-function-declaration \
-Wno-error=incompatible-pointer-types \
"
S = "${WORKDIR}/git"

COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
Expand Down
7 changes: 7 additions & 0 deletions recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ PLATFORM:mx8-nxp-bsp = "MX8"
PLATFORM:mx9-nxp-bsp = "MX9"

CFLAGS:append:toolchain-clang = " -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-function-pointer-types"
# GCC-14 otherwise errors out
CFLAGS += " \
-Wno-error=int-conversion \
-Wno-error=incompatible-pointer-types \
-Wno-error=return-mismatch \
-Wno-error=implicit-function-declaration \
"

# Todo add a mechanism to map possible build targets
EXTRA_OEMESON = "-Dplatform=${PLATFORM} \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From e78af6d0c9cd1a655f6bc17173f6c411b8b34d2f Mon Sep 17 00:00:00 2001
From: Max Krummenacher <max.krummenacher@toradex.com>
Date: Sat, 1 Jun 2024 11:07:13 +0000
Subject: [PATCH] src/ocl.c: fix wrong integer type

Fixes:
| .../ocl.c:258:22: error: passing argument 6 of 'clGetProgramBuildInfo' from incompatible pointer type [-Wincompatible-pointer-types]
258 | 0, NULL, &log_size);
| ^~~~~~~~~
| |
| int *
In file included from .../recipe-sysroot/usr/include/CL/cl_ext.h:27,
from .../ocl.c:21:
/recipe-sysroot/usr/include/CL/cl.h:1348:45: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *'
1348 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
src/ocl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ocl.c b/src/ocl.c
index f56d9cb..b2b0c52 100644
--- a/src/ocl.c
+++ b/src/ocl.c
@@ -253,7 +253,7 @@ static OCL_RESULT CreateProgram(ImxOcl* ocl, const char* binName, const char* sr
cl_ret = clBuildProgram (program, 1, &ocl->device, "", NULL, NULL);
if (cl_ret < 0)
{
- int log_size;
+ size_t log_size;
cl_ret = clGetProgramBuildInfo(program, ocl->device, CL_PROGRAM_BUILD_LOG,
0, NULL, &log_size);

--
2.42.0

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ SECTION = "multimedia"
LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f"
DEPENDS = "opencl-headers"

SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
SRC_URI = " \
${FSL_MIRROR}/${BP}.bin;fsl-eula=true \
file://0001-src-ocl.c-fix-wrong-integer-type.patch \
"
SRC_URI[md5sum] = "dc668682189ce740fb46073e62f58066"
SRC_URI[sha256sum] = "9f283df500c57421b87d96d9af7022ab490bc241aa28d00755beaadabbcd754b"

Expand Down
Loading