Bug 240379

Summary: math/openblas: Fix build on powerpc64 with clang in base
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Piotr Kubaj <pkubaj>
Status: Closed FIXED    
Severity: Affects Some People CC: linimon, phd_kimberlite
Priority: --- Flags: phd_kimberlite: maintainer-feedback+
koobs: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch pkubaj: maintainer-approval? (phd_kimberlite)

Description Piotr Kubaj freebsd_committer freebsd_triage 2019-09-06 22:19:33 UTC
Created attachment 207251 [details]
patch

OpenBLAS on POWER is set up to use OpenMP when threads are enabled. This means we always build with OpenMP on POWER. Disable OPENMP option since it doesn't do anything on POWER.

Since Clang is not happy when linking against gfortran-compiled libraries, use GCC to fix linking.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-06 22:53:06 UTC
^Triage: Reporter is committer, assign accordingly
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2019-09-08 22:05:14 UTC
Approved as mentor (builds on ppcdevref).
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-09-09 18:02:03 UTC
A commit references this bug:

Author: pkubaj
Date: Mon Sep  9 18:01:31 UTC 2019
New revision: 511652
URL: https://svnweb.freebsd.org/changeset/ports/511652

Log:
  math/openblas: fix build on powerpc64 with clang, remove OPENMP option on powerpc64

  On powerpc64 OpenMP is always used when USE_THREADS is defined (which we do unconditionally). This means that OPENMP option on powerpc64 doesn't have any effect and it should be removed.

  Clang also has some problems when linking Fortran libraries with OpenMP, so use GCC for powerpc64.

  PR:		240379
  Approved by:	phd_kimberlite@yahoo.co.jp (maintainer), linimon (mentor)

Changes:
  head/math/openblas/Makefile