https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119369

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Thomas Schwinge <tschwi...@gcc.gnu.org>:

https://gcc.gnu.org/g:816335960d020eac92d49bc9cd13729afd313da7

commit r15-9122-g816335960d020eac92d49bc9cd13729afd313da7
Author: Thomas Schwinge <tschwi...@baylibre.com>
Date:   Sun Mar 30 14:54:01 2025 +0200

    GCN, libstdc++: '#define _GLIBCXX_USE_WEAK_REF 0' [PR119369]

    This fixes a few hundreds of compilation/linking FAILs (similar to
PR69506),
    where the GCN/LLVM 'ld' reported:

        ld: error: relocation R_AMDGPU_REL32_LO cannot be used against symbol
'_ZGTtnam'; recompile with -fPIC
        >>> defined in
[...]/amdgcn-amdhsa/./libstdc++-v3/src/.libs/libstdc++.a(cow-stdexcept.o)
        >>> referenced by cow-stdexcept.cc:259
([...]/libstdc++-v3/src/c++11/cow-stdexcept.cc:259)
        >>>              
cow-stdexcept.o:(_txnal_cow_string_C1_for_exceptions(void*, char const*,
void*)) in archive [...]/amdgcn-amdhsa/./libstdc++-v3/src/.libs/libstdc++.a

        ld: error: relocation R_AMDGPU_REL32_HI cannot be used against symbol
'_ZGTtnam'; recompile with -fPIC
        >>> defined in
[...]/amdgcn-amdhsa/./libstdc++-v3/src/.libs/libstdc++.a(cow-stdexcept.o)
        >>> referenced by cow-stdexcept.cc:259
([...]/source-gcc/libstdc++-v3/src/c++11/cow-stdexcept.cc:259)
        >>>              
cow-stdexcept.o:(_txnal_cow_string_C1_for_exceptions(void*, char const*,
void*)) in archive [...]/amdgcn-amdhsa/./libstdc++-v3/src/.libs/libstdc++.a

        [...]

    ..., which is:

        $ c++filt _ZGTtnam
        transaction clone for operator new[](unsigned long)

    ..., and similarly for other libitm symbols.

    However, the affected test cases, if applicable, then run into execution
test
    FAILs, due to PR119369
    "GCN: weak undefined symbols -> execution test FAIL,
'HSA_STATUS_ERROR_VARIABLE_UNDEFINED'".

            PR target/119369
            libstdc++-v3/
            * config/cpu/gcn/cpu_defines.h: New.
            * configure.host [GCN] (cpu_defines_dir): Point to it.

Reply via email to