New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for llvm-based Fortran compiler #4867
Conversation
Pull Request assignment Areas affected: ebuilds sys-devel/clang: @gentoo/llvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NEEDINFO. Aside to the minor issues I've noted, I'm strongly against heavy patching of clang in upstream-incompatible way.
sys-devel/clang/metadata.xml
Outdated
@@ -29,6 +29,7 @@ Conformance with C/C++/ObjC and their variants</longdescription> | |||
<use> | |||
<flag name="default-compiler-rt">Use compiler-rt instead of libgcc as the default rtlib for clang</flag> | |||
<flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag> | |||
<flag name="flang">Add NVidia patch to support <pkg>sys-devel/flang</pkg></flag> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seriously? Are we really supposed to advertise the vendor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -1,4 +1,5 @@ | |||
DIST cfe-4.0.0.src.tar.xz 10900916 SHA256 cea5f88ebddb30e296ca89130c83b9d46c2d833685e2912303c828054c4dc98a SHA512 a0d9972ec337a5c105fcbe7abc4076ba1e580f28908a3318f43bbfe59143f446ed5b78dad210f624145d7e5a3d56c15bfead78826c068422b60120fa1cfa482a WHIRLPOOL fe04b6955b82915bba09726947fceff92e67ffaac97de4b8c32c18546262f60a4307fdaccd3c9540710392658ed47f3bcfe44791de8d7d30786d56576f339aee | |||
DIST clang-4.0.0-flang.patch.xz 12596 SHA256 af5529c1405eb1679d083f8cb7ad232ff0727ec03fb51775e769c652a721fd82 SHA512 e60718ae6d232e9033c8d346c07688c67b6bb0ef2b1893da69d4359d282a3ab2f1737a3177b85899557b04d3fad6310c319220873362f6d49d1edf9393583523 WHIRLPOOL 19f3dac0ef84b89a2c5eb2f93276eeb14a34d8b175bc8e0b137c531b9f40d21fc2bf1ac700f4f574dd578f4d2b86426ebf53fde957c4348daedde165d8a8160c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a major change. What's the state of this upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch isn't big: junghans/clang@release_40...junghans:flang_release_40
and it mainly add a fortran case everywhere.
Half of it has been merge between 3.9 and 4.0, the rest hopefully will go into the next release.
sys-devel/flang/flang-9999.ebuild
Outdated
local mycmakeargs=( | ||
-DTARGET_ARCHITECTURE=$(uname -m) #https://github.com/flang-compiler/flang/pull/83 | ||
-DTARGET_OS=$(uname -s) #https://github.com/flang-compiler/flang/pull/86 | ||
-DLLVM_CMAKE_PATH="${EPREFIX}"/usr/$(get_libdir)/llvm/4/$(get_libdir)/cmake/llvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the incorrect path which you incorrectly assumed because on your /usr/lib symlink. Plus, there's llvm.eclass to give you paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Package-Manager: Portage-2.3.5, Repoman-2.3.1
@mgorny: The flang patch mainly extends clang functionality, it is just slightly too big for I leave it up to you if you want to conditionally patch it in or not. |
If at all, I'd rather apply it unconditionally. However:
|
I have no say in this, but personally am opposed to this. These patches are way too heavy for downstream stuff. I would wait until the next release, but again, this is @mgorny's call. |
😞 The QA check for this pull request has found the following issues: Issues inherited from Gentoo (may be modified by PR): |
The diff stat is:
so honestly there are mainly additions, so it seems safe to unconditionally apply it. |
All things considered, I'm going to reject it for the moment. We can revisit this when there's a clear agreement between flang and clang upstreams, and either the patches are in clang's git, or at least are on good way making it there. To complete the rationale: I don't think this kind of upstream patching is a good solution. Even if the patch is not really intrusive (which I don't have the resources to properly verify), it is a burden. For next clang release, I will have to either wait for flang project to release an updated patch or temporarily kill flang support. This is not the kind of patchset chasing I'm interested in. |
@gentoo/sci @gentoo/llvm