diff options
| author | Samuli Piippo <samuli.piippo@gmail.com> | 2023-11-08 18:39:06 +0000 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-11-11 09:26:41 -0800 |
| commit | ca4c5ab653b9d5187385050552386f95ec868944 (patch) | |
| tree | 2c37f846fa6f743eea2a2b21fc4ed410612199bc /meta-oe | |
| parent | 15df8b4e802cfb29ba3d1aff2b446f376d97501b (diff) | |
| download | meta-openembedded-ca4c5ab653b9d5187385050552386f95ec868944.tar.gz | |
abseil-cpp: fix mingw build
Add patch to fix mingw build of abseil-cpp
undefined reference to `absl::lts_20230802::synchronization_internal::Win32Waiter::Poke()'
undefined reference to `absl::lts_20230802::synchronization_internal::Win32Waiter::Win32Waiter()'
undefined reference to `absl::lts_20230802::synchronization_internal::Win32Waiter::Post()'
undefined reference to `absl::lts_20230802::synchronization_internal::Win32Waiter::Poke()'
and include bindir to recipe sysroot to fix protobuf build.
| The imported target "absl::log_severity" references the file
|
| "../nativesdk-protobuf/4.23.4/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-w64-mingw32/usr/bin/libabsl_log_severity.dll"
|
| but this file does not exist.
Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-Avoid-using-both-Win32Waiter-and-PthreadWaiter-on-Mi.patch | 62 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb | 3 |
2 files changed, 65 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-Avoid-using-both-Win32Waiter-and-PthreadWaiter-on-Mi.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-Avoid-using-both-Win32Waiter-and-PthreadWaiter-on-Mi.patch new file mode 100644 index 0000000000..db559bb161 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0004-Avoid-using-both-Win32Waiter-and-PthreadWaiter-on-Mi.patch | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | From cb7665f39e23e95e2466390c60ee5a410780a3ed Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Derek Mauro <dmauro@google.com> | ||
| 3 | Date: Wed, 8 Nov 2023 09:55:31 -0800 | ||
| 4 | Subject: [PATCH] Avoid using both Win32Waiter and PthreadWaiter on MinGW, and | ||
| 5 | use StdcppWaiter instead. | ||
| 6 | |||
| 7 | There are various flavors of MinGW, some of which support pthread, | ||
| 8 | and some of which support Win32. Instead of figuring out which | ||
| 9 | platform is being used, just use the generic implementation. | ||
| 10 | |||
| 11 | PiperOrigin-RevId: 580565507 | ||
| 12 | Change-Id: Ia85fd7496f1e6ebdeadb95202f0039e844826118 | ||
| 13 | Upstream-Status: Backport | ||
| 14 | --- | ||
| 15 | absl/synchronization/internal/pthread_waiter.h | 4 ++-- | ||
| 16 | absl/synchronization/internal/win32_waiter.h | 6 ++++-- | ||
| 17 | 2 files changed, 6 insertions(+), 4 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/absl/synchronization/internal/pthread_waiter.h b/absl/synchronization/internal/pthread_waiter.h | ||
| 20 | index 206aefa4..23db76ad 100644 | ||
| 21 | --- a/absl/synchronization/internal/pthread_waiter.h | ||
| 22 | +++ b/absl/synchronization/internal/pthread_waiter.h | ||
| 23 | @@ -16,7 +16,7 @@ | ||
| 24 | #ifndef ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_ | ||
| 25 | #define ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_ | ||
| 26 | |||
| 27 | -#ifndef _WIN32 | ||
| 28 | +#if !defined(_WIN32) && !defined(__MINGW32__) | ||
| 29 | #include <pthread.h> | ||
| 30 | |||
| 31 | #include "absl/base/config.h" | ||
| 32 | @@ -55,6 +55,6 @@ class PthreadWaiter : public WaiterCrtp<PthreadWaiter> { | ||
| 33 | ABSL_NAMESPACE_END | ||
| 34 | } // namespace absl | ||
| 35 | |||
| 36 | -#endif // ndef _WIN32 | ||
| 37 | +#endif // !defined(_WIN32) && !defined(__MINGW32__) | ||
| 38 | |||
| 39 | #endif // ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_ | ||
| 40 | diff --git a/absl/synchronization/internal/win32_waiter.h b/absl/synchronization/internal/win32_waiter.h | ||
| 41 | index 87eb617c..fdab264e 100644 | ||
| 42 | --- a/absl/synchronization/internal/win32_waiter.h | ||
| 43 | +++ b/absl/synchronization/internal/win32_waiter.h | ||
| 44 | @@ -20,7 +20,8 @@ | ||
| 45 | #include <sdkddkver.h> | ||
| 46 | #endif | ||
| 47 | |||
| 48 | -#if defined(_WIN32) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | ||
| 49 | +#if defined(_WIN32) && !defined(__MINGW32__) && \ | ||
| 50 | + _WIN32_WINNT >= _WIN32_WINNT_VISTA | ||
| 51 | |||
| 52 | #include "absl/base/config.h" | ||
| 53 | #include "absl/synchronization/internal/kernel_timeout.h" | ||
| 54 | @@ -65,6 +66,7 @@ class Win32Waiter : public WaiterCrtp<Win32Waiter> { | ||
| 55 | ABSL_NAMESPACE_END | ||
| 56 | } // namespace absl | ||
| 57 | |||
| 58 | -#endif // defined(_WIN32) && _WIN32_WINNT >= _WIN32_WINNT_VISTA | ||
| 59 | +#endif // defined(_WIN32) && !defined(__MINGW32__) && | ||
| 60 | + // _WIN32_WINNT >= _WIN32_WINNT_VISTA | ||
| 61 | |||
| 62 | #endif // ABSL_SYNCHRONIZATION_INTERNAL_WIN32_WAITER_H_ | ||
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb index 5003187d0d..65ecab7d08 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \ | |||
| 15 | file://0002-Remove-maes-option-from-cross-compilation.patch \ | 15 | file://0002-Remove-maes-option-from-cross-compilation.patch \ |
| 16 | file://abseil-ppc-fixes.patch \ | 16 | file://abseil-ppc-fixes.patch \ |
| 17 | file://0003-Remove-neon-option-from-cross-compilation.patch \ | 17 | file://0003-Remove-neon-option-from-cross-compilation.patch \ |
| 18 | file://0004-Avoid-using-both-Win32Waiter-and-PthreadWaiter-on-Mi.patch \ | ||
| 18 | " | 19 | " |
| 19 | 20 | ||
| 20 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
| @@ -32,4 +33,6 @@ EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \ | |||
| 32 | 33 | ||
| 33 | BBCLASSEXTEND = "native nativesdk" | 34 | BBCLASSEXTEND = "native nativesdk" |
| 34 | 35 | ||
| 36 | SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}" | ||
| 37 | |||
| 35 | FILES:${PN}-dev += "${includedir} ${libdir}/cmake ${libdir}/pkgconfig" | 38 | FILES:${PN}-dev += "${includedir} ${libdir}/cmake ${libdir}/pkgconfig" |
