Changeset View
Changeset View
Standalone View
Standalone View
lang/rust/Makefile
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
CARGO_BOOTSTRAP_VERSION?= 0.35.0 | CARGO_BOOTSTRAP_VERSION?= 0.35.0 | ||||
CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz | CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz | ||||
CARGO_VENDOR_DIR?= ${WRKSRC}/vendor | CARGO_VENDOR_DIR?= ${WRKSRC}/vendor | ||||
RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//} | RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//} | ||||
# Rust's target arch string is different from *BSD arch strings | # Rust's target arch string is different from *BSD arch strings | ||||
RUST_ARCH_aarch64= aarch64 | RUST_ARCH_aarch64= aarch64 | ||||
RUST_ARCH_amd64= x86_64 | RUST_ARCH_amd64= x86_64 | ||||
RUST_ARCH_armv6= armv6 | RUST_ARCH_armv6= armv6 | ||||
RUST_ARCH_armv7= armv7 | RUST_ARCH_armv7= armv7 | ||||
RUST_ARCH_i386= i686 | RUST_ARCH_i386= i686 | ||||
RUST_ARCH_powerpc64= powerpc64 | RUST_ARCH_powerpc64= powerpc64 | ||||
RUST_ARCH_x86_64= x86_64 # dragonfly | RUST_ARCH_x86_64= x86_64 # dragonfly | ||||
RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl} | RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl} | ||||
LLVM_TARGET= ${ARCH:C/armv.*/ARM/:S/aarch64/AArch64/:S/powerpc64/PowerPC/} | LLVM_TARGET= ${ARCH:C/armv.*/ARM/:S/aarch64/AArch64/:S/powerpc64/PowerPC/} | ||||
PLIST_SUB+= RUST_TARGET=${RUST_TARGET} | PLIST_SUB+= RUST_TARGET=${RUST_TARGET} | ||||
tobik: Please just use `-${PPC_ABI:tl}` and revert the distinfo changes. The bootstrap tarball… | |||||
USES= compiler gmake libedit pkgconfig python:2.7,build ssl tar:xz | USES= compiler gmake libedit pkgconfig python:2.7,build ssl tar:xz | ||||
OPTIONS_DEFINE= DOCS GDB LLNEXTGEN SOURCES | OPTIONS_DEFINE= DOCS GDB LLNEXTGEN SOURCES | ||||
GDB_DESC= Install ports gdb (necessary for debugging rust programs) | GDB_DESC= Install ports gdb (necessary for debugging rust programs) | ||||
LLNEXTGEN_DESC= Build with grammar verification | LLNEXTGEN_DESC= Build with grammar verification | ||||
SOURCES_DESC= Install source files | SOURCES_DESC= Install source files | ||||
GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb | GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb | ||||
LLNEXTGEN_BUILD_DEPENDS= LLnextgen:devel/llnextgen | LLNEXTGEN_BUILD_DEPENDS= LLnextgen:devel/llnextgen | ||||
# Rust manifests list all files and directories installed by rust-installer. | # Rust manifests list all files and directories installed by rust-installer. | ||||
# We use them in: | # We use them in: | ||||
# - pre-install to cleanup the ${STAGEDIR} | # - pre-install to cleanup the ${STAGEDIR} | ||||
# - post-install to populate the ${TMPPLIST} | # - post-install to populate the ${TMPPLIST} | ||||
RUST_MANIFESTS= lib/rustlib/manifest-* | RUST_MANIFESTS= lib/rustlib/manifest-* | ||||
PLIST_FILES= lib/rustlib/components \ | PLIST_FILES= lib/rustlib/components \ | ||||
lib/rustlib/rust-installer-version | lib/rustlib/rust-installer-version | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
.if ${ARCH} == powerpc64 | .if ${ARCH} == powerpc64 && ${OSVERSION} < 1300036 | ||||
# The bootstrap is hardcoded to use gcc8 | # The bootstrap is hardcoded to use gcc8 | ||||
# but we can build with a newer or older compiler as provided by USE_GCC=yes | # but we can build with a newer or older compiler as provided by USE_GCC=yes | ||||
BUILD_DEPENDS+= gcc8:lang/gcc8 | BUILD_DEPENDS+= gcc8:lang/gcc8 | ||||
USE_GCC= yes | USE_GCC= yes | ||||
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-ppc64-gcc | |||||
Not Done Inline ActionsEXTRA_PATCHES+= tobik: `EXTRA_PATCHES+=` | |||||
RUSTC_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}-elfv1.tar.gz | |||||
RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}-elfv1.tar.gz | |||||
CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}-elfv1.tar.gz | |||||
.endif | .endif | ||||
.if ${OPSYS} == FreeBSD && ${ARCH} == aarch64 && \ | .if ${OPSYS} == FreeBSD && ${ARCH} == aarch64 && \ | ||||
(${OSVERSION} < 1200502 || \ | (${OSVERSION} < 1200502 || \ | ||||
(${OSVERSION} > 1300000 && ${OSVERSION} < 1300006)) | (${OSVERSION} > 1300000 && ${OSVERSION} < 1300006)) | ||||
IGNORE= fails to run due to a bug in rtld, update to 12-STABLE r342847 or 13-CURRENT r342113 | IGNORE= fails to run due to a bug in rtld, update to 12-STABLE r342847 or 13-CURRENT r342113 | ||||
.endif | .endif | ||||
Show All 34 Lines | @${REINPLACE_CMD} -e \ | ||||
${WRKSRC}/src/stage0.txt | ${WRKSRC}/src/stage0.txt | ||||
@${REINPLACE_CMD} -e \ | @${REINPLACE_CMD} -e \ | ||||
's|^cargo:.*|cargo: ${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}|' \ | 's|^cargo:.*|cargo: ${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}|' \ | ||||
${WRKSRC}/src/stage0.txt | ${WRKSRC}/src/stage0.txt | ||||
# Disable vendor checksums | # Disable vendor checksums | ||||
@${REINPLACE_CMD} -e \ | @${REINPLACE_CMD} -e \ | ||||
's/"files":{[^}]*}/"files":{}/' \ | 's/"files":{[^}]*}/"files":{}/' \ | ||||
${CARGO_VENDOR_DIR}/*/.cargo-checksum.json | ${CARGO_VENDOR_DIR}/*/.cargo-checksum.json | ||||
# XXX OSVERSION | |||||
.if ${OSVERSION} >= 1300036 | |||||
Not Done Inline ActionsDid you mean > and not >=? If so 1300036 users may end up using Clang but not ELFv2. jbeich: Did you mean `>` and not `>=`? If so 1300036 users may end up using Clang but not ELFv2.
| |||||
Done Inline Actionsyes, it should be >= mikael: yes, it should be >= | |||||
@${REINPLACE_CMD} -e \ | |||||
's|Endian::Big => ELFv1|Endian::Big => ELFv2|' \ | |||||
${WRKSRC}/src/librustc_target/abi/call/powerpc64.rs | |||||
@${REINPLACE_CMD} -e \ | |||||
's|powerpc64-unknown-freebsd|powerpc64-unknown-freebsd13.0|' \ | |||||
Not Done Inline ActionsNone of rustc --print target-list currently have OS version. Did you check ports depending on lang/rust build fine? jbeich: None of `rustc --print target-list` currently have OS version. Did you check ports depending on… | |||||
Not Done Inline ActionsNevermind. I didn't notice this target is for LLVM. jbeich: Nevermind. I didn't notice this target is for LLVM. | |||||
Done Inline ActionsI tried devel/bingrep, it works fine. mikael: I tried devel/bingrep, it works fine. | |||||
Not Done Inline ActionsIt sure feels like this (and extra-patch-ppc64-gcc) should be some cfg! or env! thing in Rust rather than us wrangling with conditional patches, but not sure how that would work exactly. It's fine for now I guess. tobik: It sure feels like this (and `extra-patch-ppc64-gcc`) should be some `cfg!` or `env!` thing in… | |||||
${WRKSRC}/src/librustc_target/spec/powerpc64_unknown_freebsd.rs | |||||
.endif | |||||
post-patch-SOURCES-off: | post-patch-SOURCES-off: | ||||
# Mimic tools in config.toml with just src excluded | # Mimic tools in config.toml with just src excluded | ||||
@${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) | .if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE) | ||||
CCACHE_VALUE= "${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache" | CCACHE_VALUE= "${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache" | ||||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | ${SETENV} ${X_PY_ENV} \ | ||||
ALLOW_NONZERO_RLIMIT_CORE=1 \ | ALLOW_NONZERO_RLIMIT_CORE=1 \ | ||||
${X_PY_CMD} test \ | ${X_PY_CMD} test \ | ||||
--verbose \ | --verbose \ | ||||
--config ./config.toml \ | --config ./config.toml \ | ||||
--jobs ${MAKE_JOBS_NUMBER} | --jobs ${MAKE_JOBS_NUMBER} | ||||
.if !defined(_RUST_MAKESUM_GUARD) | .if !defined(_RUST_MAKESUM_GUARD) | ||||
makesum: | makesum: | ||||
${MAKE} -D_RUST_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} | ${MAKE} -D_RUST_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} | ||||
.for arch in ${ONLY_FOR_ARCHS:O:[2..-1]} | .for arch in ${ONLY_FOR_ARCHS:O:[2..-1]} | ||||
${MAKE} -D_RUST_MAKESUM_GUARD makesum ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch} | ${MAKE} -D_RUST_MAKESUM_GUARD makesum ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch} | ||||
Not Done Inline ActionsBest add PPC_ABI=ELFv1 here so that makesum can still work as it should on every arch. tobik: Best add `PPC_ABI=ELFv1` here so that makesum can still work as it should on every arch. | |||||
${GREP} ${RUST_ARCH_${arch}} ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE} | ${GREP} ${RUST_ARCH_${arch}} ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE} | ||||
${RM} ${DISTINFO_FILE}.${arch} | ${RM} ${DISTINFO_FILE}.${arch} | ||||
.endfor | .endfor | ||||
.endif | .endif | ||||
Not Done Inline ActionsReplace BOOTSTRAPS_SUFFIX with PPC_ABI=ELFv2. tobik: Replace BOOTSTRAPS_SUFFIX with `PPC_ABI=ELFv2`. | |||||
Not Done Inline ActionsRevert these too. tobik: Revert these too. | |||||
BOOTSTRAPS_SOURCE_PKG_FBSDVER= 10 | BOOTSTRAPS_SOURCE_PKG_FBSDVER= 10 | ||||
BOOTSTRAPS_SOURCE_PKG_FBSDVER_aarch64= 11 | BOOTSTRAPS_SOURCE_PKG_FBSDVER_aarch64= 11 | ||||
BOOTSTRAPS_SOURCE_PKG_FBSDVER_armv6= 11 | BOOTSTRAPS_SOURCE_PKG_FBSDVER_armv6= 11 | ||||
BOOTSTRAPS_SOURCE_PKG_FBSDVER_armv7= 12 | BOOTSTRAPS_SOURCE_PKG_FBSDVER_armv7= 12 | ||||
BOOTSTRAPS_SOURCE_PKG_FBSDVER_powerpc64= 11 | BOOTSTRAPS_SOURCE_PKG_FBSDVER_powerpc64= 11 | ||||
BOOTSTRAPS_SOURCE_PKG_REV= | BOOTSTRAPS_SOURCE_PKG_REV= | ||||
BOOTSTRAPS_SOURCE_PKG_URL= https://pkg.freebsd.org/FreeBSD:${BOOTSTRAPS_SOURCE_PKG_FBSDVER_${ARCH}:U${BOOTSTRAPS_SOURCE_PKG_FBSDVER}}:${ARCH}/latest/All/rust-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}${BOOTSTRAPS_SOURCE_PKG_REV}.txz | BOOTSTRAPS_SOURCE_PKG_URL= https://pkg.freebsd.org/FreeBSD:${BOOTSTRAPS_SOURCE_PKG_FBSDVER_${ARCH}:U${BOOTSTRAPS_SOURCE_PKG_FBSDVER}}:${ARCH}/latest/All/rust-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}${BOOTSTRAPS_SOURCE_PKG_REV}.txz | ||||
BOOTSTRAPS_SOURCE_PKG= ${_DISTDIR}/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${ARCH}.txz | BOOTSTRAPS_SOURCE_PKG= ${_DISTDIR}/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${ARCH}.txz | ||||
Show All 33 Lines |
Please just use -${PPC_ABI:tl} and revert the distinfo changes. The bootstrap tarball filenames are all lowercase. Let's keep it that way.