<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/77846>77846</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            linux s390x: fail to link with `error: cannot find -lunwind_shared`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++,
            backend:SystemZ,
            build-problem
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          sylvestre
      </td>
    </tr>
</table>

<pre>
    ```

: && /build/source/build-llvm/./bin/clang++ --target=s390x-linux-gnu -fPIC -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fdebug-prefix-map=/build/source/build-llvm/runtimes/runtimes-bins=../../../ -fdebug-prefix-map=/build/source/= -no-canonical-prefixes -ffile-prefix-map=/build/source/build-llvm/runtimes/runtimes-bins=../../../ -ffile-prefix-map=/build/source/= -no-canonical-prefixes  -O3 -DNDEBUG -Wl,-z,relro -Wl,--build-id -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=gold -nostdlib++ --unwindlib=none -shared -Wl,-soname,libc++abi.so.1 -o /build/source/build-llvm/lib/libc++abi.so.1.0 libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_demangle.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_guard.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_handlers.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_virtual.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_exception.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_stdexcept.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_typeinfo.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/abort_message.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/fallback_malloc.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/private_typeinfo.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_new_delete.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_noexception.cpp.o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_thread_atexit.cpp.o -lpthread  -lc  -lunwind_shared  -lpthread  -lc && :
/usr/bin/s390x-linux-gnu-ld.gold: error: cannot find -lunwind_shared
```

bbbe8ecc1779 was ok
b3981edb51bf fails
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0Vt-P2zgO_muUF4GBIyeTzEMeOpPm0Ie7HtorgtuXgJZohzuy5JXkTNK_fiE786PdYltgssDAE1PiR-rTZ5IYIzeOaC0Wd2KxmWCfDj6s49keKaZAk8qb81rcFJe_YiOKd5dn-U4KdSPUjRRqW_VsjVDb6Pug6ckA1h5bobbTbGAn1FZbdI1Qd0LdSYCEoaEkyk0sb4sTWHb9CRrXS6j_--FeQh0T6gfogk-kkw8QU_CukbCrfWgxS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