qtbase: Fix build with recent oe-core/pseudo on hosts with glibc >= 2.28

Recently pseudo changed to not support reanameeat2 as glibc wrapper [1]. This
causes massive failures at do_install [2] on qtbase.

To work around tell Qt build configuration not to use ranameat2 independent
of glibc version.

Target qtbase does not require this adjustment - there is no pseudo on target.

[1] https://git.openembedded.org/openembedded-core/commit/?id=0fb257121b68f38b40c078150db8f7d0979b7ea5
[2] https://github.com/meta-qt5/meta-qt5/issues/187

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2019-04-14 13:59:30 +02:00
committed by Martin Jansa
parent 0630018c00
commit 1520d5b2b2
13 changed files with 103 additions and 75 deletions

View File

@@ -23,7 +23,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.11-shared
# 5.11.meta-qt5-shared.13
# 5.11.meta-qt5-shared.14
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -38,20 +38,20 @@ SRC_URI += "\
file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
file://0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch \
file://0013-Upgrade-double-conversion-to-v3.0.0.patch \
file://0014-Check-glibc-version-for-renameat2-statx-on-non-boots.patch \
file://0015-double-conversion-support-AARCH64EB-and-arm-BE.patch \
file://0016-Disable-ltcg-for-host_build.patch \
file://0017-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0018-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0019-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0020-Fix-compile-issue-with-gcc-9.patch \
file://0014-double-conversion-support-AARCH64EB-and-arm-BE.patch \
file://0015-Disable-ltcg-for-host_build.patch \
file://0016-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0017-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0018-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0019-Fix-compile-issue-with-gcc-9.patch \
"
# common for qtbase-native and nativesdk-qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.11-native
# 5.11.meta-qt5-native.13
# 5.11.meta-qt5-native.14
SRC_URI += " \
file://0021-Always-build-uic-and-qvkgen.patch \
file://0020-Always-build-uic-and-qvkgen.patch \
file://0021-Avoid-renameeat2-for-native-sdk-builds.patch \
"
# CMake's toolchain configuration of nativesdk-qtbase

View File

@@ -18,7 +18,7 @@ require qt5-git.inc
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.11-shared
# 5.11.meta-qt5-shared.13
# 5.11.meta-qt5-shared.14
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -33,20 +33,20 @@ SRC_URI += "\
file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
file://0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch \
file://0013-Upgrade-double-conversion-to-v3.0.0.patch \
file://0014-Check-glibc-version-for-renameat2-statx-on-non-boots.patch \
file://0015-double-conversion-support-AARCH64EB-and-arm-BE.patch \
file://0016-Disable-ltcg-for-host_build.patch \
file://0017-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0018-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0019-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0020-Fix-compile-issue-with-gcc-9.patch \
file://0014-double-conversion-support-AARCH64EB-and-arm-BE.patch \
file://0015-Disable-ltcg-for-host_build.patch \
file://0016-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0017-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0018-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0019-Fix-compile-issue-with-gcc-9.patch \
"
# common for qtbase-native and nativesdk-qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.11-native
# 5.11.meta-qt5-native.13
# 5.11.meta-qt5-native.14
SRC_URI += " \
file://0021-Always-build-uic-and-qvkgen.patch \
file://0020-Always-build-uic-and-qvkgen.patch \
file://0021-Avoid-renameeat2-for-native-sdk-builds.patch \
"
# only for qtbase-native

View File

@@ -1,38 +0,0 @@
From fb6a20e6917cfa32e69791e0adb130140f4b5688 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Tue, 21 Aug 2018 00:29:06 +0200
Subject: [PATCH] Check glibc version for renameat2/statx on non bootstrapped
build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/corelib/io/qfilesystemengine_unix.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 964dcebeb2..c09eb0154b 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -95,6 +95,17 @@ extern "C" NSString *NSTemporaryDirectory();
#ifndef FICLONE
# define FICLONE _IOW(0x94, 9, int)
#endif
+
+// renameat2/statx features for non bootstrapped build
+#ifndef QT_BOOTSTRAPPED
+#ifdef __GLIBC_PREREQ
+# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+#else
+# define QT_FEATURE_renameat2 -1
+# define QT_FEATURE_statx -1
+#endif
+#endif
#endif
#if defined(Q_OS_ANDROID)

View File

@@ -1,4 +1,4 @@
From 09b304966543753e445b90b904a9f558377a87f6 Mon Sep 17 00:00:00 2001
From 7959088cb80f27202252f7080a4c334f3474cac7 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Wed, 29 Aug 2018 18:20:14 +0900
Subject: [PATCH] double-conversion: support AARCH64EB and arm BE

View File

@@ -1,4 +1,4 @@
From e9ea14a04e74be6740b82d51340bb6218f35ab1f Mon Sep 17 00:00:00 2001
From 8b71f94e010aa9ee0c1e577738e0a8af8365b39e Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Tue, 23 Oct 2018 09:54:57 +0300
Subject: [PATCH] Disable ltcg for host_build

View File

@@ -1,4 +1,4 @@
From f5b11bb3ab6299912491568f84185e0174cc6e5a Mon Sep 17 00:00:00 2001
From bf8555d48d2402e7ed60f1f4232270d24623e088 Mon Sep 17 00:00:00 2001
From: Max Krummenacher <max.krummenacher@toradex.com>
Date: Sat, 27 Oct 2018 12:29:31 +0000
Subject: [PATCH] Qt5GuiConfigExtras.cmake.in: cope with variable path to

View File

@@ -1,4 +1,4 @@
From dd16d19bc6b4e8ee5d61fae94cd65b7f10d6e835 Mon Sep 17 00:00:00 2001
From 206fb0ffdcbd2ae2278f37d8cfe5c16301312c58 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 6 Dec 2018 11:47:52 -0800
Subject: [PATCH] corelib: Include sys/types.h for uint32_t

View File

@@ -1,4 +1,4 @@
From 61d8dd1cfdc6334a4d81c0f043a9515346872d0c Mon Sep 17 00:00:00 2001
From c72e38a57ff13ded19fcc22c5abba1a69ba84040 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 6 Dec 2018 15:06:20 -0800
Subject: [PATCH] Define QMAKE_CXX.COMPILER_MACROS for clang on linux

View File

@@ -1,4 +1,4 @@
From eb68b9fa27d94bc90db5b0023b224ac0e60b8243 Mon Sep 17 00:00:00 2001
From 4364a8fcbcc32e37b9ccbfa833e872098f038690 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Tue, 13 Nov 2018 16:00:23 +0100
Subject: [PATCH] Fix compile issue with gcc 9

View File

@@ -1,4 +1,4 @@
From 4ac36e3e40bd8a4940f211cf89155618149f1f68 Mon Sep 17 00:00:00 2001
From f1564bbf2829cf1006e1d2af146c0ce27e6c1fdb Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 16 Nov 2013 00:32:30 +0100
Subject: [PATCH] Always build uic and qvkgen

View File

@@ -0,0 +1,67 @@
From d8b2572813019c7e196cc2a66d7993acbb2d4617 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 14 Apr 2019 13:27:58 +0200
Subject: [PATCH] Avoid renameeat2 for native(sdk) builds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Recently pseudo changed to not support reanameeat2 as glibc wrapper [1]. This
causes massive failures at do_install [2] on qtbase.
To work around tell Qt build configuration not to use ranameet2 independent
of glibc version.
[1] https://git.openembedded.org/openembedded-core/commit/?id=0fb257121b68f38b40c078150db8f7d0979b7ea5
[2] https://github.com/meta-qt5/meta-qt5/issues/187
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/corelib/global/qconfig-bootstrapped.h | 4 ++--
src/corelib/io/qfilesystemengine_unix.cpp | 10 ----------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index 229b4d17a1..4e2d43ffc5 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -100,14 +100,14 @@
#define QT_FEATURE_process -1
#define QT_FEATURE_regularexpression -1
#ifdef __GLIBC_PREREQ
-# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+# define QT_FEATURE_renameat2 -1
#else
# define QT_FEATURE_renameat2 -1
#endif
#define QT_FEATURE_sharedmemory -1
#define QT_FEATURE_slog2 -1
#ifdef __GLIBC_PREREQ
-# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+# define QT_FEATURE_statx -1
#else
# define QT_FEATURE_statx -1
#endif
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 964dcebeb2..fea7f29c56 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -1252,16 +1252,6 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy
if (Q_UNLIKELY(srcPath.isEmpty() || tgtPath.isEmpty()))
return emptyFileEntryWarning(), false;
-#if defined(RENAME_NOREPLACE) && QT_CONFIG(renameat2)
- if (renameat2(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_NOREPLACE) == 0)
- return true;
-
- // We can also get EINVAL for some non-local filesystems.
- if (errno != EINVAL) {
- error = QSystemError(errno, QSystemError::StandardLibraryError);
- return false;
- }
-#endif
#if defined(Q_OS_DARWIN) && defined(RENAME_EXCL)
if (__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *)) {
if (renameatx_np(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_EXCL) == 0)

View File

@@ -1,4 +1,4 @@
From 03c534e00991d08897541910226256e88f0f5efc Mon Sep 17 00:00:00 2001
From 86c2a65a7bfbc8163c93ef0856bb4eda442b8e70 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Fri, 24 Nov 2017 15:16:31 +0200
Subject: [PATCH] Bootstrap without linkat feature
@@ -13,7 +13,7 @@ Upstream-Status: Inappropriate [OE specific]
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index 229b4d17a1..3dbb1ea65c 100644
index 4e2d43ffc5..992a7d7443 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -91,7 +91,7 @@

View File

@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.11-shared
# 5.11.meta-qt5-shared.13
# 5.11.meta-qt5-shared.14
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -29,13 +29,12 @@ SRC_URI += "\
file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
file://0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch \
file://0013-Upgrade-double-conversion-to-v3.0.0.patch \
file://0014-Check-glibc-version-for-renameat2-statx-on-non-boots.patch \
file://0015-double-conversion-support-AARCH64EB-and-arm-BE.patch \
file://0016-Disable-ltcg-for-host_build.patch \
file://0017-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0018-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0019-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0020-Fix-compile-issue-with-gcc-9.patch \
file://0014-double-conversion-support-AARCH64EB-and-arm-BE.patch \
file://0015-Disable-ltcg-for-host_build.patch \
file://0016-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
file://0017-corelib-Include-sys-types.h-for-uint32_t.patch \
file://0018-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0019-Fix-compile-issue-with-gcc-9.patch \
"