summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2024-02-26 15:01:37 +0100
committerMartin Jansa <martin.jansa@gmail.com>2024-03-16 20:38:28 +0100
commit681b2a255482f3c8e07cc201c3ec6722302d576e (patch)
tree158167bf4d88c4a548a8d18d4db6b5a56636a12c
parent4c85e8ec29b354e0055084b69010ad3e51efe700 (diff)
downloadopenembedded-core-contrib-jansa/master.tar.gz
rpm: add PACKAGECONFIG for openmpjansa/master
* and keep it enabled unless libc-musl where it was disabled since upgrade to 4.15.1 in: https://git.openembedded.org/openembedded-core/commit/?id=67257ca87c6fa8e6050a20ecea50daf834c7e869 * you might need to disable it for native builds to be able to reuse rpm-native between hosts with libomp and without to avoid do_package failures like: recipe-sysroot-native/usr/lib/rpm/rpmdeps: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory * and on hosts without libomp it fails in do_configure: | CMake Error at /OE/build/tmp-glibc/work/x86_64-linux/rpm-native/4.19.1/recipe-sysroot-native/usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): | Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) | (Required is at least version "4.5") * I've noticed this in new experimental gentoo profiles which don't enable openmp by default for gcc-13 and newer, see: https://bugs.gentoo.org/890999 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8189b4b48c25dbd7b330b51b53f9023cdbbb29ec https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94d882482714698d6d9b765920cd26bbe849336d I'm not sure what other distributions plan with openmp support in future (and this profile is just experimental and the decision not to enable openmp by default might still change), but having the PACKAGECONFIG at least gives easy way to explicitly enable/disable this in bbappend update: gentoo re-enabled openmp in: https://github.com/gentoo/gentoo/commit/6d50b94b230150f0c380ecd6d596248fe5a7f2fb * openmp is also explicitly disabled in gettext since 2011: https://git.openembedded.org/openembedded-core/commit/?id=e897103a58ad672cc87d2bab3ec45501ef09f8f1 Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.19.1.bb8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.19.1.bb b/meta/recipes-devtools/rpm/rpm_4.19.1.bb
index a495f7ced2..80c8ecc7e3 100644
--- a/meta/recipes-devtools/rpm/rpm_4.19.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.19.1.bb
@@ -52,7 +52,7 @@ DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3 sqlite3 zstd"
DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native"
EXTRA_OECMAKE:append = " -D__CURL:FILEPATH=curl"
-EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF"
+EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF"
# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
# --localstatedir prevents rpm from writing its database to native sysroot when building images
@@ -64,10 +64,14 @@ OECMAKE_GENERATOR = "Unix Makefiles"
BBCLASSEXTEND = "native nativesdk"
-PACKAGECONFIG ??= "internal-openpgp"
+PACKAGECONFIG_OPENMP = "openmp"
+PACKAGECONFIG_OPENMP:libc-musl = ""
+
+PACKAGECONFIG ??= "internal-openpgp ${PACKAGECONFIG_OPENMP}"
PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF"
PACKAGECONFIG[testsuite] = "-DENABLE_TESTSUITE=ON,-DENABLE_TESTSUITE=OFF"
+PACKAGECONFIG[openmp] = "-DENABLE_OPENMP=ON,-DENABLE_OPENMP=OFF"
# Deprecated! https://fedoraproject.org/wiki/Changes/RpmSequoia
PACKAGECONFIG[internal-openpgp] = "-DWITH_INTERNAL_OPENPGP=ON,-DWITH_INTERNAL_OPENPGP=OFF"