catch linker warnings in some config tests
authorDmitry Shachnev <mitya57@debian.org>
Thu, 25 Jul 2024 12:43:37 +0000 (15:43 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 25 Jul 2024 12:43:37 +0000 (15:43 +0300)
Forwarded: https://codereview.qt-project.org/163214 (rejected)
Bug: https://bugs.debian.org/827935
Last-Update: 2019-03-02

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

Gbp-Pq: Name gnukfreebsd_linker_warnings.diff

src/corelib/configure.json

index a9025a2dd292feade75a9371149fb38ed3e7e967..06f431183c1689006c3443b9e7f6caaa24d89805 100644 (file)
             "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": [
                 "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().",
             "label": "getentropy()",
             "type": "compile",
             "test": {
+                "qmake": "QMAKE_LFLAGS += -Wl,--fatal-warnings",
                 "include": "unistd.h",
                 "main": [
                     "char buf[32];",