0004-configure-ac-fix-cross-compilation.patch 1023 B

123456789101112131415161718192021222324252627282930313233
  1. From 13585fbbe83eb177b13d86c2d6f11ff41a68d07e Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Tue, 10 Nov 2020 18:20:24 +0100
  4. Subject: [PATCH] configure.ac: fix cross-compilation
  5. Use AC_COMPILE_IFELSE as AC_RUN_IFELSE raises a build failure when
  6. cross-compiling
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. [Retrieved from:
  9. https://github.com/rpm-software-management/rpm/commit/13585fbbe83eb177b13d86c2d6f11ff41a68d07e]
  10. ---
  11. configure.ac | 4 ++--
  12. 1 file changed, 2 insertions(+), 2 deletions(-)
  13. diff --git a/configure.ac b/configure.ac
  14. index 38d3c286a..a83016449 100644
  15. --- a/configure.ac
  16. +++ b/configure.ac
  17. @@ -175,11 +175,11 @@ AS_IF([test "x$ac_cv_prog_c_openmp" != x &&
  18. old_CFLAGS=$CFLAGS
  19. CFLAGS="$CFLAGS $OPENMP_CFLAGS"
  20. AC_MSG_CHECKING([OpenMP is at least version 4.5])
  21. - AC_RUN_IFELSE(
  22. + AC_COMPILE_IFELSE(
  23. [AC_LANG_PROGRAM(
  24. [#include <omp.h>],
  25. [#if _OPENMP < 201511
  26. - exit(1);
  27. + #error
  28. #endif
  29. ]
  30. )],