pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/rust
Module Name: pkgsrc
Committed By: tnn
Date: Sat Jan 5 23:29:40 UTC 2019
Modified Files:
pkgsrc/lang/rust: Makefile distinfo
Added Files:
pkgsrc/lang/rust/patches: patch-src_librustc__llvm_build.rs
patch-src_libunwind_build.rs
Log Message:
rust: add some kludges to better support NetBSD HEAD-llvm
1) bootstrap rustc adds -lgcc_s when linking
-> Dropped with a BUILDLINK_TRANSFORM
2) bootstrap rustc has shared linkage to libgcc_s.so.1
-> Until upstream changes this to static linkage, we look for
libgcc_s.so.1 in ${FILESDIR} where the user must place it manually.
3) newly built rustc adds -lstdc++ instead of -lc++ when linking llvm
-> fixed with patch-src_librustc__llvm_build.rs
4) newly built rustc adds -lgcc_s when linking
-> fixed with patch-src_libunwind_build.rs
To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 pkgsrc/lang/rust/Makefile
cvs rdiff -u -r1.50 -r1.51 pkgsrc/lang/rust/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/rust/patches/patch-src_librustc__llvm_build.rs \
pkgsrc/lang/rust/patches/patch-src_libunwind_build.rs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/rust/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.72 pkgsrc/lang/rust/Makefile:1.73
--- pkgsrc/lang/rust/Makefile:1.72 Thu Jan 3 03:12:30 2019
+++ pkgsrc/lang/rust/Makefile Sat Jan 5 23:29:40 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.72 2019/01/03 03:12:30 tnn Exp $
+# $NetBSD: Makefile,v 1.73 2019/01/05 23:29:40 tnn Exp $
DISTNAME= rustc-1.31.1-src
PKGREVISION= 1
@@ -308,10 +308,18 @@ post-extract:
MAKE_ENV+= OPENSSL_DIR=${SSLBASE}
.endif
+.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang) && !exists(/lib/libgcc_s.so)
+BUILDLINK_TRANSFORM+= rm:-lgcc_s
+MAKE_ENV+= PKGSRC_HAVE_LIBCPP=yes
+.endif
+
pre-build: pre-build-fix
- # Requires libssh2 defines only available in master.
+# Requires libssh2 defines only available in master.
${CP} -f ${WRKSRC}/src/vendor/libssh2-sys/libssh2/include/libssh2.h \
${BUILDLINK_DIR}/include/
+.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang) && !exists(/lib/libgcc_s.so)
+ cp ${FILESDIR}/libgcc_s.so.1 ${RUST_BOOTSTRAP_PATH}/lib/.
+.endif
do-build:
cd ${WRKSRC} \
Index: pkgsrc/lang/rust/distinfo
diff -u pkgsrc/lang/rust/distinfo:1.50 pkgsrc/lang/rust/distinfo:1.51
--- pkgsrc/lang/rust/distinfo:1.50 Fri Dec 21 23:12:34 2018
+++ pkgsrc/lang/rust/distinfo Sat Jan 5 23:29:40 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.50 2018/12/21 23:12:34 he Exp $
+$NetBSD: distinfo,v 1.51 2019/01/05 23:29:40 tnn Exp $
SHA1 (rust-1.30.0-x86_64-sun-solaris.tar.gz) = d1da4a02bdbb9a46587bc64d4b7987bb3f1aaeab
RMD160 (rust-1.30.0-x86_64-sun-solaris.tar.gz) = 0670575ad4eb63f86d34299104f451463e5fc070
@@ -103,9 +103,11 @@ SHA1 (patch-src_bootstrap_lib.rs) = d86e
SHA1 (patch-src_libbacktrace_configure) = b2c1e9b93a99408aad42ab9f1af27704cc81bdd8
SHA1 (patch-src_liblibc_src_unix_bsd_netbsdlike_netbsd_mod.rs) = e5b564bb247094cc8e4e6935a02262b3385cb7e6
SHA1 (patch-src_liblibc_src_unix_solaris_mod.rs) = aeb7c22995e33c700ce3ea4336368a1fd08120e1
+SHA1 (patch-src_librustc__llvm_build.rs) = a56bf5435e40bb012641ada6b20256901a1073fb
SHA1 (patch-src_libstd_build.rs) = 1edbf87339bd88e3178d4fa2fc408a6e802ed488
SHA1 (patch-src_libstd_sys_unix_thread.rs) = 46ef46365658e2f895bd3dde9c74f352890e9ccc
SHA1 (patch-src_libsyntax__pos_span__encoding.rs) = c891cffab8ae47b13b3b391ddd1a6c62ee2b38f3
+SHA1 (patch-src_libunwind_build.rs) = 74e2101f0cd78ca68b0a9d14355e20dcaea66100
SHA1 (patch-src_llvm_CMakeLists.txt) = ffdf4337fdc84d8314c97c4e492e6b84244a99d1
SHA1 (patch-src_llvm_cmake_modules_AddLLVM.cmake) = f0620ac62ecfb1d62d2dfa61b4c063d21c29b8f5
SHA1 (patch-src_llvm_include_llvm-c_DataTypes.h) = 432693204912e79059ee31e815ad1e24f3236374
Added files:
Index: pkgsrc/lang/rust/patches/patch-src_librustc__llvm_build.rs
diff -u /dev/null pkgsrc/lang/rust/patches/patch-src_librustc__llvm_build.rs:1.1
--- /dev/null Sat Jan 5 23:29:40 2019
+++ pkgsrc/lang/rust/patches/patch-src_librustc__llvm_build.rs Sat Jan 5 23:29:40 2019
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_librustc__llvm_build.rs,v 1.1 2019/01/05 23:29:40 tnn Exp $
+
+fix build on NetBSD HEAD-llvm. XXX there is probably a better way to do this.
+
+--- src/librustc_llvm/build.rs.orig 2018-12-18 23:11:17.000000000 +0000
++++ src/librustc_llvm/build.rs
+@@ -250,9 +250,17 @@ fn main() {
+ "c++"
+ } else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
+ // NetBSD uses a separate library when relocation is required
+- "stdc++_pic"
++ if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
++ "c++_pic"
++ } else {
++ "stdc++_pic"
++ }
+ } else {
+- "stdc++"
++ if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
++ "c++"
++ } else {
++ "stdc++"
++ }
+ };
+
+ // C++ runtime library
Index: pkgsrc/lang/rust/patches/patch-src_libunwind_build.rs
diff -u /dev/null pkgsrc/lang/rust/patches/patch-src_libunwind_build.rs:1.1
--- /dev/null Sat Jan 5 23:29:40 2019
+++ pkgsrc/lang/rust/patches/patch-src_libunwind_build.rs Sat Jan 5 23:29:40 2019
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_libunwind_build.rs,v 1.1 2019/01/05 23:29:40 tnn Exp $
+
+fix build on NetBSD HEAD-llvm. XXX there is probably a better way to do this.
+
+--- src/libunwind/build.rs.orig 2018-12-18 23:11:17.000000000 +0000
++++ src/libunwind/build.rs
+@@ -25,7 +25,9 @@ fn main() {
+ } else if target.contains("rumprun") {
+ println!("cargo:rustc-link-lib=unwind");
+ } else if target.contains("netbsd") {
+- println!("cargo:rustc-link-lib=gcc_s");
++ if !env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
++ println!("cargo:rustc-link-lib=gcc_s");
++ }
+ } else if target.contains("openbsd") {
+ println!("cargo:rustc-link-lib=c++abi");
+ } else if target.contains("solaris") {
Home |
Main Index |
Thread Index |
Old Index