MFH: r522316 r522638 r522639

lang/rust: Simplify do-configure and garbage collect files/config.toml

lang/rust: fix powerpc64 elfv2 bootstrap

Apparently there were some issues with the previous one.

PR:		243253
Submitted by:	mikael.urankar@gmail.com
Reported by:	jhibbits, pkubaj
Tested by:	pkubaj

lang/rust: increase build verbosity and produce better build logs

Approved by:	ports-secteam blanket
This commit is contained in:
Tobias Kortkamp 2020-01-11 09:32:58 +00:00
parent 7b06501068
commit ede3a3d5fb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q1/; revision=522641
3 changed files with 35 additions and 74 deletions

View File

@ -141,32 +141,38 @@ post-patch-SOURCES-off:
@${REINPLACE_CMD} -e 's/config.tools.*"src".*/false;/' \ @${REINPLACE_CMD} -e 's/config.tools.*"src".*/false;/' \
${WRKSRC}/src/bootstrap/install.rs ${WRKSRC}/src/bootstrap/install.rs
.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE)
CCACHE_VALUE= "${CCACHE_BIN}"
.else
CCACHE_VALUE= false
.endif
do-configure: do-configure:
${SED} -E \ @${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml
-e 's,%PREFIX%,${PREFIX},' \ @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml
-e 's,%SYSCONFDIR%,${PREFIX}/etc,' \ @${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml
-e 's,%MANDIR%,${MANPREFIX}/man,' \ @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml
-e 's,%PYTHON_CMD%,${PYTHON_CMD},' \ @${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml
-e 's,%CHANNEL%,${PKGNAMESUFFIX:Ustable:S/^-//},' \ @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml
-e 's,%TARGET%,${_RUST_TARGET},' \ @${ECHO_CMD} '[install]' >> ${WRKSRC}/config.toml
-e 's,%CCACHE%,${CCACHE_VALUE},' \ @${ECHO_CMD} 'prefix="${PREFIX}"' >> ${WRKSRC}/config.toml
-e 's,%CC%,${CC},' \ @${ECHO_CMD} 'sysconfdir="${PREFIX}/etc"' >> ${WRKSRC}/config.toml
-e 's,%CXX%,${CXX},' \ @${ECHO_CMD} 'mandir="${MANPREFIX}/man"' >> ${WRKSRC}/config.toml
-e 's,%DOCS%,${_RUST_BUILD_DOCS},' \ @${ECHO_CMD} '[rust]' >> ${WRKSRC}/config.toml
< ${FILESDIR}/config.toml \ @${ECHO_CMD} 'channel="${PKGNAMESUFFIX:Ustable:S/^-//}"' >> ${WRKSRC}/config.toml
> ${WRKSRC}/config.toml @${ECHO_CMD} 'default-linker="${CC}"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml
@${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml
.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE)
@${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml
.else
@${ECHO_CMD} 'ccache=false' >> ${WRKSRC}/config.toml
.endif
# no need to build a crosscompiler for these targets # no need to build a crosscompiler for these targets
.if ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == powerpc64 .if ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == powerpc64
@${REINPLACE_CMD} -e 's,^#targets =.*,targets = "${_LLVM_TARGET}",' \ @${ECHO_CMD} 'targets="${_LLVM_TARGET}"' >> ${WRKSRC}/config.toml
-e 's,^#experimental-targets =.*,experimental-targets = "",' \ @${ECHO_CMD} 'experimental-targets=""' >> ${WRKSRC}/config.toml
${WRKSRC}/config.toml
.endif .endif
@${ECHO_CMD} '[target.${_RUST_TARGET}]' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml
@${REINPLACE_CMD} -e 's,%CC%,${CC},g' \ @${REINPLACE_CMD} -e 's,%CC%,${CC},g' \
${WRKSRC}/src/librustc_llvm/build.rs \ ${WRKSRC}/src/librustc_llvm/build.rs \
${WRKSRC}/src/bootstrap/native.rs ${WRKSRC}/src/bootstrap/native.rs
@ -175,7 +181,6 @@ do-build:
cd ${WRKSRC} && \ cd ${WRKSRC} && \
${SETENV} ${X_PY_ENV} \ ${SETENV} ${X_PY_ENV} \
${X_PY_CMD} build \ ${X_PY_CMD} build \
--verbose \
--config ./config.toml \ --config ./config.toml \
--jobs ${MAKE_JOBS_NUMBER} --jobs ${MAKE_JOBS_NUMBER}
@ -184,7 +189,6 @@ do-install:
${SETENV} ${X_PY_ENV} \ ${SETENV} ${X_PY_ENV} \
DESTDIR=${STAGEDIR} \ DESTDIR=${STAGEDIR} \
${X_PY_CMD} 'install' \ ${X_PY_CMD} 'install' \
--verbose \
--config ./config.toml \ --config ./config.toml \
--jobs ${MAKE_JOBS_NUMBER} --jobs ${MAKE_JOBS_NUMBER}
@ -239,7 +243,6 @@ do-test:
${SETENV} ${X_PY_ENV} \ ${SETENV} ${X_PY_ENV} \
ALLOW_NONZERO_RLIMIT_CORE=1 \ ALLOW_NONZERO_RLIMIT_CORE=1 \
${X_PY_CMD} test \ ${X_PY_CMD} test \
--verbose \
--config ./config.toml \ --config ./config.toml \
--jobs ${MAKE_JOBS_NUMBER} --jobs ${MAKE_JOBS_NUMBER}

View File

@ -1,4 +1,4 @@
TIMESTAMP = 1576623023 TIMESTAMP = 1578730697
SHA256 (rust/rustc-1.40.0-src.tar.xz) = 6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a5281698fe2aace SHA256 (rust/rustc-1.40.0-src.tar.xz) = 6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a5281698fe2aace
SIZE (rust/rustc-1.40.0-src.tar.xz) = 92306352 SIZE (rust/rustc-1.40.0-src.tar.xz) = 92306352
SHA256 (rust/2019-11-07/rustc-1.39.0-aarch64-unknown-freebsd.tar.xz) = 44098962a570e05d691d3b7c3337b873b1e1f22ac49fd19c0d5d3362c0008eb5 SHA256 (rust/2019-11-07/rustc-1.39.0-aarch64-unknown-freebsd.tar.xz) = 44098962a570e05d691d3b7c3337b873b1e1f22ac49fd19c0d5d3362c0008eb5
@ -39,9 +39,9 @@ SHA256 (rust/2019-11-07/rust-std-1.39.0-powerpc64-unknown-freebsd-elfv1.tar.xz)
SIZE (rust/2019-11-07/rust-std-1.39.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 164834720 SIZE (rust/2019-11-07/rust-std-1.39.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 164834720
SHA256 (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 707eef9bac71a44db8e1d64c70a771fbac1f81f7ca58a2e3025ec1cc4d263b18 SHA256 (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 707eef9bac71a44db8e1d64c70a771fbac1f81f7ca58a2e3025ec1cc4d263b18
SIZE (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 3423776 SIZE (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 3423776
SHA256 (rust/2019-11-07/rustc-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = e615095f1fb2017938147da213d04444b785ae34128c4aa9099996f0de610a52 SHA256 (rust/2019-11-07/rustc-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 65a7eed0737ae94e54d60a0cf5cc67634fb8ddd978bdfb0ce4e5f46d309daa0a
SIZE (rust/2019-11-07/rustc-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 24519864 SIZE (rust/2019-11-07/rustc-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 24483956
SHA256 (rust/2019-11-07/rust-std-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = fb83397a7b6abfcf292ed50f8c277617c2e77686778ca853ca2228f7aa5d7a84 SHA256 (rust/2019-11-07/rust-std-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 60782554de07997c25bf2aa279b44baa8009158b25cc3c5364b1496a2d40f2a4
SIZE (rust/2019-11-07/rust-std-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 163807368 SIZE (rust/2019-11-07/rust-std-1.39.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 163926244
SHA256 (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = aeebed336e09121f4d8803b5b6c2814a0901773a65bce9bd091a06d6082ac978 SHA256 (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 75ecd88d83e8f394ce33f0213b622a045cbcfc55973f4b5140403de298f73968
SIZE (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 2753592 SIZE (rust/2019-11-07/cargo-0.40.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 3268696

View File

@ -1,42 +0,0 @@
[build]
# Use bundled crates; this should permit offline build.
vendor = true
# In addition to rustc, rust-std and rust-docs, build Cargo.
extended = true
# python(1) location.
python = "%PYTHON_CMD%"
# Do we want to build docs?
docs = %DOCS%
[install]
# Install location.
prefix = "%PREFIX%"
sysconfdir = "%SYSCONFDIR%"
mandir = "%MANDIR%"
[rust]
# Rust release channel.
channel = "%CHANNEL%"
default-linker = "%CC%"
[llvm]
ccache = %CCACHE%
#targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon"
#experimental-targets = "WebAssembly;RISCV"
[target.%TARGET%]
cc = "%CC%"
cxx = "%CXX%"
linker = "%CC%"
[dist]
# Do not build the source archive.
src-tarball = false