Bug 240379 - math/openblas: Fix build on powerpc64 with clang in base
Summary: math/openblas: Fix build on powerpc64 with clang in base
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Piotr Kubaj
Depends on:
Reported: 2019-09-06 22:19 UTC by Piotr Kubaj
Modified: 2019-09-09 18:02 UTC (History)
2 users (show)

See Also:
phd_kimberlite: maintainer-feedback+
koobs: merge-quarterly?

patch (562 bytes, patch)
2019-09-06 22:19 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (phd_kimberlite)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-09-06 22:19:33 UTC
Created attachment 207251 [details]

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 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

  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)