Bug 228011 - math/openblas: switch to flang
Summary: math/openblas: switch to flang
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-06 06:11 UTC by robert.ayrapetyan
Modified: 2018-07-15 12:09 UTC (History)
4 users (show)

See Also:
phd_kimberlite: maintainer-feedback+


Attachments
necessary changes for switching to flang (2.60 KB, patch)
2018-05-06 06:11 UTC, robert.ayrapetyan
no flags Details | Diff
poudriere log for a patched port (205.63 KB, application/x-7z-compressed)
2018-05-06 22:06 UTC, robert.ayrapetyan
no flags Details
necessary changes for switching to flang (3.18 KB, patch)
2018-05-07 06:41 UTC, robert.ayrapetyan
no flags Details | Diff
poudriere log for a patched port (207.00 KB, application/x-7z-compressed)
2018-05-07 06:41 UTC, robert.ayrapetyan
no flags Details
proper handling of non-supported archs (3.39 KB, patch)
2018-05-07 22:24 UTC, robert.ayrapetyan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description robert.ayrapetyan 2018-05-06 06:11:20 UTC
Created attachment 193076 [details]
necessary changes for switching to flang

There are lot of known problems with gfortran when clang is involved, e.g.:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196862

This patch switches to using flang compiler (on amd64 only) and resolves gcc linking issues.

Note:
- deleted file "files/patch-exports+Makefile" (backward compatibility checked on gfortran builds)
- patched "Makefile" contains a "ditry" arch check, I believe it's the best available option now until "flang" will be set by default for all amd64 ports in fortran.mk.
Comment 1 robert.ayrapetyan 2018-05-06 22:06:51 UTC
Created attachment 193122 [details]
poudriere log for a patched port
Comment 2 Yuri Victorovich freebsd_committer 2018-05-07 00:16:35 UTC
There are 2 issues with this patch:
1. The correct way to do this is using the port option FLANG, see math/R how this is done there. Please resubmit the patch doing this 
2. Some people might disagree with this, not sure. This adds a certain level of complexity.

Also, for this all ports that depend on lapack should probably be rebuilt and retested.
Comment 3 robert.ayrapetyan 2018-05-07 06:41:26 UTC
Created attachment 193137 [details]
necessary changes for switching to flang

A less-destructive switch to flang (OPTION).
Comment 4 robert.ayrapetyan 2018-05-07 06:41:50 UTC
Created attachment 193138 [details]
poudriere log for a patched port
Comment 5 robert.ayrapetyan 2018-05-07 22:24:01 UTC
Created attachment 193167 [details]
proper handling of non-supported archs