openmpi.mk 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ################################################################################
  2. #
  3. # openmpi
  4. #
  5. ################################################################################
  6. OPENMPI_VERSION_MAJOR = 4.1
  7. OPENMPI_VERSION = $(OPENMPI_VERSION_MAJOR).8
  8. OPENMPI_SITE = https://www.open-mpi.org/software/ompi/v$(OPENMPI_VERSION_MAJOR)/downloads
  9. OPENMPI_SOURCE = openmpi-$(OPENMPI_VERSION).tar.bz2
  10. OPENMPI_LICENSE = BSD-3-Clause
  11. OPENMPI_LICENSE_FILES = LICENSE
  12. OPENMPI_INSTALL_STAGING = YES
  13. # The macro searching for IME (Infinite Memory Engine) filesystem
  14. # brings "-I/usr/local/include" in the CPPFLAGS, even if not
  15. # found. This makes the configuration fail. See:
  16. # https://github.com/open-mpi/ompi/blob/v4.1.5/config/ompi_check_ime.m4#L35
  17. # Disable explicitly to avoid the issue.
  18. OPENMPI_CONF_OPTS = --without-ime
  19. # Enabling Fortran support requires pre-seeding the configure script
  20. # with various values that cannot be guessed, so we provide cache
  21. # files for various architectures.
  22. ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
  23. ifeq ($(BR2_mips)$(BR2_mipsel),y)
  24. OPENMPI_FORTRAN_CONF_CACHE = package/openmpi/openmpi-mips32-fortran.cache
  25. else ifeq ($(BR2_mips64)$(BR2_mips64el),y)
  26. OPENMPI_FORTRAN_CONF_CACHE = package/openmpi/openmpi-mips64-fortran.cache
  27. endif
  28. endif
  29. ifneq ($(OPENMPI_FORTRAN_CONF_CACHE),)
  30. define OPENMPI_COPY_FORTRAN_CACHE
  31. cp $(OPENMPI_FORTRAN_CONF_CACHE) $(@D)/openmpi-config.cache
  32. endef
  33. OPENMPI_POST_PATCH_HOOKS += OPENMPI_COPY_FORTRAN_CACHE
  34. OPENMPI_CONF_OPTS += \
  35. --enable-mpi-fortran=yes \
  36. --cache-file=$(@D)/openmpi-config.cache
  37. else
  38. OPENMPI_CONF_OPTS += --enable-mpi-fortran=no
  39. endif
  40. OPENMPI_CFLAGS = $(TARGET_CFLAGS)
  41. ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
  42. OPENMPI_CFLAGS += -O0
  43. endif
  44. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
  45. OPENMPI_LIBS += -latomic
  46. endif
  47. OPENMPI_CONF_ENV = CFLAGS="$(OPENMPI_CFLAGS)" LIBS="$(OPENMPI_LIBS)"
  48. $(eval $(autotools-package))