pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
update rustc to 1.10.0
Module Name: pkgsrc-wip
Committed By: Jonathan A. Kollasch <jakllsch%kollasch.net@localhost>
Pushed By: jakllsch
Date: Sat Jul 16 11:22:59 2016 -0500
Changeset: 39fc2e5a90804babf8b094d3fd2317c91e423f62
Modified Files:
rustc/Makefile
rustc/TODO
rustc/distinfo
Added Files:
rustc/PLIST
rustc/PLIST.gdb
rustc/PLIST.lldb
rustc/patches/patch-configure
rustc/patches/patch-mk_main.mk
rustc/patches/patch-mk_rustllvm.mk
rustc/patches/patch-mk_target.mk
rustc/patches/patch-src_liblibc_src_unix_solaris_mod.rs
rustc/patches/patch-src_librustc__back_target_x86__64__unknown__netbsd.rs
rustc/patches/patch-src_rust-installer_gen-install-script.sh
rustc/patches/patch-src_rust-installer_gen-installer.sh
rustc/patches/patch-src_rust-installer_install-template.sh
rustc/patches/patch-src_rust-installer_test.sh
Log Message:
update rustc to 1.10.0
Successfully packages on NetBSD/amd64 7.0 with some slight adjustments to
pkgsrc/mk.
/proc/curproc/exec from procfs must function to build and run on NetBSD.
Binary bootstrap kit for NetBSD is built for 7.0, might not work on 6.x.
Some patches and chunks of the Makefile from pkgsrc-joyent/rust work by jperkin.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=39fc2e5a90804babf8b094d3fd2317c91e423f62
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rustc/Makefile | 161 ++++++++++++++++++++-
rustc/PLIST | 99 +++++++++++++
rustc/PLIST.gdb | 4 +
rustc/PLIST.lldb | 3 +
rustc/TODO | 34 +----
rustc/distinfo | 38 ++++-
rustc/patches/patch-configure | 29 ++++
rustc/patches/patch-mk_main.mk | 24 +++
rustc/patches/patch-mk_rustllvm.mk | 23 +++
rustc/patches/patch-mk_target.mk | 15 ++
.../patch-src_liblibc_src_unix_solaris_mod.rs | 14 ++
...brustc__back_target_x86__64__unknown__netbsd.rs | 15 ++
.../patch-src_rust-installer_gen-install-script.sh | 21 +++
.../patch-src_rust-installer_gen-installer.sh | 40 +++++
.../patch-src_rust-installer_install-template.sh | 17 +++
rustc/patches/patch-src_rust-installer_test.sh | 15 ++
16 files changed, 511 insertions(+), 41 deletions(-)
diffs:
diff --git a/rustc/Makefile b/rustc/Makefile
old mode 100644
new mode 100755
index 674e05b..47c5c29
--- a/rustc/Makefile
+++ b/rustc/Makefile
@@ -1,25 +1,30 @@
# $NetBSD$
-DISTNAME= rustc-1.9.0-src
-PKGNAME= ${DISTNAME:S/-src//}
+RUST_VERSION= 1.10.0
+DISTNAME= rustc-${RUST_VERSION}-src
+PKGNAME= rustc-${RUST_VERSION}
CATEGORIES= lang
-MASTER_SITES= http://static.rust-lang.org/dist/
+MASTER_SITES= https://static.rust-lang.org/dist/
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE= http://www.rust-lang.org/
+HOMEPAGE= https://www.rust-lang.org/
COMMENT= Safe, concurrent, practical language
LICENSE= mit OR apache-2.0
-BUILD_DEPENDS+= curl-[0-9]*:../../www/curl
+#BUILD_DEPENDS+= curl-[0-9]*:../../www/curl
PYTHON_VERSIONS_ACCEPTED= 27 # as of 1.9.0
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} \
--mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.libLLVM}
+CONFIGURE_ARGS+= --disable-jemalloc # XXX NetBSD only?
+CONFIGURE_ARGS+= --disable-codegen-tests # otherwise needs LLVM's FileCheck executable, which libLLVM doesn't install
+
USE_LANGUAGES= c c++
GCC_REQD= 4.7 4.8
-USE_TOOLS+= gmake perl
+USE_TOOLS+= bash gmake gsed perl
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}
@@ -27,5 +32,149 @@ WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}
# XXX problem with libtool wrapper
# XXX needs python during build
+RUSTFLAGS_rustc=-L native=${WRKSRC}/${RUST_ARCH}/rt -C link-args="${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libLLVM}/lib/libLLVM -lrustllvm -lLLVM-3.8"
+RUSTFLAGS_rustc_llvm=-L native=${WRKSRC}/${RUST_ARCH}/rt -C link-args="${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libLLVM}/lib/libLLVM -lrustllvm -lLLVM-3.8"
+RUSTFLAGS_rustc_metadata=-L native=${WRKSRC}/${RUST_ARCH}/rt -C link-args="${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libLLVM}/lib/libLLVM -lrustllvm -lLLVM-3.8"
+RUSTFLAGS_rustc_trans=-L native=${WRKSRC}/${RUST_ARCH}/rt -C link-args="${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libLLVM}/lib/libLLVM -lrustllvm -lLLVM-3.8"
+
+MAKE_ENV+= RUSTFLAGS0_rustc=${RUSTFLAGS_rustc:Q}
+MAKE_ENV+= RUSTFLAGS1_rustc=${RUSTFLAGS_rustc:Q}
+MAKE_ENV+= RUSTFLAGS2_rustc=${RUSTFLAGS_rustc:Q}
+MAKE_ENV+= RUSTFLAGS0_rustc_llvm=${RUSTFLAGS_rustc_llvm:Q}
+MAKE_ENV+= RUSTFLAGS1_rustc_llvm=${RUSTFLAGS_rustc_llvm:Q}
+MAKE_ENV+= RUSTFLAGS2_rustc_llvm=${RUSTFLAGS_rustc_llvm:Q}
+MAKE_ENV+= RUSTFLAGS0_rustc_metadata=${RUSTFLAGS_rustc_metadata:Q}
+MAKE_ENV+= RUSTFLAGS1_rustc_metadata=${RUSTFLAGS_rustc_metadata:Q}
+MAKE_ENV+= RUSTFLAGS2_rustc_metadata=${RUSTFLAGS_rustc_metadata:Q}
+MAKE_ENV+= RUSTFLAGS0_rustc_trans=${RUSTFLAGS_rustc_trans:Q}
+MAKE_ENV+= RUSTFLAGS1_rustc_trans=${RUSTFLAGS_rustc_trans:Q}
+MAKE_ENV+= RUSTFLAGS2_rustc_trans=${RUSTFLAGS_rustc_trans:Q}
+
+REPLACE_BASH+= src/rust-installer/gen-install-script.sh
+REPLACE_BASH+= src/rust-installer/gen-installer.sh
+
+#
+# Lots of per-platform specific documentation, e.g. for each system call,
+# making it difficult to PLIST. If it ends up being important we'll just have
+# to go with lots of PLIST.${OPSYS}
+#
+CONFIGURE_ARGS+= --disable-docs
+
+
+TEST_TARGET= check
+
+#
+# Rust requires a binary stage0 kit to build itself, currently supported
+# only on a limited number of platforms. Details of the arch name and
+# sha1 for supported platforms are kept in src/snapshots.txt
+#
+.include "../../mk/bsd.prefs.mk"
+NOT_FOR_PLATFORM= *-*-alpha *-*-vax # not targeted by LLVM
+NOT_FOR_PLATFORM+= *-*-sparc* # not targeted by Rust
+NOT_FOR_PLATFORM+= Interix-*-* # not supported via pkgsrc, needs MinGW
+
+RUST_STAGE0_VERSION:= 1.9.0
+
+# Tier 1:
+.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) || make(distinfo)
+RUST_ARCH= i686-apple-darwin
+RUST_STAGE0:= rustc-${RUST_STAGE0_VERSION}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+.endif
+
+.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo)
+RUST_ARCH:= x86_64-apple-darwin
+RUST_STAGE0:= rustc-${RUST_STAGE0_VERSION}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+.endif
+
+.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo)
+RUST_ARCH:= i686-unknown-linux-gnu
+RUST_STAGE0:= rustc-${RUST_STAGE0_VERSION}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+.endif
+
+.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo)
+RUST_ARCH:= x86_64-unknown-linux-gnu
+RUST_STAGE0:= rustc-${RUST_STAGE0_VERSION}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+.endif
+
+
+# Tier 2 (XXX currently incomplete):
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo)
+RUST_ARCH:= x86_64-unknown-netbsd
+RUST_STAGE0:= rustc-${RUST_STAGE0_VERSION}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+.endif
+
+.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo)
+RUST_ARCH:= x86_64-unknown-freebsd
+RUST_STAGE0:= rustc-${RUST_STAGE0_VERSION}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+.endif
+
+# Tier 3
+#.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo)
+#RUST_ARCH= x86_64-sun-solaris
+#RUST_STAGE0:= rustc-${RUST_STAGE0_VERSION}-${RUST_ARCH}.tar.gz
+#DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+#.endif
+
+.if empty(RUST_STAGE0)
+PKG_FAIL_REASON:= "Not currently aware of Stage 0 bootstrap kit for ${MACHINE_PLATFORM}"
+.endif
+
+PLIST_SRC= PLIST
+.if ${OPSYS} == "Darwin"
+PLIST_SRC+= PLIST.lldb
+.else
+PLIST_SRC+= PLIST.gdb
+.endif
+
+OPSYSVARS+= SOEXT
+SOEXT.Darwin= dylib
+SOEXT.*= so
+
+PLIST_VARS+= jemalloc
+
+CONFIGURE_ARGS+= --build=${RUST_ARCH}
+
+EXTRACT_ONLY= ${DEFAULT_DISTFILES}
+
+RUST_VERHASH= 2f39a9bd
+PLIST_SUBST+= RUST_ARCH=${RUST_ARCH:Q}
+PLIST_SUBST+= RUST_VERHASH=${RUST_VERHASH:Q}
+PLIST_SUBST+= SOEXT=${SOEXT:Q}
+PRINT_PLIST_AWK+= { gsub(/${RUST_ARCH}/, "$${RUST_ARCH}") }
+PRINT_PLIST_AWK+= { gsub(/${RUST_VERHASH}/, "$${RUST_VERHASH}") }
+PRINT_PLIST_AWK+= { gsub(/\.${SOEXT}/, ".$${SOEXT}") }
+
+post-extract:
+ ${MKDIR} ${WRKSRC}/dl
+ ${CP} ${DISTDIR}/${RUST_STAGE0} ${WRKSRC}/dl
+
+.if ${OPSYS} == "SunOS"
+BUILD_DEPENDS+= grep>=0:../../textproc/grep
+BUILD_DEPENDS+= coreutils>=0:../../sysutils/coreutils
+TOOLS_PATH.grep= ${PREFIX}/bin/ggrep
+#TOOLS_CREATE+= md5sum
+#TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum
+
+SUBST_CLASSES+= ranlib
+SUBST_STAGE.ranlib= pre-configure
+SUBST_FILES.ranlib= mk/rt.mk
+SUBST_SED.ranlib= -e 's,RANLIB=.* \\,RANLIB="true" \\,g'
+.endif
+
+#snapshot:
+# ${RUN} cd ${WRKSRC:Q} && ${BUILD_MAKE_CMD} snap-stage3
+
+post-install:
+ ${RM} -f ${DESTDIR}${PREFIX}/lib/rustlib/install.log
+
+.include "../../lang/libLLVM/buildlink3.mk"
+.include "../../lang/llvm/buildlink3.mk"
+.include "../../lang/libunwind/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/rustc/PLIST b/rustc/PLIST
new file mode 100644
index 0000000..4b74a01
--- /dev/null
+++ b/rustc/PLIST
@@ -0,0 +1,99 @@
+@comment $NetBSD$
+bin/rustc
+bin/rustdoc
+lib/libarena-${RUST_VERHASH}.${SOEXT}
+lib/libflate-${RUST_VERHASH}.${SOEXT}
+lib/libfmt_macros-${RUST_VERHASH}.${SOEXT}
+lib/libgetopts-${RUST_VERHASH}.${SOEXT}
+lib/libgraphviz-${RUST_VERHASH}.${SOEXT}
+lib/liblog-${RUST_VERHASH}.${SOEXT}
+lib/librbml-${RUST_VERHASH}.${SOEXT}
+lib/librustc-${RUST_VERHASH}.${SOEXT}
+lib/librustc_back-${RUST_VERHASH}.${SOEXT}
+lib/librustc_borrowck-${RUST_VERHASH}.${SOEXT}
+lib/librustc_const_eval-${RUST_VERHASH}.${SOEXT}
+lib/librustc_const_math-${RUST_VERHASH}.${SOEXT}
+lib/librustc_data_structures-${RUST_VERHASH}.${SOEXT}
+lib/librustc_driver-${RUST_VERHASH}.${SOEXT}
+lib/librustc_incremental-${RUST_VERHASH}.${SOEXT}
+lib/librustc_lint-${RUST_VERHASH}.${SOEXT}
+lib/librustc_llvm-${RUST_VERHASH}.${SOEXT}
+lib/librustc_metadata-${RUST_VERHASH}.${SOEXT}
+lib/librustc_mir-${RUST_VERHASH}.${SOEXT}
+lib/librustc_passes-${RUST_VERHASH}.${SOEXT}
+lib/librustc_platform_intrinsics-${RUST_VERHASH}.${SOEXT}
+lib/librustc_plugin-${RUST_VERHASH}.${SOEXT}
+lib/librustc_privacy-${RUST_VERHASH}.${SOEXT}
+lib/librustc_resolve-${RUST_VERHASH}.${SOEXT}
+lib/librustc_save_analysis-${RUST_VERHASH}.${SOEXT}
+lib/librustc_trans-${RUST_VERHASH}.${SOEXT}
+lib/librustc_typeck-${RUST_VERHASH}.${SOEXT}
+lib/librustdoc-${RUST_VERHASH}.${SOEXT}
+lib/libserialize-${RUST_VERHASH}.${SOEXT}
+lib/libstd-${RUST_VERHASH}.${SOEXT}
+lib/libsyntax-${RUST_VERHASH}.${SOEXT}
+lib/libsyntax_ext-${RUST_VERHASH}.${SOEXT}
+lib/libterm-${RUST_VERHASH}.${SOEXT}
+lib/libtest-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/components
+lib/rustlib/etc/debugger_pretty_printers_common.py
+lib/rustlib/manifest-rust-std-${RUST_ARCH}
+lib/rustlib/manifest-rustc
+lib/rustlib/rust-installer-version
+lib/rustlib/uninstall.sh
+lib/rustlib/${RUST_ARCH}/lib/liballoc-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/liballoc_system-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libarena-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libcollections-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libcompiler-rt.a
+lib/rustlib/${RUST_ARCH}/lib/libcore-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libflate-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libfmt_macros-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libgetopts-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libgetopts-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libgraphviz-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/liblibc-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/liblog-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libpanic_abort-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libpanic_unwind-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/librand-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/librbml-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_back-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_bitflags-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/librustc_borrowck-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_const_eval-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_const_math-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_data_structures-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_driver-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_incremental-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_lint-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_llvm-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_metadata-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_mir-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_passes-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_platform_intrinsics-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_plugin-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_privacy-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_resolve-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_save_analysis-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_trans-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_typeck-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/librustc_unicode-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/librustdoc-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libserialize-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libstd-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libstd-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libsyntax-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libsyntax_ext-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libterm-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libterm-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libtest-${RUST_VERHASH}.rlib
+lib/rustlib/${RUST_ARCH}/lib/libtest-${RUST_VERHASH}.${SOEXT}
+lib/rustlib/${RUST_ARCH}/lib/libunwind-${RUST_VERHASH}.rlib
+man/man1/rustc.1
+man/man1/rustdoc.1
+share/doc/rust/COPYRIGHT
+share/doc/rust/LICENSE-APACHE
+share/doc/rust/LICENSE-MIT
+share/doc/rust/README.md
diff --git a/rustc/PLIST.gdb b/rustc/PLIST.gdb
new file mode 100644
index 0000000..967f07c
--- /dev/null
+++ b/rustc/PLIST.gdb
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+bin/rust-gdb
+lib/rustlib/etc/gdb_load_rust_pretty_printers.py
+lib/rustlib/etc/gdb_rust_pretty_printing.py
diff --git a/rustc/PLIST.lldb b/rustc/PLIST.lldb
new file mode 100644
index 0000000..e6cb226
--- /dev/null
+++ b/rustc/PLIST.lldb
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+bin/rust-lldb
+lib/rustlib/etc/lldb_rust_formatters.py
diff --git a/rustc/TODO b/rustc/TODO
index c94ddae..7aa9940 100644
--- a/rustc/TODO
+++ b/rustc/TODO
@@ -1,31 +1,3 @@
-=> Bootstrap dependency digest>=20010302: found digest-20160304
-===> Building for rustc-1.9.0
-cfg: version 1.9.0-dev
-cfg: build triple x86_64-unknown-netbsd
-cfg: host triples x86_64-unknown-netbsd
-cfg: target triples x86_64-unknown-netbsd
-cfg: host for x86_64-unknown-netbsd is x86_64
-cfg: os for x86_64-unknown-netbsd is unknown-netbsd
-cfg: no good valgrind for x86_64-unknown-netbsd
-cfg: disabling valgrind run-pass tests
-fetch: x86_64-unknown-netbsd/stage0/bin/rustc
-compile: x86_64-unknown-netbsd/rustllvm/ExecutionEngineWrapper.o
-In file included from /scratch/wip/rust/work/rustc-1.9.0/src/llvm/include/llvm/ADT/ArrayRef.h:13:0,
- from /scratch/wip/rust/work/rustc-1.9.0/src/llvm/include/llvm/IR/IRBuilder.h:18,
- from /scratch/wip/rust/work/rustc-1.9.0/src/rustllvm/rustllvm.h:11,
- from /scratch/wip/rust/work/rustc-1.9.0/src/rustllvm/ExecutionEngineWrapper.cpp:11:
-/scratch/wip/rust/work/rustc-1.9.0/src/llvm/include/llvm/ADT/Hashing.h:48:36: fatal error: llvm/Support/DataTypes.h: No such file or directory
-compilation terminated.
-gmake: *** [/scratch/wip/rust/work/rustc-1.9.0/mk/rustllvm.mk:60: x86_64-unknown-netbsd/rustllvm/ExecutionEngineWrapper.o] Error 1
-gmake: *** Waiting for unfinished jobs....
-Traceback (most recent call last):
- File "/scratch/wip/rust/work/rustc-1.9.0/src/etc/get-snapshot.py", line 78, in <module>
- main(sys.argv)
- File "/scratch/wip/rust/work/rustc-1.9.0/src/etc/get-snapshot.py", line 60, in main
- snap = determine_curr_snapshot(triple)
- File "/scratch/wip/rust/work/rustc-1.9.0/src/etc/snapshot.py", line 302, in determine_curr_snapshot
- (platform, rev))
-Exception: no snapshot file found for platform netbsd-x86_64, rev 7b95b5c
-gmake: *** [/scratch/wip/rust/work/rustc-1.9.0/mk/stage0.mk:18: x86_64-unknown-netbsd/stage0/bin/rustc] Error 1
-*** Error code 2
-
+# rustc to-do
+ * use --enable-rustbuild
+ * only use one of lang/llvm or lang/libLLVM
diff --git a/rustc/distinfo b/rustc/distinfo
index a161b18..c5c02a0 100644
--- a/rustc/distinfo
+++ b/rustc/distinfo
@@ -1,7 +1,37 @@
$NetBSD$
-SHA1 (rustc-1.9.0-src.tar.gz) = a698496c5244bbb5b2332b70f239f5af93752cce
-RMD160 (rustc-1.9.0-src.tar.gz) = 8ff733691ae3df739d780a7236186f4ca3e0d442
-SHA512 (rustc-1.9.0-src.tar.gz) = bb23d529daaea17cd6358057ad7c219b1bf2206331a9813520f9e3a519698f6d274a6c25f579dab9e8e48fe0c6e51e7eb473885cb1fb65128e715e06778b62f7
-Size (rustc-1.9.0-src.tar.gz) = 25859714 bytes
+SHA1 (rustc-1.9.0-i686-apple-darwin.tar.gz) = 8182b75431795344ca62d6916b46f8234d2d4386
+RMD160 (rustc-1.9.0-i686-apple-darwin.tar.gz) = a8d948dea066f79c0c5c2bd9713d1f0a91d13758
+SHA512 (rustc-1.9.0-i686-apple-darwin.tar.gz) = c6b8d709df2e76d94b504e9bc3defef7eec06743373ffd3a0131f32074e6c626b9b4e31bd924fac54cba959ace050abef9b49b32fe43e3bcf577381e90cd54a9
+Size (rustc-1.9.0-i686-apple-darwin.tar.gz) = 40978445 bytes
+SHA1 (rustc-1.9.0-i686-unknown-linux-gnu.tar.gz) = 4ceef4184909f7557b4670c3c18bec9773599da2
+RMD160 (rustc-1.9.0-i686-unknown-linux-gnu.tar.gz) = 99d732ea2c2f60616d3ac206972b06dc96274aa2
+SHA512 (rustc-1.9.0-i686-unknown-linux-gnu.tar.gz) = 6d799a464f93aecb24ded4e9af634d7852f9930968814700e90353888657f9f556dda156455cb8cabca0e5f42c8d0f7864d43294687c8ce57518e21bebad99f7
+Size (rustc-1.9.0-i686-unknown-linux-gnu.tar.gz) = 45887218 bytes
+SHA1 (rustc-1.9.0-x86_64-apple-darwin.tar.gz) = d5e4dbb11714e522759cd129d4e34398ab84d0d4
+RMD160 (rustc-1.9.0-x86_64-apple-darwin.tar.gz) = 876af28a2edca52a41feca099434a428ac25ea2c
+SHA512 (rustc-1.9.0-x86_64-apple-darwin.tar.gz) = 18cbb4e2c465832aa496d6f3cd8de745e6d7eb3e73b8537993911418bb240c41dc7b54b4e0dc283b249429b0c591e4220233092eeef73efb1f6d9e161f193abd
+Size (rustc-1.9.0-x86_64-apple-darwin.tar.gz) = 41027645 bytes
+SHA1 (rustc-1.9.0-x86_64-unknown-freebsd.tar.gz) = 7b5186b1b731705450f5fb90e3bf2fa713c79af8
+RMD160 (rustc-1.9.0-x86_64-unknown-freebsd.tar.gz) = 0ac73b0107ab6b92b13f967fb7ddbdb96f001946
+SHA512 (rustc-1.9.0-x86_64-unknown-freebsd.tar.gz) = 4656c8a9adb6bfbfff2d7a9fb93d6aaaf50c9089cd347ebc201014a3d9428ead6bfa4bbfc512cd7ec104eb6f27ce57ffeeacfc03663e043321cacacef6e29137
+Size (rustc-1.9.0-x86_64-unknown-freebsd.tar.gz) = 47969295 bytes
+SHA1 (rustc-1.9.0-x86_64-unknown-linux-gnu.tar.gz) = 630d1df4e00f8683df512225e39cdfd057728c80
+RMD160 (rustc-1.9.0-x86_64-unknown-linux-gnu.tar.gz) = e8c47e316f020a80275e9d053a1790a7011ec663
+SHA512 (rustc-1.9.0-x86_64-unknown-linux-gnu.tar.gz) = 37a4c62f09e2b49cf7a898eeefd3843ef17f3dc433a4f55cb5c3d5c315effb9e0750c275bb0fc91e5ada6c42924af5c7f890874c5917d41a4723c60b209d1c0d
+Size (rustc-1.9.0-x86_64-unknown-linux-gnu.tar.gz) = 45246956 bytes
+SHA1 (rustc-1.9.0-x86_64-unknown-netbsd.tar.gz) = f2547822eabbea38f607b2eeaf24bca5d6eefa2f
+RMD160 (rustc-1.9.0-x86_64-unknown-netbsd.tar.gz) = 6bb37873b783d097caebe74c70aecc9690707fde
+SHA512 (rustc-1.9.0-x86_64-unknown-netbsd.tar.gz) = f8ec3e83b7042ec5b5571fc6bd7d1486c32a081f397258f872d37b760fc8cd0a7911d60685a43d2e3846bae919e95d6d04e1465f48fafc7d8384870072fec2bd
+Size (rustc-1.9.0-x86_64-unknown-netbsd.tar.gz) = 46162482 bytes
+SHA1 (patch-configure) = 229a8e8de52fc4f8a50380cc94066871a4ee83ab
+SHA1 (patch-mk_main.mk) = d95557691fb5711a142eee7663cda291cb3c9e80
+SHA1 (patch-mk_rustllvm.mk) = 054e370746e00180e063ddff94f5bef310d013fe
+SHA1 (patch-mk_target.mk) = ed84b0cdd8a665437b071d01fb3d4d66254af380
+SHA1 (patch-src_liblibc_src_unix_solaris_mod.rs) = 4fcc33b0750e41c0a53a4353d9b5c4c1107f7afc
+SHA1 (patch-src_librustc__back_target_x86__64__unknown__netbsd.rs) = 3b9fa892d4e2ac6bb43890a8964ad7373e055766
SHA1 (patch-src_llvm_utils_buildit_build__llvm) = ec9bd4a28541a8cfd0a33cae2ae5d097116ac4de
+SHA1 (patch-src_rust-installer_gen-install-script.sh) = 4b432b4c7d235f3e7f9b9ad06a2eef8e4ae82c14
+SHA1 (patch-src_rust-installer_gen-installer.sh) = b8177de36ed1d506a4a1ac8eb95148de9ed555b5
+SHA1 (patch-src_rust-installer_install-template.sh) = b43d5b99c7472edfea7bab9ba2fd943aa49ac2e9
+SHA1 (patch-src_rust-installer_test.sh) = f9e201b2c6113a588d8216247e85b44b1372e50a
diff --git a/rustc/patches/patch-configure b/rustc/patches/patch-configure
new file mode 100644
index 0000000..5621b67
--- /dev/null
+++ b/rustc/patches/patch-configure
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Use pkgsrc libLLVM.
+
+--- configure.orig 2016-07-04 02:50:20.000000000 +0000
++++ configure
+@@ -968,11 +968,11 @@ then
+ putvar CFG_DISABLE_JEMALLOC
+ fi
+
+-if [ -n "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
++if [ -n "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/libexec/libLLVM/llvm-config" ]
+ then
+ step_msg "using custom LLVM at $CFG_LLVM_ROOT"
+
+- LLVM_CONFIG="$CFG_LLVM_ROOT/bin/llvm-config"
++ LLVM_CONFIG="$CFG_LLVM_ROOT/libexec/libLLVM/llvm-config"
+ LLVM_VERSION=$($LLVM_CONFIG --version)
+
+ case $LLVM_VERSION in
+@@ -1500,7 +1500,7 @@ do
+ do_reconfigure=0
+ # Check that LLVm FileCheck is available. Needed for the tests
+ if [ -z "$CFG_DISABLE_CODEGEN_TESTS" ]; then
+- need_cmd $LLVM_INST_DIR/bin/FileCheck
++ need_cmd $LLVM_INST_DIR/libexec/libLLVM/FileCheck
+ fi
+ fi
+
diff --git a/rustc/patches/patch-mk_main.mk b/rustc/patches/patch-mk_main.mk
new file mode 100644
index 0000000..c9c0c9c
--- /dev/null
+++ b/rustc/patches/patch-mk_main.mk
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Use pkgsrc libLLVM.
+
+--- mk/main.mk.orig 2016-06-30 23:21:42.000000000 +0000
++++ mk/main.mk
+@@ -295,7 +295,7 @@ LLVM_REQUIRED_COMPONENTS=ipo bitreader b
+
+ ifneq ($(CFG_LLVM_ROOT),)
+ # Ensure we only try to link targets that the installed LLVM actually has:
+-LLVM_COMPONENTS := $(filter $(shell $(CFG_LLVM_ROOT)/bin/llvm-config$(X_$(CFG_BUILD)) --components),\
++LLVM_COMPONENTS := $(filter $(shell $(CFG_LLVM_ROOT)/libexec/libLLVM/llvm-config$(X_$(CFG_BUILD)) --components),\
+ $(LLVM_OPTIONAL_COMPONENTS)) $(LLVM_REQUIRED_COMPONENTS)
+ else
+ LLVM_COMPONENTS := $(LLVM_OPTIONAL_COMPONENTS) $(LLVM_REQUIRED_COMPONENTS)
+@@ -315,7 +315,7 @@ CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_ROOT
+ endif
+
+ # Any rules that depend on LLVM should depend on LLVM_CONFIG
+-LLVM_CONFIG_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-config$$(X_$(1))
++LLVM_CONFIG_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/libexec/libLLVM/llvm-config$$(X_$(1))
+ LLVM_MC_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-mc$$(X_$(1))
+ LLVM_AR_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-ar$$(X_$(1))
+ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
diff --git a/rustc/patches/patch-mk_rustllvm.mk b/rustc/patches/patch-mk_rustllvm.mk
new file mode 100644
index 0000000..203a3ba
--- /dev/null
+++ b/rustc/patches/patch-mk_rustllvm.mk
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Avoid double slashes, confuses cwrappers.
+
+--- mk/rustllvm.mk.orig 2016-06-30 23:21:42.000000000 +0000
++++ mk/rustllvm.mk
+@@ -50,10 +50,15 @@ RUSTLLVM_COMPONENTS_$(1) = $$(shell echo
+ # start with a '/'. The shell we're running in will auto-translate the argument
+ # `/foo` to `C:/msys64/foo` but we really want it to be passed through as `/foo`
+ # so the argument passed to our shell must be `//foo`.
++ifeq ($$(findstring msvc,$(1)),msvc)
++SUBST_LLVM_CXXFLAGS_$(1) := $$(subst /,//,$$(LLVM_CXXFLAGS_$(1)))
++else
++SUBST_LLVM_CXXFLAGS_$(1) := $$(LLVM_CXXFLAGS_$(1))
++endif
+ $(1)/rustllvm/%.o: $(S)src/rustllvm/%.cpp $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1))
+ @$$(call E, compile: $$@)
+ $$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@,) \
+- $$(subst /,//,$$(LLVM_CXXFLAGS_$(1))) \
++ $$(SUBST_LLVM_CXXFLAGS_$(1)) \
+ $$(RUSTLLVM_COMPONENTS_$(1)) \
+ $$(EXTRA_RUSTLLVM_CXXFLAGS_$(1)) \
+ $$(RUSTLLVM_INCS_$(1)) \
diff --git a/rustc/patches/patch-mk_target.mk b/rustc/patches/patch-mk_target.mk
new file mode 100644
index 0000000..afa4211
--- /dev/null
+++ b/rustc/patches/patch-mk_target.mk
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Allow use of RUSTFLAGS$(STAGE)_$(CRATE) to be used here too, needed to
+sucessfully complete rustc.
+
+--- mk/target.mk.orig 2016-07-04 18:04:09.000000000 +0000
++++ mk/target.mk
+@@ -144,6 +144,7 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)
+ @$$(call E, rustc: $$@)
+ $$(STAGE$(1)_T_$(2)_H_$(3)) \
+ $$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
++ $$(RUSTFLAGS$(1)_$(4)) \
+ -o $$@ $$< --cfg $(4)
+
+ endef
diff --git a/rustc/patches/patch-src_liblibc_src_unix_solaris_mod.rs b/rustc/patches/patch-src_liblibc_src_unix_solaris_mod.rs
new file mode 100644
index 0000000..35d675b
--- /dev/null
+++ b/rustc/patches/patch-src_liblibc_src_unix_solaris_mod.rs
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Support SIGWINCH.
+
+--- src/liblibc/src/unix/solaris/mod.rs.orig 2016-03-03 01:03:58.000000000 +0000
++++ src/liblibc/src/unix/solaris/mod.rs
+@@ -372,6 +372,7 @@ pub const SIGSEGV: ::c_int = 11;
+ pub const SIGPIPE: ::c_int = 13;
+ pub const SIGALRM: ::c_int = 14;
+ pub const SIGTERM: ::c_int = 15;
++pub const SIGWINCH: ::c_int = 20;
+
+ pub const WNOHANG: ::c_int = 0x40;
+
diff --git a/rustc/patches/patch-src_librustc__back_target_x86__64__unknown__netbsd.rs b/rustc/patches/patch-src_librustc__back_target_x86__64__unknown__netbsd.rs
new file mode 100644
index 0000000..8172f38
--- /dev/null
+++ b/rustc/patches/patch-src_librustc__back_target_x86__64__unknown__netbsd.rs
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Apply upstream commit https://github.com/rust-lang/rust/commit/14b6c6d153edec5731230f919eaafcb5c32959d8
+addressing https://github.com/rust-lang/rust/issues/20777 to NetBSD too.
+
+--- src/librustc_back/target/x86_64_unknown_netbsd.rs.orig 2016-07-04 18:04:09.000000000 +0000
++++ src/librustc_back/target/x86_64_unknown_netbsd.rs
+@@ -12,6 +12,7 @@ use target::Target;
+
+ pub fn target() -> Target {
+ let mut base = super::netbsd_base::opts();
++ base.cpu = "x86-64".to_string();
+ base.max_atomic_width = 64;
+ base.pre_link_args.push("-m64".to_string());
+
diff --git a/rustc/patches/patch-src_rust-installer_gen-install-script.sh b/rustc/patches/patch-src_rust-installer_gen-install-script.sh
new file mode 100644
index 0000000..d6d645d
--- /dev/null
+++ b/rustc/patches/patch-src_rust-installer_gen-install-script.sh
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Do not use /bin/echo, on e.g. SunOS it does not support -n.
+
+--- src/rust-installer/gen-install-script.sh.orig 2016-05-31 21:13:01.000000000 +0000
++++ src/rust-installer/gen-install-script.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/pkg/bin/bash
+ # Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+ # file at the top-level directory of this distribution and at
+ # http://rust-lang.org/COPYRIGHT.
+@@ -11,7 +11,7 @@
+
+ set -u
+
+-if [ -x /bin/echo ]; then
++if [ -x /bin/donotuseecho ]; then
+ ECHO='/bin/echo'
+ else
+ ECHO='echo'
diff --git a/rustc/patches/patch-src_rust-installer_gen-installer.sh b/rustc/patches/patch-src_rust-installer_gen-installer.sh
new file mode 100644
index 0000000..c5e9002
--- /dev/null
+++ b/rustc/patches/patch-src_rust-installer_gen-installer.sh
@@ -0,0 +1,40 @@
+$NetBSD$
+
+Do not use /bin/echo, on e.g. SunOS it does not support -n.
+Avoid CDPATH issues.
+
+--- src/rust-installer/gen-installer.sh.orig 2016-05-31 21:13:01.000000000 +0000
++++ src/rust-installer/gen-installer.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/pkg/bin/bash
+ # Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+ # file at the top-level directory of this distribution and at
+ # http://rust-lang.org/COPYRIGHT.
+@@ -11,7 +11,7 @@
+
+ set -u
+
+-if [ -x /bin/echo ]; then
++if [ -x /bin/donotuseecho ]; then
+ ECHO='/bin/echo'
+ else
+ ECHO='echo'
+@@ -287,7 +287,7 @@ cp -r "$CFG_IMAGE_DIR/"* "$CFG_WORK_DIR/
+ need_ok "couldn't copy source image"
+
+ # Create the manifest
+-manifest=`(cd "$CFG_WORK_DIR/$CFG_PACKAGE_NAME/$CFG_COMPONENT_NAME" && find . -type f | sed 's/^\.\///') | sort`
++manifest=`(unset CDPATH && cd "$CFG_WORK_DIR/$CFG_PACKAGE_NAME/$CFG_COMPONENT_NAME" >/dev/null && find . -type f | sed 's/^\.\///') | sort`
+
+ # Remove files in bulk dirs
+ bulk_dirs=`echo "$CFG_BULK_DIRS" | tr "," " "`
+@@ -324,7 +324,7 @@ echo "$rust_installer_version" > "$versi
+
+ # Copy the overlay
+ if [ -n "$CFG_NON_INSTALLED_OVERLAY" ]; then
+- overlay_files=`(cd "$CFG_NON_INSTALLED_OVERLAY" && find . -type f)`
++ overlay_files=`(unset CDPATH && cd "$CFG_NON_INSTALLED_OVERLAY" >/dev/null && find . -type f)`
+ for f in $overlay_files; do
+ if [ -e "$CFG_WORK_DIR/$CFG_PACKAGE_NAME/$f" ]; then err "overlay $f exists"; fi
+
diff --git a/rustc/patches/patch-src_rust-installer_install-template.sh b/rustc/patches/patch-src_rust-installer_install-template.sh
new file mode 100644
index 0000000..294788b
--- /dev/null
+++ b/rustc/patches/patch-src_rust-installer_install-template.sh
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Support SunOS.
+
+--- src/rust-installer/install-template.sh.orig 2016-03-03 01:04:59.000000000 +0000
++++ src/rust-installer/install-template.sh
+@@ -324,6 +324,10 @@ get_host_triple() {
+ local _ostype
+ case $_uname_value in
+
++ SunOS)
++ _ostype=sun-solaris
++ ;;
++
+ Linux)
+ _ostype=unknown-linux-gnu
+ ;;
diff --git a/rustc/patches/patch-src_rust-installer_test.sh b/rustc/patches/patch-src_rust-installer_test.sh
new file mode 100644
index 0000000..4a6c567
--- /dev/null
+++ b/rustc/patches/patch-src_rust-installer_test.sh
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Do not use /bin/echo, on e.g. SunOS it does not support -n.
+
+--- src/rust-installer/test.sh.orig 2016-03-03 01:04:59.000000000 +0000
++++ src/rust-installer/test.sh
+@@ -2,7 +2,7 @@
+
+ set -e -u
+
+-if [ -x /bin/echo ]; then
++if [ -x /bin/donotuseecho ]; then
+ ECHO='/bin/echo'
+ else
+ ECHO='echo'
Home |
Main Index |
Thread Index |
Old Index