qtbase-opensource-src/debian/patches/gnukfreebsd_linker_warnings...

44 lines
1.8 KiB
Diff

From: Dmitry Shachnev <mitya57@debian.org>
Date: Sat, 14 May 2022 17:41:01 +0800
Subject: catch linker warnings in some config tests
Without this, qmake wrongly thinks that the tests succeed, for example:
./config.tests/unix/futimens/futimens.cpp:44: warning: futimens is not implemented and will always fail
test config.corelib.tests.futimens succeeded
Forwarded: https://codereview.qt-project.org/163214 (rejected)
Bug: https://bugs.debian.org/827935
Last-Update: 2019-03-02
---
src/corelib/configure.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index 9b5d19d..3cf77dc 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -331,6 +331,7 @@
"label": "O_CLOEXEC",
"type": "compile",
"test": {
+ "qmake": "QMAKE_LFLAGS += -Wl,--fatal-warnings",
"head": "#define _GNU_SOURCE 1",
"include": [ "sys/types.h", "sys/socket.h", "fcntl.h", "unistd.h" ],
"main": [
@@ -386,6 +387,7 @@
"include": "sys/stat.h",
"main": "futimens(-1, 0);",
"qmake": [
+ "QMAKE_LFLAGS += -Wl,--fatal-warnings",
"# Block futimens() on Apple platforms unless it's available on ALL",
"# deployment targets. This simplifies the logic at the call site",
"# dramatically, as it isn't strictly needed compared to futimes().",
@@ -414,6 +416,7 @@
"label": "getentropy()",
"type": "compile",
"test": {
+ "qmake": "QMAKE_LFLAGS += -Wl,--fatal-warnings",
"include": "unistd.h",
"main": [
"char buf[32];",