![Fabrice Fontaine](/assets/img/avatar_default.png)
Don't set openmp to fix a build failure with codesourcery toolchain that doesn't have OpenMP >= 4.5 indeed upstream doesn't want to remove the build failure if the user provides --enable-openmp and OpenMP is < 4.5: https://github.com/rpm-software-management/rpm/pull/1433 Fixes: - http://autobuild.buildroot.org/results/05dd945d24e8684aad6a2343ba7f6f8a7cea8349 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
34 lines
1,023 B
Diff
34 lines
1,023 B
Diff
From 13585fbbe83eb177b13d86c2d6f11ff41a68d07e Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Tue, 10 Nov 2020 18:20:24 +0100
|
|
Subject: [PATCH] configure.ac: fix cross-compilation
|
|
|
|
Use AC_COMPILE_IFELSE as AC_RUN_IFELSE raises a build failure when
|
|
cross-compiling
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
[Retrieved from:
|
|
https://github.com/rpm-software-management/rpm/commit/13585fbbe83eb177b13d86c2d6f11ff41a68d07e]
|
|
---
|
|
configure.ac | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 38d3c286a..a83016449 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -175,11 +175,11 @@ AS_IF([test "x$ac_cv_prog_c_openmp" != x &&
|
|
old_CFLAGS=$CFLAGS
|
|
CFLAGS="$CFLAGS $OPENMP_CFLAGS"
|
|
AC_MSG_CHECKING([OpenMP is at least version 4.5])
|
|
- AC_RUN_IFELSE(
|
|
+ AC_COMPILE_IFELSE(
|
|
[AC_LANG_PROGRAM(
|
|
[#include <omp.h>],
|
|
[#if _OPENMP < 201511
|
|
- exit(1);
|
|
+ #error
|
|
#endif
|
|
]
|
|
)],
|