void-packages/srcpkgs/nvidia470/patches/0001-Fix-conftest-to-ignore-implicit-function-declaration.patch
2025-01-19 14:51:18 -06:00

28 lines
951 B
Diff

From: Benjamin ROBIN <dev@benjarobin.fr>
Date: Sun, 12 May 2024 17:06:20 +0200
Subject: [PATCH 1/3] Fix conftest to ignore implicit-function-declaration and
strict-prototypes warnings
conftest rely on the fact that a missing prototype should build, but an invalid
call to a function (missing function parameters) the build fail.
---
conftest.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -101,7 +101,9 @@ test_header_presence() {
build_cflags() {
BASE_CFLAGS="-O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM \
+-Wno-implicit-function-declaration -Wno-strict-prototypes \
+-Wno-incompatible-pointer-types"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
---
2.45.0