On Fri, 12 May 2023, Tobias Burnus wrote:

> Long standing issue but as top-level 'asm' statement were rare, it did not
> show up.
> However, the fix for PR108969 in commit r14-321-g9a41d2cdbcd added code
> 
> +#elif defined(_GLIBCXX_SYMVER_GNU)
> +  __extension__ __asm (".globl _ZSt21ios_base_library_initv");
> q
> libstdc++-v3/include/std/iostream. This was then duly written by the
> offloading-device
> lto1 for digestion by the device-target assembler. While the llvm-mc linker
> user by
> GCN did accept .globl, nvptx's ptxas did choke on it.
> 
> Additionally, as the assembly was already written for offloading, the output
> was
> lost on the host when using LTO for not only for offload but for real (i.e.
> with -flto).
> 
> Has someone an idea how to check whether the offloading-code assembler does
> not
> contain the _ZSt21ios_base_library_initv while the host-side (before or after
> LTO)
> should contain it, but only with _GLIBCXX_SYMVER_GNU?
> Otherwise, the testcase tests only and at least whether it breaks with nvptx
> as ptxas does not like the symbol.
> 
> * * *
> 
> Tested (manually + running the OvO and sollve-testsuite) on x86-64-gnu-linux
> with nvptx
> offloading and with "make check -k" on x86-64-gnu-linux, albeit without
> offloading configured.
> The installed-build regtesting of "make check-target-libgomp" seems to be
> currently broken
> as it does run all checking code (check_effective_target...) but does not seem
> to find
> any actual testcase to be run, probably a side effect of the recent testsuite
> changes.
> 
> OK for mainline and GCC 13?

Without any idea about the details above the patch looks quite reasonable,
thus OK for trunk.  OK for branch after a while if no issues showed up.

Thanks,
Richard.

Reply via email to