@@ -122,6 +122,9 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
122
122
%define rust_triple x86_64 -unknown-linux-gnux32
123
123
%define rust_host_triple x86_64 -unknown-linux-gnu
124
124
%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
125
128
%else
126
129
%ifarch armv6hl armv7hl armv7hnl
127
130
%define rust_triple arm-unknown-linux-gnueabihf
@@ -419,9 +422,13 @@ find $RPM_BUILD_ROOT%{_libdir}/ -type f -name '*.so' -exec chmod -v +x '{}' '+'
419
422
# The libdir libraries are identical to those under rustlib/. It's easier on
420
423
# library loading if we keep them in libdir, but we do need them in rustlib/
421
424
# 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
425
432
426
433
# Remove installer artifacts (manifests, uninstall scripts, etc.)
427
434
find $RPM_BUILD_ROOT%{rustlibdir }/ -maxdepth 1 -type f -exec rm -v '{}' '+'
@@ -462,7 +469,7 @@ rm -rf $RPM_BUILD_ROOT
462
469
%attr(755,root,root) %{_bindir }/rustc
463
470
%attr(755,root,root) %{_bindir }/rustdoc
464
471
%attr(755,root,root) %{_bindir }/rustfmt
465
- %attr(755,root,root) %{_libdir }/librustc * -* .so
472
+ %attr(755,root,root) %{_libdir }/librustc_driver -* .so
466
473
%attr(755,root,root) %{_libdir }/libstd-* .so
467
474
%attr(755,root,root) %{_libdir }/libtest-* .so
468
475
%{_mandir }/man1/rustc.1*
0 commit comments