On 13.06.23 12:44, Thomas Schwinge wrote:
On 2023-06-05T14:25:18+0200, I wrote:
OK to push the attached
"driver: Forward '-lgfortran', '-lm' to offloading compilation"?
(We didn't have a PR open for that, or did we?)
(It was approved by Joseph and pushed by Thomas as r14-1807-g4bcb46b3ade179 )
I wonder whether we should do for the example:
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2720 +2720 @@ Typical command lines are
--foffload-options=amdgcn-amdhsa=-march=gfx906 -foffload-options=-O3
+-foffload-options=amdgcn-amdhsa=-march=gfx906
To my knowledge the merge_flto_options is also run for code only doing
offloading - such that a host-side -O2 still ends up as -O2 for the offloading
compiler.
Thus, adding -foffload-options=-O3 encourages bad practice, at least kind of.
Thoughts?
BTW: I think the changed linking behavior should be document in the release
notes and in the wiki, i.e. https://gcc.gnu.org/gcc-14/changes.html
and https://gcc.gnu.org/wiki/Offloading (anywhere else?)
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955