aboutsummaryrefslogtreecommitdiffstats
path: root/lang/rust
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2018-05-15 21:43:34 +0800
committerdumbbell <dumbbell@FreeBSD.org>2018-05-15 21:43:34 +0800
commit9239d3a84e67bf1c33bf286d1296b785f4e2c803 (patch)
tree956d339b4d21779ce115f75d87b6fc923117bb82 /lang/rust
parent25ccab68cc6dc68275e02362e2ee8d75ef3df12c (diff)
downloadfreebsd-ports-gnome-9239d3a84e67bf1c33bf286d1296b785f4e2c803.tar.gz
freebsd-ports-gnome-9239d3a84e67bf1c33bf286d1296b785f4e2c803.tar.zst
freebsd-ports-gnome-9239d3a84e67bf1c33bf286d1296b785f4e2c803.zip
lang/rust: Update to 1.26.0
The announcement is available on Rust blog: https://blog.rust-lang.org/2018/05/10/Rust-1.26.html Rust 1.25.0, used as the bootstrap compiler, contains the patch from bdrewery@ to use the compat (non-ino64) symbols on FreeBSD 12-CURRENT. Therefore, we don't need `old_fstat.c` and the associated machinery in the `Makefile` anymore.
Diffstat (limited to 'lang/rust')
-rw-r--r--lang/rust/Makefile34
-rw-r--r--lang/rust/distinfo42
-rw-r--r--lang/rust/files/old_fstat.c103
-rw-r--r--lang/rust/files/patch-src_binaryen_CMakeLists.txt60
-rw-r--r--lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs12
5 files changed, 27 insertions, 224 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index a12fa4fac7f0..83df9263217a 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= rust
-PORTVERSION?= 1.25.0
+PORTVERSION?= 1.26.0
PORTREVISION?=
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/:src \
@@ -44,13 +44,13 @@ ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler
CONFLICTS_INSTALL?= rust-nightly
# See WRKSRC/src/stage0.txt for this date and version values.
-BOOTSTRAPS_DATE?= 2018-02-15
+BOOTSTRAPS_DATE?= 2018-03-29
-RUST_BOOTSTRAP_VERSION?= 1.24.0
+RUST_BOOTSTRAP_VERSION?= 1.25.0
RUSTC_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
-CARGO_BOOTSTRAP_VERSION?= 0.25.0
+CARGO_BOOTSTRAP_VERSION?= 0.26.0
CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//}
@@ -92,13 +92,6 @@ PLIST_FILES= lib/rustlib/components \
lib/rustlib/rust-installer-version
.include <bsd.port.pre.mk>
-# ABI patch needed to address ino64 before fixes upstreamed.
-# https://github.com/rust-lang/rust/issues/42681
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200031 && !defined(NIGHTLY_DATE)
-NEED_ABI_PATCH= 1
-.else
-NEED_ABI_PATCH= 0
-.endif
X_PY_ENV= HOME="${WRKDIR}" \
OPENSSL_DIR="${OPENSSLBASE}"
@@ -139,26 +132,10 @@ post-extract:
${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${RUSTC_BOOTSTRAP} \
${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
-.if ${NEED_ABI_PATCH} == 0
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP} \
${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
-.endif
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${CARGO_BOOTSTRAP} \
${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
-.if ${NEED_ABI_PATCH} == 1
- ${TAR} -x -C ${WRKSRC} -f ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP}
- ${CC} ${CFLAGS} -fPIC -c -o ${WRKSRC}/old_fstat.o ${FILESDIR}/old_fstat.c
- (set -ex; cd ${WRKSRC}; \
- libstd="$$(echo "${RUST_STD_DIR}/rust-std-${RUST_TARGET}/lib/rustlib/${RUST_TARGET}/lib/"libstd-*.rlib)"; \
- hash="$$(basename "$$libstd" .rlib | ${SED} 's/^libstd-//')"; \
- std_o="$$(${AR} t "$$libstd" | ${GREP} -E "^std-$$hash.*\.o$$" | ${HEAD} -n 1)"; \
- ${AR} x "$$libstd" "$$std_o"; \
- ${LD} -r -o std.xx.o "$$std_o" old_fstat.o; \
- ${MV} std.xx.o "$$std_o"; \
- ${AR} r "$$libstd" "$$std_o")
- ${TAR} -c --format=ustar -C ${WRKSRC} -f ${WRKSRC}/rust-std.tar.gz ${RUST_STD_DIR}
- ${MV} ${WRKSRC}/rust-std.tar.gz ${WRKSRC}/build/cache/${RUST_STD_BOOTSTRAP}
-.endif
post-patch:
@${REINPLACE_CMD} -e 's|gdb|${LOCALBASE}/bin/gdb|' \
@@ -329,7 +306,8 @@ post-install:
${STAGEDIR}${PREFIX}/bin/rustdoc \
${STAGEDIR}${PREFIX}/bin/rustfmt \
${STAGEDIR}${PREFIX}/lib/*.so \
- ${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so
+ ${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so \
+ ${STAGEDIR}${PREFIX}/lib/rustlib/*/codegen-backends/*.so
# We set `extended = true` in config.toml because we want to build
# Cargo at the same time. However, this installs the rust-src component
diff --git a/lang/rust/distinfo b/lang/rust/distinfo
index 896ad8c44191..8412ab9d1cc3 100644
--- a/lang/rust/distinfo
+++ b/lang/rust/distinfo
@@ -1,21 +1,21 @@
-SHA256 (rust/2018-02-15/cargo-0.25.0-aarch64-unknown-freebsd.tar.gz) = b722073829728fb6519b0653f42086d75a3dcfabdc0e760ed950bf2442d3c9b8
-SIZE (rust/2018-02-15/cargo-0.25.0-aarch64-unknown-freebsd.tar.gz) = 4080471
-SHA256 (rust/2018-02-15/cargo-0.25.0-i686-unknown-freebsd.tar.gz) = c0ebc42bc19933220d56238920dcade0750eb64462d55830403e0e7167f09316
-SIZE (rust/2018-02-15/cargo-0.25.0-i686-unknown-freebsd.tar.gz) = 5455389
-SHA256 (rust/2018-02-15/cargo-0.25.0-x86_64-unknown-freebsd.tar.gz) = 9b914574fbdbd4190718ce681041af3ac161aab2bcd5b3b6d52ccb954660c5d3
-SIZE (rust/2018-02-15/cargo-0.25.0-x86_64-unknown-freebsd.tar.gz) = 5604586
-SHA256 (rust/2018-02-15/rust-std-1.24.0-aarch64-unknown-freebsd.tar.gz) = 9e9b4d9ce972e972986b0ebb4f417041400e2be76dcddf645f6d6c8d1b3987bf
-SIZE (rust/2018-02-15/rust-std-1.24.0-aarch64-unknown-freebsd.tar.gz) = 78129215
-SHA256 (rust/2018-02-15/rust-std-1.24.0-i686-unknown-freebsd.tar.gz) = 41d21402bd5b29c292c4db4a06b07396271e10824006794138e6f9b581f9f319
-SIZE (rust/2018-02-15/rust-std-1.24.0-i686-unknown-freebsd.tar.gz) = 81013253
-SHA256 (rust/2018-02-15/rust-std-1.24.0-x86_64-unknown-freebsd.tar.gz) = 99d0ca487e292f76e425074ae77f4e12fe1f67d3f90e0b0a8c4b8ed4e87bc163
-SIZE (rust/2018-02-15/rust-std-1.24.0-x86_64-unknown-freebsd.tar.gz) = 80387975
-SHA256 (rust/2018-02-15/rustc-1.24.0-aarch64-unknown-freebsd.tar.gz) = 14efaeb960da1b4524ae9a25657415ca92f6e54d12bb55e95ad4e38b625ef9ab
-SIZE (rust/2018-02-15/rustc-1.24.0-aarch64-unknown-freebsd.tar.gz) = 60099868
-SHA256 (rust/2018-02-15/rustc-1.24.0-i686-unknown-freebsd.tar.gz) = f775a54ee18263a12fe9039d98af19c36a7b4e513f54cbd247a32e6b008d40cd
-SIZE (rust/2018-02-15/rustc-1.24.0-i686-unknown-freebsd.tar.gz) = 63788470
-SHA256 (rust/2018-02-15/rustc-1.24.0-x86_64-unknown-freebsd.tar.gz) = 2a0110adc137bf241962eb4000bdba8cbf3713e09087edaba499bb917dce9b8e
-SIZE (rust/2018-02-15/rustc-1.24.0-x86_64-unknown-freebsd.tar.gz) = 62428675
-SHA256 (rust/rustc-1.25.0-src.tar.xz) = 14fcb82d5959df758aaf422539359300917217fa8420e34bd596e3fb6ed2de87
-SIZE (rust/rustc-1.25.0-src.tar.xz) = 56108536
-TIMESTAMP = 1523914189
+TIMESTAMP = 1526286569
+SHA256 (rust/rustc-1.26.0-src.tar.xz) = 903b4727ad0c07e0edf9e27d5962c6e6f07f0f3c32e06c0f937bc79a087a32af
+SIZE (rust/rustc-1.26.0-src.tar.xz) = 54613664
+SHA256 (rust/2018-03-29/rustc-1.25.0-aarch64-unknown-freebsd.tar.gz) = bef48b3ba5d560ae2eae532bfa4858827cd90687684e42ba515cb6dd78348ea9
+SIZE (rust/2018-03-29/rustc-1.25.0-aarch64-unknown-freebsd.tar.gz) = 62374768
+SHA256 (rust/2018-03-29/rust-std-1.25.0-aarch64-unknown-freebsd.tar.gz) = 994e415d2bec4c862cede93ca8f50fdc30272930170d30d963f5f9e127f8e60b
+SIZE (rust/2018-03-29/rust-std-1.25.0-aarch64-unknown-freebsd.tar.gz) = 59733871
+SHA256 (rust/2018-03-29/cargo-0.26.0-aarch64-unknown-freebsd.tar.gz) = a2efee9c92a87ac48d3281eafeb24d713e32aca18dc7b287079f054dd68c533f
+SIZE (rust/2018-03-29/cargo-0.26.0-aarch64-unknown-freebsd.tar.gz) = 4170950
+SHA256 (rust/2018-03-29/rustc-1.25.0-i686-unknown-freebsd.tar.gz) = 8a2488f0d905bd2d498addf8943bed58f817f3fad8387ba4cb7124f38a4c24dd
+SIZE (rust/2018-03-29/rustc-1.25.0-i686-unknown-freebsd.tar.gz) = 56770706
+SHA256 (rust/2018-03-29/rust-std-1.25.0-i686-unknown-freebsd.tar.gz) = fe470bcb2e46d91d866b8a7cb22d7f78f421962b54116938b78286a4f9242775
+SIZE (rust/2018-03-29/rust-std-1.25.0-i686-unknown-freebsd.tar.gz) = 50402505
+SHA256 (rust/2018-03-29/cargo-0.26.0-i686-unknown-freebsd.tar.gz) = 3736e794fcede8f24dae8798d70ec4252b47516978460448e324b7dd3d875a73
+SIZE (rust/2018-03-29/cargo-0.26.0-i686-unknown-freebsd.tar.gz) = 4930623
+SHA256 (rust/2018-03-29/rustc-1.25.0-x86_64-unknown-freebsd.tar.gz) = 42279e4bb3ab6a6be87096c023ee62a43ffcefb36d2d23ed13b762c5b509ea6d
+SIZE (rust/2018-03-29/rustc-1.25.0-x86_64-unknown-freebsd.tar.gz) = 56569917
+SHA256 (rust/2018-03-29/rust-std-1.25.0-x86_64-unknown-freebsd.tar.gz) = c5c62da893a1563e7ccff77ff313417a241300e09b4d06d9f5165bf35a72c58a
+SIZE (rust/2018-03-29/rust-std-1.25.0-x86_64-unknown-freebsd.tar.gz) = 50228076
+SHA256 (rust/2018-03-29/cargo-0.26.0-x86_64-unknown-freebsd.tar.gz) = f5c4c0fbbb11b36223de815b734ab6f3497b6c453ca7f9fb93d457316fbfc1b7
+SIZE (rust/2018-03-29/cargo-0.26.0-x86_64-unknown-freebsd.tar.gz) = 5211772
diff --git a/lang/rust/files/old_fstat.c b/lang/rust/files/old_fstat.c
deleted file mode 100644
index 79436787cfc4..000000000000
--- a/lang/rust/files/old_fstat.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* $FreeBSD$ */
-
-#include <sys/syscall.h>
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-struct stat;
-
-int
-fstat(int fd, struct stat *sb)
-{
-
- return (syscall(SYS_freebsd11_fstat, fd, sb));
-}
-
-int
-stat(const char *path, struct stat *sb)
-{
-
- return (syscall(SYS_freebsd11_stat, path, sb));
-}
-
-int
-lstat(const char *path, struct stat *sb)
-{
-
- return (syscall(SYS_freebsd11_lstat, path, sb));
-}
-
-int
-fstatat(int fd, const char *path, struct stat *sb, int flag)
-{
-
- return (syscall(SYS_freebsd11_fstatat, fd, path, sb, flag));
-}
-
-struct ODIR;
-struct freebsd11_dirent;
-
-/*
-__asm(".symver old_readdir, readdir@FBSD_1.0");
-int old_readdir(struct ODIR *);
-int
-readdir(struct ODIR *dirp)
-{
-
- return (old_readdir(dirp));
-}
-*/
-
-__asm(".symver old_readdir_r, readdir_r@FBSD_1.0");
-int old_readdir_r(struct ODIR *, struct freebsd11_dirent *,
- struct freebsd11_dirent **);
-int
-readdir_r(struct ODIR *dirp, struct freebsd11_dirent *entry,
- struct freebsd11_dirent **result)
-{
- void *libc;
- void *fptr;
- int error;
-
- libc = dlopen("libc.so.7", RTLD_LAZY | RTLD_GLOBAL);
- if (libc == NULL) {
- fprintf(stderr, "libc open: %s\n", dlerror());
- abort();
- }
- fptr = dlvsym(libc, "readdir_r", "FBSD_1.0");
- if (fptr == NULL) {
- fprintf(stderr, "readdir_r: %s\n", dlerror());
- abort();
- }
- error = ((int (*)(struct ODIR *, struct freebsd11_dirent *,
- struct freebsd11_dirent **))fptr)(dirp, entry, result);
- dlclose(libc);
- return (error);
-}
-
-/*
-__asm(".symver old_scandir, scandir@FBSD_1.0");
-int old_scandir(const char *, struct freebsd11_dirent ***,
- int (*)(const struct freebsd11_dirent *),
- int (*)(const struct freebsd11_dirent **,
- const struct freebsd11_dirent **));
-int
-scandir(const char *dirname, struct freebsd11_dirent ***namelist,
- int (*select)(const struct freebsd11_dirent *),
- int (*dcomp)(const struct freebsd11_dirent **,
- const struct freebsd11_dirent **))
-{
-
- return (old_scandir(dirname, namelist, select, dcomp));
-}
-*/
-
-struct old_statfs;
-int
-fstatfs(int fd, struct old_statfs *buf)
-{
-
- return (syscall(SYS_freebsd11_fstatfs, fd, buf));
-}
diff --git a/lang/rust/files/patch-src_binaryen_CMakeLists.txt b/lang/rust/files/patch-src_binaryen_CMakeLists.txt
deleted file mode 100644
index 88f374664024..000000000000
--- a/lang/rust/files/patch-src_binaryen_CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-https://github.com/WebAssembly/binaryen/commit/07f6dfbf0d89
-https://github.com/WebAssembly/binaryen/commit/d9692277357b
-
---- src/binaryen/CMakeLists.txt.orig 2018-02-12 18:56:16 UTC
-+++ src/binaryen/CMakeLists.txt
-@@ -99,51 +99,12 @@ ELSE()
- FIND_PACKAGE(Threads REQUIRED)
- ADD_CXX_FLAG("-std=c++11")
- if (NOT EMSCRIPTEN)
-- # try to get the target architecture by compiling a dummy.c file and
-- # checking the architecture using the file command.
-- file(WRITE ${PROJECT_BINARY_DIR}/dummy.c "main(){}")
-- try_compile(
-- COMPILE_OK
-- ${PROJECT_BINARY_DIR}
-- ${PROJECT_BINARY_DIR}/dummy.c
-- OUTPUT_VARIABLE COMPILE_OUTPUT
-- COPY_FILE ${PROJECT_BINARY_DIR}/dummy
-- )
-- if (COMPILE_OK)
-- execute_process(
-- COMMAND file ${PROJECT_BINARY_DIR}/dummy
-- RESULT_VARIABLE FILE_RESULT
-- OUTPUT_VARIABLE FILE_OUTPUT
-- ERROR_QUIET
-- )
--
-- if (FILE_RESULT EQUAL 0)
-- if (${FILE_OUTPUT} MATCHES "x86[-_]64")
-- set(TARGET_ARCH "x86-64")
-- elseif (${FILE_OUTPUT} MATCHES "Intel 80386")
-- set(TARGET_ARCH "i386")
-- elseif (${FILE_OUTPUT} MATCHES "ARM")
-- set(TARGET_ARCH "ARM")
-- else ()
-- message(WARNING "Unknown target architecture!")
-- endif ()
-- if(TARGET_ARCH)
-- MESSAGE(STATUS "Building for platform ${TARGET_ARCH}")
-- endif ()
-- else ()
-- message(WARNING "Error running file on dummy executable")
-- endif ()
-- else ()
-- message(WARNING "Error compiling dummy.c file: ${COMPILE_OUTPUT}")
-- endif ()
--
-- if (TARGET_ARCH STREQUAL "i386")
-+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
- # wasm doesn't allow for x87 floating point math
- ADD_COMPILE_FLAG("-msse2")
- ADD_COMPILE_FLAG("-mfpmath=sse")
-- elseif(TARGET_ARCH STREQUAL "ARM")
-- # stub for ARM-specific instructions. GCC6 adds NEON with the below flags
-- ADD_COMPILE_FLAG("-march=native")
-+ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv[2-6]" AND NOT CMAKE_CXX_FLAGS MATCHES "-mfpu=")
-+ ADD_COMPILE_FLAG("-mfpu=vfpv3")
- endif ()
- endif ()
- ADD_COMPILE_FLAG("-Wall")
diff --git a/lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs b/lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs
deleted file mode 100644
index d2ff91540fd6..000000000000
--- a/lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-Return struct like OpenBSD, see src/librustc_trans/cabi_x86.rs
-
---- src/librustc_back/target/freebsd_base.rs.orig 2018-03-25 14:26:14 UTC
-+++ src/librustc_back/target/freebsd_base.rs
-@@ -31,6 +31,7 @@ pub fn opts() -> TargetOptions {
- target_family: Some("unix".to_string()),
- linker_is_gnu: true,
- has_rpath: true,
-+ is_like_openbsd: true,
- pre_link_args: args,
- position_independent_executables: true,
- eliminate_frame_pointer: false, // FIXME 43575