Fix install path on i686

See https://src.fedoraproject.org/rpms/rapidfuzz-cpp/pull-request/1#comment-172023

    [ 43%] Linking CXX executable fuzz_osa_distance
    cd /builddir/build/BUILD/rapidfuzz-cpp-2.2.3/redhat-linux-build/fuzzing && /usr/bin/cmake -E cmake_link_script CMakeFiles/fuzz_osa_distance.dir/link.txt --verbose=1
    /usr/bin/clang++ -O2 -flto=thin -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong   -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now   -flto=thin -Wl,--build-id=sha1 CMakeFiles/fuzz_osa_distance.dir/fuzz_osa_distance.cpp.o -o fuzz_osa_distance  -fsanitize=fuzzer,address
    /usr/bin/ld: cannot find /usr/bin/../lib/clang/17/lib/linux/libclang_rt.fuzzer-i386.a: No such file or directory
    /usr/bin/ld: cannot find /usr/bin/../lib/clang/17/lib/linux/libclang_rt.asan_static-i386.a: No such file or directory
    /usr/bin/ld: cannot find /usr/bin/../lib/clang/17/lib/linux/libclang_rt.asan-i386.a: No such file or directory
    /usr/bin/ld: cannot find /usr/bin/../lib/clang/17/lib/linux/libclang_rt.asan_cxx-i386.a: No such file or directory
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Note that renaming the directory is not enough,
because clang -m32 on x86_64 expects the i386 name.
This commit is contained in:
Miro Hrončok 2023-12-13 13:08:26 +01:00
parent ed1b7e9154
commit 5e9ea9c1cf
1 changed files with 11 additions and 1 deletions

View File

@ -34,7 +34,7 @@
Name: compiler-rt
Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: LLVM "compiler-rt" runtime libraries
License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT
@ -112,6 +112,13 @@ export ASMFLAGS=$CFLAGS
# by clang.
mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/ppc64le-redhat-linux-gnu
%endif
%ifarch %{ix86}
# Fix install path on ix86 so that the directory name matches the triple used
# by clang on both actual ix86 and on x86_64 with -m32:
%if "%{_target_cpu}" != "i386"
ln -s i386-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{_target_cpu}-redhat-linux-gnu
%endif
%endif
%check
#%%cmake_build --target check-compiler-rt
@ -131,6 +138,9 @@ mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu
%changelog
%{?llvm_snapshot_changelog_entry}
* Wed Dec 13 2023 Miro Hrončok <mhroncok@redhat.com> - 17.0.6-2
- Fix install path on i686
* Wed Nov 29 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.6-1
- Update to LLVM 17.0.6