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

    <tr>
        <th>Summary</th>
        <td>
            Linker Warning: "Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)" 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    This happens while building aosp with lto. A reduced case of building libziparchive also gives this warning. Here is the linker invocation.

> "clang/host/linux-x86/clang-r498229b/bin/ld.lld" -z now -z relro --hash-style=gnu --eh-frame-hdr -m elf64lriscv -X -shared -o out/soong/.intermediates/system/libziparchive/libziparchive/android_vendor_ramdisk_riscv64_shared_cfi/unstripped/libziparchive.so -Lclang/host/linux-x86/clang-r498229b/lib/clang/17/lib/linux/riscv64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib -L/usr/lib -plugin-opt=mcpu=generic-rv64 --no-demangle --export-dynamic-symbol=__cfi_check out/soong/.intermediates/bionic/libc/crtbegin_so/android_vendor_ramdisk_riscv64/crtbegin_so.o out/soong/.intermediates/system/libziparchive/libziparchive/android_vendor_ramdisk_riscv64_static_cfi_lto-none/obj/system/libziparchive/zip_archive.o out/soong/.intermediates/system/libziparchive/libziparchive/android_vendor_ramdisk_riscv64_static_cfi_lto-none/obj/system/libziparchive/zip_archive_stream_entry.o out/soong/.intermediates/system/libziparchive/libziparchive/android_vendor_ramdisk_riscv64_static_cfi_lto-none/obj/system/libziparchive/zip_cd_entry_map.o out/soong/.intermediates/system/libziparchive/libziparchive/android_vendor_ramdisk_riscv64_static_cfi_lto-none/obj/system/libziparchive/zip_error.o out/soong/.intermediates/system/libziparchive/libziparchive/android_vendor_ramdisk_riscv64_static_cfi_lto-none/obj/system/libziparchive/zip_writer.o out/soong/.intermediates/external/libcxxabi/libc++demangle/android_vendor_ramdisk_riscv64_static_lto-none/libc++demangle.a prebuilts/clang/host/linux-x86/clang-r498229b/lib/clang/17/lib/linux/libclang_rt.ubsan_minimal-riscv64-android.a prebuilts/clang/host/linux-x86/clang-r498229b/lib/clang/17/lib/linux/libclang_rt.builtins-riscv64-android.a out/soong/.intermediates/system/logging/liblog/liblog/android_vendor_ramdisk_riscv64_shared/liblog.so out/soong/.intermediates/system/libbase/libbase/android_vendor_ramdisk_riscv64_shared/libbase.so out/soong/.intermediates/external/zlib/libz/android_vendor_ramdisk_riscv64_shared/libz.so out/soong/.intermediates/external/libcxx/libc++/android_vendor_ramdisk_riscv64_shared/libc++.so out/soong/.intermediates/bionic/libc/libc/android_vendor_ramdisk_riscv64_shared/libc.so out/soong/.intermediates/bionic/libm/libm/android_vendor_ramdisk_riscv64_shared/libm.so out/soong/.intermediates/bionic/libdl/libdl/android_vendor_ramdisk_riscv64_shared/libdl.so out/soong/.intermediates/bionic/libc/crtend_so/android_vendor_ramdisk_riscv64/crtend_so.o -z noexecstack -z relro -z now --build-id=md5 --fatal-warnings --no-undefined-version --exclude-libs libgcc.a --exclude-libs libgcc_stripped.a --exclude-libs libunwind_llvm.a --exclude-libs libunwind.a -mllvm -regalloc-enable-advisor=release --icf=safe --pack-dyn-relocs=android+relr --no-undefined --hash-style=gnu -z max-page-size=4096 -plugin-opt -emulated-tls=0 --gc-sections -soname libziparchive.so -plugin-opt O1 --exclude-libs=libclang_rt.builtins-riscv64-android.a --exclude-libs=libclang_rt.ubsan_minimal-riscv64-android.a

All the binary files (including the ones in .a) have 'double-float ABI'. it could be that the bitcode files 'out/soong/.intermediates/system/libziparchive/libziparchive/android_vendor_ramdisk_riscv64_static_cfi_lto-none/obj/system/libziparchive/*.o' are not getting compiled with the double-float flag?

Related discussions/PR:
- [https://discourse.llvm.org/t/myterious-soft-float-output-in-lto-cache/70753](https://www.google.com/url?q=https://discourse.llvm.org/t/myterious-soft-float-output-in-lto-cache/70753)
- [[RISCV] Ensure target features get passed to the LTO linker for RISC-V](https://reviews.llvm.org/D132843)


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUWE1vI7kR_TXUpcCGxNaHddDBjlbYAQbYYLLY5NZgk9XdtWaTHX5Iln99wJbskb3OjBQki8zFbJHFelWPRfLRMgRqLeKGLR7YYjuRKXbObzryUlM8yknt9HHza0cBOjkMaAMcOjIIdSKjybYgXRjgQLEDE10B9-BRJ4UalAwIrvlqaah-pkF61dEeQZrgoKU9BojZ_UF6S7Yt4Gf0CJR7EQzZR_RAdu-UjORswaZbNr0__y1_AiaEMtK2TOw6FyITO0M2PfGnuyUTu3GI-_n6Toh1zcSuJptNdGGMZkIAfwbrDrnxaLwDzjsZOh7i0SArt61NwDl2vPGyR95pD7wHNM1ybjwFtQf-D-Chkx41cAcu5QiCc2NABdmIvkdNMmLIA8cQsR9jvKDig9_Sau9IV3u02vnKy15TeKxGyOW8OgFWqiEmdsmG6GkYUL93VAQH_PMt9BiqX7qZ2M1Wr13jLCZ25wiAf34dKorT50tvCv7fjhmq3xkBH0xqyXI3RFZuezWkzDta9KS4H7G4dVxjL21rMC_H0-B85PpoZU-Kh2NfO8PKbZUJqVSH6vF7C1GTs6ROEeRG-VhjS7YK7rvsvzUv_rxFjzKSGnM00XHrbJ7k6t-_hfFMQ_VSDT9MpFWIHmVfoY3--AOErfQp1KqXww8QLnrv_A8Q58FTxCsCxaeI3kpz3s5PT7Km1639wMTDy9lxdawXcf7RSyFh8JhvtRguDsv_yvGa0fJo5WOR6iBt1ZOlXhp-jpCfE_izghgRyIYP8K8uH9e2NNoYqo1783HVPfc6Id9nNxRtLQO--boBLc-4Au6i9J5fSKyfb4N6vg3nVOJvKvM2vPOkK1Df35Ln5hasG1H6r80NKP2NKNpctDfgaPMfkKZ8RKuvFxYn48KdpCk-oQpRqscLiXqWrHwU1px0lk16AZw3MkrDz0I6nHRTshobsqj5Hn0gZ0cBpUzSyA3VIavyVqlCftx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