/[packages]/cauldron/rust/current/SPECS/rust.spec
ViewVC logotype

Diff of /cauldron/rust/current/SPECS/rust.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1396720 by akien, Wed May 8 14:26:40 2019 UTC revision 1396907 by akien, Thu May 9 00:07:15 2019 UTC
# Line 22  Line 22 
22  # Only the specified arches will use bootstrap binaries.  # Only the specified arches will use bootstrap binaries.
23  #global bootstrap_arches %%{rust_arches}  #global bootstrap_arches %%{rust_arches}
24    
25    # To bootstrap a compiler for a Tier 2 platform, we first need to build a
26    # compiler for a Tier 1 platform that targets the Tier 2 platform, then use
27    # the resulting compiler in a second build. Set bootstrap_build_arch to the
28    # Tier 1 arch for the first build, leave it undefined for the second build.
29    %bcond_without bootstrap_i586
30    %if %with bootstrap_i586
31    %ifarch i586
32    %global bootstrap_build_arch i686
33    %endif
34    %endif
35    
36  # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.  # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
37  %bcond_with llvm_static  %bcond_with llvm_static
38    
# Line 81  Source0:        https://static.rust-lang Line 92  Source0:        https://static.rust-lang
92  Patch1:         rust-pr57840-llvm7-debuginfo-variants.patch  Patch1:         rust-pr57840-llvm7-debuginfo-variants.patch
93    
94  # https://github.com/rust-lang/rust/pull/60313  # https://github.com/rust-lang/rust/pull/60313
95  Patch2:         0001-Limit-internalization-in-LLVM-8-ThinLTO.patch  Patch2:         0001-Limit-internalization-in-LLVM-8-ThinLTO.patch
96    
97    # Upstream patch to fix typenum crate build on i386/i486/i586.
98    Patch3:         typenum-pr115-fix-log2-rounding-error.patch
99    
100  # Get the Rust triple for any arch.  # Get the Rust triple for any arch.
101  %{lua: function rust_triple(arch)  %{lua: function rust_triple(arch)
# Line 93  Patch2:         0001-Limit-internalizati Line 107  Patch2:         0001-Limit-internalizati
107      arch = "powerpc64"      arch = "powerpc64"
108    elseif arch == "ppc64le" then    elseif arch == "ppc64le" then
109      arch = "powerpc64le"      arch = "powerpc64le"
   elseif arch == "i586" then  
     arch = "i686"  
110    end    end
111    return arch.."-unknown-linux-"..abi    return arch.."-unknown-linux-"..abi
112  end}  end}
113    
114    %if %defined bootstrap_build_arch
115    %global rust_triple %{lua: print(rust_triple(rpm.expand("%{bootstrap_build_arch}")))}
116    %global target_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
117    %else
118  %global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}  %global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
119    %global target_triple %{rust_triple}
120    %endif
121    
122  %if %defined bootstrap_arches  %if %defined bootstrap_arches
123  # For each bootstrap arch, add an additional binary Source.  # For each bootstrap arch, add an additional binary Source.
# Line 423  test -f '%{local_rust_root}/bin/rustc' Line 441  test -f '%{local_rust_root}/bin/rustc'
441    
442  %patch1 -p1 -R  %patch1 -p1 -R
443  %patch2 -p1  %patch2 -p1
444    %patch3 -p1
445    
446  %if "%{python}" == "python3"  %if "%{python}" == "python3"
447  sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure  sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
# Line 494  export LIBSSH2_SYS_USE_PKG_CONFIG=1 Line 513  export LIBSSH2_SYS_USE_PKG_CONFIG=1
513    
514  %configure --disable-option-checking \  %configure --disable-option-checking \
515    --libdir=%{common_libdir} \    --libdir=%{common_libdir} \
516    --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \    --build=%{rust_triple} --host=%{rust_triple} --target=%{target_triple} \
517    --local-rust-root=%{local_rust_root} \    --local-rust-root=%{local_rust_root} \
518    %{!?with_bundled_llvm: --llvm-root=%{llvm_root} \    %{!?with_bundled_llvm: --llvm-root=%{llvm_root} \
519      %{!?llvm_has_filecheck: --disable-codegen-tests} \      %{!?llvm_has_filecheck: --disable-codegen-tests} \
# Line 608  rm -f %{buildroot}%{rustlibdir}/etc/lldb Line 627  rm -f %{buildroot}%{rustlibdir}/etc/lldb
627  %dir %{rustlibdir}/%{rust_triple}/lib  %dir %{rustlibdir}/%{rust_triple}/lib
628  %{rustlibdir}/%{rust_triple}/lib/*.so  %{rustlibdir}/%{rust_triple}/lib/*.so
629  %{rustlibdir}/%{rust_triple}/codegen-backends/  %{rustlibdir}/%{rust_triple}/codegen-backends/
630    %if %defined bootstrap_build_arch
631    %dir %{rustlibdir}/%{target_triple}
632    %dir %{rustlibdir}/%{target_triple}/lib
633    %{rustlibdir}/%{target_triple}/lib/*.so
634    %endif
635  %exclude %{_bindir}/*miri  %exclude %{_bindir}/*miri
636    
637    
# Line 616  rm -f %{buildroot}%{rustlibdir}/etc/lldb Line 640  rm -f %{buildroot}%{rustlibdir}/etc/lldb
640  %dir %{rustlibdir}/%{rust_triple}  %dir %{rustlibdir}/%{rust_triple}
641  %dir %{rustlibdir}/%{rust_triple}/lib  %dir %{rustlibdir}/%{rust_triple}/lib
642  %{rustlibdir}/%{rust_triple}/lib/*.rlib  %{rustlibdir}/%{rust_triple}/lib/*.rlib
643    %if %defined bootstrap_build_arch
644    %dir %{rustlibdir}/%{target_triple}
645    %dir %{rustlibdir}/%{target_triple}/lib
646    %{rustlibdir}/%{target_triple}/lib/*.rlib
647    %endif
648    
649    
650  %files debugger-common  %files debugger-common
# Line 696  rm -f %{buildroot}%{rustlibdir}/etc/lldb Line 725  rm -f %{buildroot}%{rustlibdir}/etc/lldb
725    
726  %files analysis  %files analysis
727  %{rustlibdir}/%{rust_triple}/analysis/  %{rustlibdir}/%{rust_triple}/analysis/
728    %if %defined bootstrap_build_arch
729    %{rustlibdir}/%{target_triple}/analysis/
730    %endif

Legend:
Removed from v.1396720  
changed lines
  Added in v.1396907

  ViewVC Help
Powered by ViewVC 1.1.30