Bug 220829

Summary: devel/flang: flang sources ready for llvm 4.0 now
Product: Ports & Packages Reporter: Rainer Hurling <rhurlin>
Component: Individual Port(s)Assignee: Johannes M Dieterich <jmd>
Status: Closed FIXED    
Severity: Affects Only Me CC: rhurlin
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (jmd)
Hardware: Any   
OS: Any   
URL: https://github.com/flang-compiler/clang/commits/flang_release_40
Description Flags
patch updates devel/flang-clang from version 3.9 to 4.0
patch updates devel/flang from version 3.9 to 4.0 none

Description Rainer Hurling freebsd_committer 2017-07-18 13:34:12 UTC
It seems, flang can now be build by clang4.0 [1][2]. So I would vote for a change within the devel/flang and devel/flang-clang ports.

[1] https://github.com/flang-compiler/flang/commit/5a5a8cdea310056417f734a338d0f6ca85dd9d9f
[2] https://github.com/flang-compiler/clang/commits/flang_release_40
Comment 1 Rainer Hurling freebsd_committer 2017-07-18 16:28:24 UTC
Created attachment 184474 [details]
patch updates devel/flang-clang from version 3.9 to 4.0
Comment 2 Rainer Hurling freebsd_committer 2017-07-18 16:29:56 UTC
Created attachment 184475 [details]
patch updates devel/flang from version 3.9 to 4.0

These two patches build and install fine, but have problems to run, at least on recent HEAD amd64.
Comment 3 Rainer Hurling freebsd_committer 2017-07-18 17:22:19 UTC
It turns out, that run time problems only occur, if flang is called without a fortran source file, i.e.

/usr/local/flang/lib/libflangmain.a(flangmain.c.o): In function `main':
/usr/ports/devel/flang/work/flang-cd44bcd/runtime/flangmain/flangmain.c:(.text.main+0x39): undefined reference to `MAIN_'
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)

Compiling something like 'flang hello.f90' gives an executable a.out, as expected:

 hello world

So I think, the updated version 4.0 should be usable in princible.
Comment 4 Johannes M Dieterich freebsd_committer 2017-07-21 03:30:13 UTC
Thanks for the patches! I'll try to test them these days and will then commit them to the port unless something comes up.
Comment 5 commit-hook freebsd_committer 2017-07-31 02:33:51 UTC
A commit references this bug:

Author: jmd
Date: Mon Jul 31 02:33:10 UTC 2017
New revision: 446946
URL: https://svnweb.freebsd.org/changeset/ports/446946

  devel/flang and devel/flang-clang: Update to snapshots supporting llvm 4.0 and upgrade dependencies to this version.

  PR:	220829
  Submitted by:	Rainer Hurling (rhurlin@gwdg.de)
  Reviewed by:	swills (mentor)
  Approved by:	swills (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11709

Comment 6 Johannes M Dieterich freebsd_committer 2017-07-31 02:34:31 UTC
Committed in r446946. Thanks again!