diff options
author | Andreas Müller <schnitzeltony@gmail.com> | 2019-04-14 13:59:30 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2019-04-17 23:34:33 +0000 |
commit | 8895ea3b63c7ab959794acef93548c1c9df9307e (patch) | |
tree | ce177285c6d95fe83e2d9888197f2b2a73c38f2b | |
parent | 95974f44f18c9e0c1e52391d0a7da255b3bb1332 (diff) |
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>
10 files changed, 86 insertions, 55 deletions
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb index cf92b3a2..a9bdac4a 100644 --- a/recipes-qt/qt5/nativesdk-qtbase_git.bb +++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb @@ -37,18 +37,18 @@ SRC_URI += "\ file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \ 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-Check-glibc-version-for-renameat2-statx-on-non-boots.patch \ - file://0014-Disable-ltcg-for-host_build.patch \ - file://0015-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \ - file://0016-corelib-Include-sys-types.h-for-uint32_t.patch \ - file://0017-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ + file://0013-Disable-ltcg-for-host_build.patch \ + file://0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \ + file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \ + file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ " # common for qtbase-native and nativesdk-qtbase # Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-native # 5.12.meta-qt5-native.6 SRC_URI += " \ - file://0018-Always-build-uic-and-qvkgen.patch \ + file://0017-Always-build-uic-and-qvkgen.patch \ + file://0018-Avoid-renameeat2-for-native-sdk-builds.patch \ " # CMake's toolchain configuration of nativesdk-qtbase diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index f81e1426..f392f889 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb @@ -32,18 +32,18 @@ SRC_URI += "\ file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \ 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-Check-glibc-version-for-renameat2-statx-on-non-boots.patch \ - file://0014-Disable-ltcg-for-host_build.patch \ - file://0015-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \ - file://0016-corelib-Include-sys-types.h-for-uint32_t.patch \ - file://0017-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ + file://0013-Disable-ltcg-for-host_build.patch \ + file://0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \ + file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \ + file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ " # common for qtbase-native and nativesdk-qtbase # Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-native # 5.12.meta-qt5-native.6 SRC_URI += " \ - file://0018-Always-build-uic-and-qvkgen.patch \ + file://0017-Always-build-uic-and-qvkgen.patch \ + file://0018-Avoid-renameeat2-for-native-sdk-builds.patch \ " # only for qtbase-native diff --git a/recipes-qt/qt5/qtbase/0013-Check-glibc-version-for-renameat2-statx-on-non-boots.patch b/recipes-qt/qt5/qtbase/0013-Check-glibc-version-for-renameat2-statx-on-non-boots.patch deleted file mode 100644 index 53dc5ea7..00000000 --- a/recipes-qt/qt5/qtbase/0013-Check-glibc-version-for-renameat2-statx-on-non-boots.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3dcb42b38dd8bfbb8b509149ee9e870b80fa0658 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 b2d81066db..b90e3dc15d 100644 ---- a/src/corelib/io/qfilesystemengine_unix.cpp -+++ b/src/corelib/io/qfilesystemengine_unix.cpp -@@ -93,6 +93,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) diff --git a/recipes-qt/qt5/qtbase/0014-Disable-ltcg-for-host_build.patch b/recipes-qt/qt5/qtbase/0013-Disable-ltcg-for-host_build.patch index 142db442..142db442 100644 --- a/recipes-qt/qt5/qtbase/0014-Disable-ltcg-for-host_build.patch +++ b/recipes-qt/qt5/qtbase/0013-Disable-ltcg-for-host_build.patch diff --git a/recipes-qt/qt5/qtbase/0015-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch b/recipes-qt/qt5/qtbase/0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch index 1f990f24..1f990f24 100644 --- a/recipes-qt/qt5/qtbase/0015-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch +++ b/recipes-qt/qt5/qtbase/0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch diff --git a/recipes-qt/qt5/qtbase/0016-corelib-Include-sys-types.h-for-uint32_t.patch b/recipes-qt/qt5/qtbase/0015-corelib-Include-sys-types.h-for-uint32_t.patch index 660ab051..660ab051 100644 --- a/recipes-qt/qt5/qtbase/0016-corelib-Include-sys-types.h-for-uint32_t.patch +++ b/recipes-qt/qt5/qtbase/0015-corelib-Include-sys-types.h-for-uint32_t.patch diff --git a/recipes-qt/qt5/qtbase/0017-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch b/recipes-qt/qt5/qtbase/0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch index 69ff9604..69ff9604 100644 --- a/recipes-qt/qt5/qtbase/0017-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch +++ b/recipes-qt/qt5/qtbase/0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch diff --git a/recipes-qt/qt5/qtbase/0018-Always-build-uic-and-qvkgen.patch b/recipes-qt/qt5/qtbase/0017-Always-build-uic-and-qvkgen.patch index f85530ea..f85530ea 100644 --- a/recipes-qt/qt5/qtbase/0018-Always-build-uic-and-qvkgen.patch +++ b/recipes-qt/qt5/qtbase/0017-Always-build-uic-and-qvkgen.patch diff --git a/recipes-qt/qt5/qtbase/0018-Avoid-renameeat2-for-native-sdk-builds.patch b/recipes-qt/qt5/qtbase/0018-Avoid-renameeat2-for-native-sdk-builds.patch new file mode 100644 index 00000000..ea0cb2be --- /dev/null +++ b/recipes-qt/qt5/qtbase/0018-Avoid-renameeat2-for-native-sdk-builds.patch @@ -0,0 +1,70 @@ +From 6bd6e1b5dea4364c9b4b42fd198b289c095b364b 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 dfcc3c9c7f..30166fe41c 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 b2d81066db..d1783ebdf3 100644 +--- a/src/corelib/io/qfilesystemengine_unix.cpp ++++ b/src/corelib/io/qfilesystemengine_unix.cpp +@@ -1248,16 +1248,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 (renameatx_np(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_EXCL) == 0) + return true; +-- +2.20.1 + diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index fa8396f3..56db29b2 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -28,11 +28,10 @@ SRC_URI += "\ file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \ 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-Check-glibc-version-for-renameat2-statx-on-non-boots.patch \ - file://0014-Disable-ltcg-for-host_build.patch \ - file://0015-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \ - file://0016-corelib-Include-sys-types.h-for-uint32_t.patch \ - file://0017-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ + file://0013-Disable-ltcg-for-host_build.patch \ + file://0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \ + file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \ + file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ " # for syncqt |