@@ -122,6 +122,9 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
122122%define rust_triple x86_64 -unknown-linux-gnux32
123123%define rust_host_triple x86_64 -unknown-linux-gnu
124124%define rust_bootstrap_triple x86_64 -unknown-linux-gnu
125+ # libs in _libdir are x86_64 64bit
126+ %define _lib lib64
127+ %define _libdir %{_prefix }/lib64
125128%else
126129%ifarch armv6hl armv7hl armv7hnl
127130%define rust_triple arm-unknown-linux-gnueabihf
@@ -419,9 +422,13 @@ find $RPM_BUILD_ROOT%{_libdir}/ -type f -name '*.so' -exec chmod -v +x '{}' '+'
419422# The libdir libraries are identical to those under rustlib/. It's easier on
420423# library loading if we keep them in libdir, but we do need them in rustlib/
421424# to support dynamic linking for compiler plugins, so we'll symlink.
422- (cd "$RPM_BUILD_ROOT%{rustlibdir }/%{rust_triple }/lib" &&
423- find ../../../../%{_lib } -maxdepth 1 -name '*.so' \
424- -exec ln -v -f -s -t . '{}' '+')
425+ for l in libstd libtest ; do
426+ liblib= $RPM_BUILD_ROOT%{_libdir }/${l}-*.so
427+ libstd= $RPM_BUILD_ROOT%{rustlibdir }/%{rust_triple }/lib/${l}-*.so
428+ if [ "$(basename ${liblib})" = "$(basename ${libstd})" ]; then
429+ ln -vfsr ${libstd} $RPM_BUILD_ROOT%{_libdir }/
430+ fi
431+ done
425432
426433# Remove installer artifacts (manifests, uninstall scripts, etc.)
427434find $RPM_BUILD_ROOT%{rustlibdir }/ -maxdepth 1 -type f -exec rm -v '{}' '+'
@@ -462,7 +469,7 @@ rm -rf $RPM_BUILD_ROOT
462469%attr(755,root,root) %{_bindir }/rustc
463470%attr(755,root,root) %{_bindir }/rustdoc
464471%attr(755,root,root) %{_bindir }/rustfmt
465- %attr(755,root,root) %{_libdir }/librustc * -* .so
472+ %attr(755,root,root) %{_libdir }/librustc_driver -* .so
466473%attr(755,root,root) %{_libdir }/libstd-* .so
467474%attr(755,root,root) %{_libdir }/libtest-* .so
468475%{_mandir }/man1/rustc.1*
0 commit comments