Index: head/lang/rust/Makefile =================================================================== --- head/lang/rust/Makefile (revision 569006) +++ head/lang/rust/Makefile (revision 569007) @@ -1,232 +1,240 @@ # Created by: Jyun-Yan You # $FreeBSD$ PORTNAME= rust PORTVERSION?= 1.50.0 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:src \ https://dev-static.rust-lang.org/dist/:src \ LOCAL/bdragon/rust:bootstrap \ LOCAL/mikael/rust:bootstrap \ LOCAL/tobik/rust:bootstrap \ https://static.rust-lang.org/dist/:bootstrap DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src DISTFILES?= ${NIGHTLY_DATE:D${NIGHTLY_DATE}/}${DISTNAME}${EXTRACT_SUFX}:src \ ${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ ${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ ${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap DIST_SUBDIR?= rust MAINTAINER= rust@FreeBSD.org COMMENT= Language with a focus on memory safety and concurrency LICENSE= APACHE20 MIT LICENSE_COMB= dual LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT IGNORE_FreeBSD_11_powerpc64= is missing a bootstrap for FreeBSD 11.x powerpc64 ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler BUILD_DEPENDS= cmake:devel/cmake \ ninja:devel/ninja LIB_DEPENDS= libcurl.so:ftp/curl USES= pkgconfig python:3.6+,build ssl tar:xz MAKE_ENV= DESTDIR=${STAGEDIR} \ OPENSSL_DIR="${OPENSSLBASE}" \ RUST_BACKTRACE=1 TEST_ENV= ${MAKE_ENV} \ ALLOW_NONZERO_RLIMIT_CORE=1 CONFLICTS_INSTALL?= rust-nightly OPTIONS_DEFINE= DOCS GDB SOURCES WASM OPTIONS_DEFAULT= SOURCES WASM -OPTIONS_EXCLUDE= DOCS # https://github.com/rust-lang/rust/issues/76526 .if defined(NIGHTLY_DATE) OPTIONS_EXCLUDE+= SOURCES .endif GDB_DESC= Install ports gdb (necessary for debugging rust programs) SOURCES_DESC= Install source files WASM_DESC= Build the WebAssembly target (wasm32-unknown-unknown) DOCS_VARS= _RUST_BUILD_DOCS=true DOCS_VARS_OFF= _RUST_BUILD_DOCS=false GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb SOURCES_VARS= _RUST_TOOLS+=src WASM_VARS= _RUST_BUILD_WASM=true \ _RUST_TARGETS+=wasm32-unknown-unknown WASM_VARS_OFF= _RUST_BUILD_WASM=false # See WRKSRC/src/stage0.txt for the date and version values. BOOTSTRAPS_DATE?= 2020-12-31 RUST_BOOTSTRAP_VERSION?= 1.49.0 BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} CARGO_VENDOR_DIR?= ${WRKSRC}/vendor # Rust's target arch string might be different from *BSD arch strings _RUST_ARCH_amd64= x86_64 _RUST_ARCH_i386= i686 _RUST_TARGET= ${_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl} _RUST_TARGETS= ${_RUST_TARGET} _RUST_TOOLS= analysis cargo clippy rls rustfmt _RUSTC_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} _RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} _CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} .include .if exists(${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX}) EXTRA_PATCHES+= ${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX} .endif .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 # The bootstrap is hardcoded to use gcc9 # but we can build with a newer or older compiler as provided by USE_GCC=yes BUILD_DEPENDS+= gcc9:lang/gcc9 USE_GCC= yes .endif # remove when 11.4 is EOL .if ${ARCH} == aarch64 && ${OSVERSION} < 1202000 IGNORE= fails to run due to a bug in rtld, update to 12.2-RELEASE or newer .endif .ifdef QEMU_EMULATING IGNORE= fails to build with qemu-user-static .endif post-patch: @${REINPLACE_CMD} 's,gdb,${LOCALBASE}/bin/gdb,' ${WRKSRC}/src/etc/rust-gdb .if defined(NIGHTLY_DATE) @${REINPLACE_CMD} '/^rustfmt:/d' ${WRKSRC}/src/stage0.txt .endif # Disable vendor checksums @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ ${CARGO_VENDOR_DIR}/*/.cargo-checksum.json do-configure: # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh .for _component in cargo rust-std rustc @cd ${WRKDIR}/${_component}-*-${OPSYS:tl} && \ ${SH} install.sh --prefix=${WRKDIR}/bootstrap --verbose .endfor - @${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml + @${ECHO_CMD} 'changelog-seen=2' > ${WRKSRC}/config.toml + @${ECHO_CMD} '[build]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml .if defined(NIGHTLY_DATE) @${ECHO_CMD} 'profiler=true' >> ${WRKSRC}/config.toml .endif @${ECHO_CMD} 'target=[${_RUST_TARGETS:@.target.@"${.target.}"@:ts,}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cargo="${WRKDIR}/bootstrap/bin/cargo"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'rustc="${WRKDIR}/bootstrap/bin/rustc"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'tools=[${_RUST_TOOLS:@.tool.@"${.tool.}"@:ts,}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[install]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'prefix="${PREFIX}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'sysconfdir="${PREFIX}/etc"' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[rust]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'channel="${PKGNAMESUFFIX:Ustable:S/^-//}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'default-linker="${CC}"' >> ${WRKSRC}/config.toml + @${ECHO_CMD} 'deny-warnings=false' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'lld=${_RUST_BUILD_WASM}' >> ${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 @${ECHO_CMD} 'ninja=true' >> ${WRKSRC}/config.toml .if ${ARCH} == armv6 # fails to link with base ld.bfd: rustc_codegen_llvm.e2557spx-cgu.11:(.text._ZN89_$LT$rustc_target..abi..call..CastTarget$u20$as$u20$rustc_codegen_llvm..abi..LlvmType$GT$9llvm_type17h1296210ab461fc57E+0x54): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text.__aeabi_uldivmod section in /tmp/rustcdnGbao/libcompiler_builtins-ee65b414e4115a8f.rlib(compiler_builtins-ee65b414e4115a8f.compiler_builtins.ay8p39ey-cgu.13.rcgu.o) @${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=lld "$$@"' > ${WRKDIR}/cc-wrapper @${CHMOD} +x ${WRKDIR}/cc-wrapper .endif .for _target in ${_RUST_TARGETS} @${ECHO_CMD} '[target.${_target}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'ar="${AR}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml .if ${ARCH} == armv6 @${ECHO_CMD} 'linker="${WRKDIR}/cc-wrapper"' >> ${WRKSRC}/config.toml .else @${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml .endif .endfor @${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml .if defined(NIGHTLY_DATE) # Don't abort if optional tools fail to build @${ECHO_CMD} 'missing-tools=true' >> ${WRKSRC}/config.toml .endif @${REINPLACE_CMD} 's,%CC%,${CC},g' \ ${WRKSRC}/src/bootstrap/native.rs # this reinplace_cmd is used for ppc64-elfv1, don't remove it # even if sed_checked.sh says it's unused @${REINPLACE_CMD} 's,%CC%,${CC},g' \ ${WRKSRC}/compiler/rustc_llvm/build.rs do-build: @cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py build --jobs=${MAKE_JOBS_NUMBER} do-install: @cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py install --jobs=${MAKE_JOBS_NUMBER} # We autogenerate the plist file. We do that, instead of the # regular pkg-plist, because several libraries have a computed # filename based on the absolute path of the source files. As it # is user-specific, we cannot know their filename in advance. @${RM} -r ${STAGEDIR}${DOCSDIR}/*.old \ ${STAGEDIR}${DOCSDIR}/html/.lock \ ${STAGEDIR}${DOCSDIR}/html/.stamp \ ${STAGEDIR}${PREFIX}/lib/rustlib/install.log \ ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-* \ ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh - @${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/lib -exec ${FILE} -i {} + | \ + @${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/lib \ + ${STAGEDIR}${PREFIX}/libexec -exec ${FILE} -i {} + | \ ${AWK} -F: '/executable|sharedlib/ { print $$1 }' | ${XARGS} ${STRIP_CMD} @${FIND} ${STAGEDIR}${PREFIX} -not -type d | \ ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/,,' \ -e 's,(share/man/man[1-9]/.*\.[0-9]),\1.gz,' >> ${TMPPLIST} + +post-install-DOCS-on: +# Ignore any left behind empty directories in case some docs fail +# to build (failures are ignored due to deny-warnings=false). + @${FIND} ${STAGEDIR}${DOCSDIR}/html -empty -type d | \ + ${SED} 's,^${STAGEDIR},@comment @dir ,' >> ${TMPPLIST} post-install-SOURCES-on: # Silence stage-qa warnings by sanitizing permissions on sources @${FIND} ${STAGEDIR}${PREFIX}/lib/rustlib/src -type f -exec ${CHMOD} \ ${SHAREMODE} {} + # Note that make test does not work when rust is already installed. do-test: @cd ${WRKSRC} && \ ${SETENV} ${TEST_ENV} ${PYTHON_CMD} x.py test --jobs=${MAKE_JOBS_NUMBER} .if !defined(_RUST_MAKESUM_GUARD) makesum: ${MAKE} -D_RUST_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp .for arch in ${ONLY_FOR_ARCHS:O:[2..-1]} ${MAKE} -D_RUST_MAKESUM_GUARD makesum PPC_ABI=ELFv1 ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch} ${SED} 1d ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE}.tmp ${RM} ${DISTINFO_FILE}.${arch} .endfor .if ${ONLY_FOR_ARCHS:Mpowerpc64} ${MAKE} -D_RUST_MAKESUM_GUARD makesum PPC_ABI=ELFv2 ARCH=powerpc64 DISTINFO_FILE=${DISTINFO_FILE}.powerpc64-elfv2 ${SED} 1d ${DISTINFO_FILE}.powerpc64-elfv2 >> ${DISTINFO_FILE}.tmp ${RM} ${DISTINFO_FILE}.powerpc64-elfv2 .endif ${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE} ${RM} ${DISTINFO_FILE}.tmp .endif .include Index: head/lang/rust/files/patch-backtrace =================================================================== --- head/lang/rust/files/patch-backtrace (nonexistent) +++ head/lang/rust/files/patch-backtrace (revision 569007) @@ -0,0 +1,918 @@ +https://github.com/rust-lang/rust/issues/78184 + +--- library/backtrace/src/symbolize/gimli.rs.orig 2021-02-10 17:36:59 UTC ++++ library/backtrace/src/symbolize/gimli.rs +@@ -361,6 +361,7 @@ cfg_if::cfg_if! { + } else if #[cfg(any( + target_os = "linux", + target_os = "fuchsia", ++ target_os = "freebsd", + ))] { + // Other Unix (e.g. Linux) platforms use ELF as an object file format + // and typically implement an API called `dl_iterate_phdr` to load +--- vendor/libc-0.2.77/src/unix/bsd/freebsdlike/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc-0.2.77/src/unix/bsd/freebsdlike/mod.rs +@@ -14,6 +14,38 @@ pub type nl_item = ::c_int; + pub type id_t = i64; + pub type vm_size_t = ::uintptr_t; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ ++// link.h ++ + #[cfg_attr(feature = "extra_traits", derive(Debug))] + pub enum timezone {} + impl ::Copy for timezone {} +@@ -233,6 +265,43 @@ s! { + pub piod_addr: *mut ::c_void, + pub piod_len: ::size_t, + } ++ ++ // elf.h ++ ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ pub dlpi_adds: ::c_ulonglong, ++ pub dlpi_subs: ::c_ulonglong, ++ pub dlpi_tls_modid: usize, ++ pub dlpi_tls_data: *mut ::c_void, ++ } + } + + s_no_extra_traits! { +@@ -1514,6 +1583,18 @@ extern "C" { + + pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; ++ ++ // #include ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + #[link(name = "rt")] +--- vendor/libc-0.2.77/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc-0.2.77/src/unix/bsd/netbsdlike/netbsd/mod.rs +@@ -11,6 +11,36 @@ pub type vm_size_t = ::uintptr_t; + pub type lwpid_t = ::c_uint; + pub type shmatt_t = ::c_uint; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ + impl siginfo_t { + pub unsafe fn si_value(&self) -> ::sigval { + #[repr(C)] +@@ -341,6 +371,42 @@ s! { + pub time_state: ::c_int, + } + ++ // elf.h ++ ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ pub dlpi_adds: ::c_ulonglong, ++ pub dlpi_subs: ::c_ulonglong, ++ pub dlpi_tls_modid: usize, ++ pub dlpi_tls_data: *mut ::c_void, ++ } + } + + s_no_extra_traits! { +@@ -1988,6 +2054,19 @@ extern "C" { + needle: *const ::c_void, + needlelen: ::size_t, + ) -> *mut ::c_void; ++ ++ // link.h ++ ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + #[link(name = "util")] +--- vendor/libc-0.2.77/src/unix/bsd/netbsdlike/openbsd/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc-0.2.77/src/unix/bsd/netbsdlike/openbsd/mod.rs +@@ -16,6 +16,36 @@ pub type pthread_rwlock_t = *mut ::c_void; + pub type pthread_rwlockattr_t = *mut ::c_void; + pub type caddr_t = *mut ::c_char; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ + s! { + pub struct glob_t { + pub gl_pathc: ::size_t, +@@ -321,6 +351,38 @@ s! { + __shm_ctimensec: c_long, + pub shm_internal: *mut ::c_void, + } ++ ++ // elf.h ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ } + } + + impl siginfo_t { +@@ -1480,6 +1542,17 @@ extern "C" { + needle: *const ::c_void, + needlelen: ::size_t, + ) -> *mut ::c_void; ++ // #include ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + cfg_if! { +--- vendor/libc-0.2.79/src/unix/bsd/freebsdlike/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc-0.2.79/src/unix/bsd/freebsdlike/mod.rs +@@ -14,6 +14,38 @@ pub type nl_item = ::c_int; + pub type id_t = i64; + pub type vm_size_t = ::uintptr_t; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ ++// link.h ++ + #[cfg_attr(feature = "extra_traits", derive(Debug))] + pub enum timezone {} + impl ::Copy for timezone {} +@@ -233,6 +265,43 @@ s! { + pub piod_addr: *mut ::c_void, + pub piod_len: ::size_t, + } ++ ++ // elf.h ++ ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ pub dlpi_adds: ::c_ulonglong, ++ pub dlpi_subs: ::c_ulonglong, ++ pub dlpi_tls_modid: usize, ++ pub dlpi_tls_data: *mut ::c_void, ++ } + } + + s_no_extra_traits! { +@@ -1514,6 +1583,18 @@ extern "C" { + + pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; ++ ++ // #include ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + #[link(name = "rt")] +--- vendor/libc-0.2.79/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc-0.2.79/src/unix/bsd/netbsdlike/netbsd/mod.rs +@@ -11,6 +11,36 @@ pub type vm_size_t = ::uintptr_t; + pub type lwpid_t = ::c_uint; + pub type shmatt_t = ::c_uint; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ + impl siginfo_t { + pub unsafe fn si_value(&self) -> ::sigval { + #[repr(C)] +@@ -341,6 +371,42 @@ s! { + pub time_state: ::c_int, + } + ++ // elf.h ++ ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ pub dlpi_adds: ::c_ulonglong, ++ pub dlpi_subs: ::c_ulonglong, ++ pub dlpi_tls_modid: usize, ++ pub dlpi_tls_data: *mut ::c_void, ++ } + } + + s_no_extra_traits! { +@@ -1990,6 +2056,19 @@ extern "C" { + needle: *const ::c_void, + needlelen: ::size_t, + ) -> *mut ::c_void; ++ ++ // link.h ++ ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + #[link(name = "util")] +--- vendor/libc-0.2.79/src/unix/bsd/netbsdlike/openbsd/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc-0.2.79/src/unix/bsd/netbsdlike/openbsd/mod.rs +@@ -16,6 +16,36 @@ pub type pthread_rwlock_t = *mut ::c_void; + pub type pthread_rwlockattr_t = *mut ::c_void; + pub type caddr_t = *mut ::c_char; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ + s! { + pub struct glob_t { + pub gl_pathc: ::size_t, +@@ -321,6 +351,38 @@ s! { + __shm_ctimensec: c_long, + pub shm_internal: *mut ::c_void, + } ++ ++ // elf.h ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ } + } + + impl siginfo_t { +@@ -1482,6 +1544,17 @@ extern "C" { + needle: *const ::c_void, + needlelen: ::size_t, + ) -> *mut ::c_void; ++ // #include ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + cfg_if! { +--- vendor/libc/src/unix/bsd/freebsdlike/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc/src/unix/bsd/freebsdlike/mod.rs +@@ -14,6 +14,38 @@ pub type nl_item = ::c_int; + pub type id_t = i64; + pub type vm_size_t = ::uintptr_t; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ ++// link.h ++ + #[cfg_attr(feature = "extra_traits", derive(Debug))] + pub enum timezone {} + impl ::Copy for timezone {} +@@ -233,6 +265,43 @@ s! { + pub piod_addr: *mut ::c_void, + pub piod_len: ::size_t, + } ++ ++ // elf.h ++ ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ pub dlpi_adds: ::c_ulonglong, ++ pub dlpi_subs: ::c_ulonglong, ++ pub dlpi_tls_modid: usize, ++ pub dlpi_tls_data: *mut ::c_void, ++ } + } + + s_no_extra_traits! { +@@ -1514,6 +1583,18 @@ extern "C" { + + pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; ++ ++ // #include ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + #[link(name = "rt")] +--- vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs +@@ -11,6 +11,36 @@ pub type vm_size_t = ::uintptr_t; + pub type lwpid_t = ::c_uint; + pub type shmatt_t = ::c_uint; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ + impl siginfo_t { + pub unsafe fn si_value(&self) -> ::sigval { + #[repr(C)] +@@ -341,6 +371,42 @@ s! { + pub time_state: ::c_int, + } + ++ // elf.h ++ ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ pub dlpi_adds: ::c_ulonglong, ++ pub dlpi_subs: ::c_ulonglong, ++ pub dlpi_tls_modid: usize, ++ pub dlpi_tls_data: *mut ::c_void, ++ } + } + + s_no_extra_traits! { +@@ -2002,6 +2068,19 @@ extern "C" { + needle: *const ::c_void, + needlelen: ::size_t, + ) -> *mut ::c_void; ++ ++ // link.h ++ ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + #[link(name = "util")] +--- vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs.orig 2021-02-10 18:18:38 UTC ++++ vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs +@@ -16,6 +16,36 @@ pub type pthread_rwlock_t = *mut ::c_void; + pub type pthread_rwlockattr_t = *mut ::c_void; + pub type caddr_t = *mut ::c_char; + ++// elf.h ++ ++pub type Elf32_Addr = u32; ++pub type Elf32_Half = u16; ++pub type Elf32_Lword = u64; ++pub type Elf32_Off = u32; ++pub type Elf32_Sword = i32; ++pub type Elf32_Word = u32; ++ ++pub type Elf64_Addr = u64; ++pub type Elf64_Half = u16; ++pub type Elf64_Lword = u64; ++pub type Elf64_Off = u64; ++pub type Elf64_Sword = i32; ++pub type Elf64_Sxword = i64; ++pub type Elf64_Word = u32; ++pub type Elf64_Xword = u64; ++ ++cfg_if! { ++ if #[cfg(target_pointer_width = "64")] { ++ type Elf_Addr = Elf64_Addr; ++ type Elf_Half = Elf64_Half; ++ type Elf_Phdr = Elf64_Phdr; ++ } else if #[cfg(target_pointer_width = "32")] { ++ type Elf_Addr = Elf32_Addr; ++ type Elf_Half = Elf32_Half; ++ type Elf_Phdr = Elf32_Phdr; ++ } ++} ++ + s! { + pub struct glob_t { + pub gl_pathc: ::size_t, +@@ -321,6 +351,38 @@ s! { + __shm_ctimensec: c_long, + pub shm_internal: *mut ::c_void, + } ++ ++ // elf.h ++ pub struct Elf32_Phdr { ++ pub p_type: Elf32_Word, ++ pub p_offset: Elf32_Off, ++ pub p_vaddr: Elf32_Addr, ++ pub p_paddr: Elf32_Addr, ++ pub p_filesz: Elf32_Word, ++ pub p_memsz: Elf32_Word, ++ pub p_flags: Elf32_Word, ++ pub p_align: Elf32_Word, ++ } ++ ++ pub struct Elf64_Phdr { ++ pub p_type: Elf64_Word, ++ pub p_flags: Elf64_Word, ++ pub p_offset: Elf64_Off, ++ pub p_vaddr: Elf64_Addr, ++ pub p_paddr: Elf64_Addr, ++ pub p_filesz: Elf64_Xword, ++ pub p_memsz: Elf64_Xword, ++ pub p_align: Elf64_Xword, ++ } ++ ++ // link.h ++ ++ pub struct dl_phdr_info { ++ pub dlpi_addr: Elf_Addr, ++ pub dlpi_name: *const ::c_char, ++ pub dlpi_phdr: *const Elf_Phdr, ++ pub dlpi_phnum: Elf_Half, ++ } + } + + impl siginfo_t { +@@ -1482,6 +1544,17 @@ extern "C" { + needle: *const ::c_void, + needlelen: ::size_t, + ) -> *mut ::c_void; ++ // #include ++ pub fn dl_iterate_phdr( ++ callback: ::Option< ++ unsafe extern "C" fn( ++ info: *mut dl_phdr_info, ++ size: usize, ++ data: *mut ::c_void, ++ ) -> ::c_int, ++ >, ++ data: *mut ::c_void, ++ ) -> ::c_int; + } + + cfg_if! { Property changes on: head/lang/rust/files/patch-backtrace ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/lang/rust/files/patch-src_bootstrap_install.rs =================================================================== --- head/lang/rust/files/patch-src_bootstrap_install.rs (nonexistent) +++ head/lang/rust/files/patch-src_bootstrap_install.rs (revision 569007) @@ -0,0 +1,17 @@ +Only install docs for the host target + +It otherwise wastes significant time (there are a lot of individual +files) and stages host docs, wasm docs, which unstages the host +docs first. + +--- src/bootstrap/install.rs.orig 2021-03-22 17:05:25 UTC ++++ src/bootstrap/install.rs +@@ -133,7 +133,7 @@ macro_rules! install { + } + + install!((self, builder, _config), +- Docs, "src/doc", _config.docs, only_hosts: false, { ++ Docs, "src/doc", _config.docs, only_hosts: true, { + let tarball = builder.ensure(dist::Docs { host: self.target }).expect("missing docs"); + install_sh(builder, "docs", self.compiler.stage, Some(self.target), &tarball); + }; Property changes on: head/lang/rust/files/patch-src_bootstrap_install.rs ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/rust-bootstrap/Makefile =================================================================== --- head/lang/rust-bootstrap/Makefile (revision 569006) +++ head/lang/rust-bootstrap/Makefile (revision 569007) @@ -1,240 +1,241 @@ # $FreeBSD$ PORTNAME= rust PORTVERSION= 1.50.0 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:rust \ LOCAL/mikael:armbase \ LOCAL/mikael:base \ LOCAL/bdragon:ppc64lebase \ https://download.freebsd.org/ftp/${_RUST_FBSD_SUBDIR_${FLAVOR}}/:base \ LOCAL/mikael:powerpc64_gcc # http://pkg.freebsd.org/FreeBSD:12:powerpc64/quarterly/All/gcc9-9.3.0_1.txz?dummy=/:powerpc64_gcc PKGNAMESUFFIX= -bootstrap DISTNAME= ${PORTNAME}c-${PORTVERSION}-src DISTFILES= rust/${DISTNAME}${EXTRACT_SUFX}:rust \ ${_RUST_FBSD_DIST_${FLAVOR}} MAINTAINER= rust@FreeBSD.org COMMENT= Create bootstrap compilers for building lang/rust LICENSE= APACHE20 MIT LICENSE_COMB= dual LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= untested on other archs BUILD_DEPENDS= cmake:devel/cmake \ gmake:devel/gmake \ ninja:devel/ninja \ rust>=${PORTVERSION}:lang/rust FLAVORS= aarch64 amd64 armv6 armv7 i386 powerpc64_elfv1 powerpc64_elfv2 powerpc64le FLAVOR?= ${FLAVORS:[1]} aarch64_PKGNAMEPREFIX= aarch64- amd64_PKGNAMEPREFIX= amd64- armv6_PKGNAMEPREFIX= armv6- armv7_PKGNAMEPREFIX= armv7- i386_PKGNAMEPREFIX= i386- powerpc64_elfv1_PKGNAMEPREFIX= powerpc64-elfv1- powerpc64_elfv1_BUILD_DEPENDS= powerpc64-gcc9>0:devel/freebsd-gcc9@powerpc64 powerpc64_elfv2_PKGNAMEPREFIX= powerpc64-elfv2- powerpc64le_PKGNAMEPREFIX= powerpc64le- USES= perl5 python:3.6+,build tar:xz .if ${FLAVOR} == powerpc64_elfv1 USE_GCC= 9:build .endif # for openssl-src crate USE_PERL5= build PATCHDIR= ${.CURDIR}/../rust/files # Resulting packages are not specific to amd64 NO_ARCH= yes _RUST_FBSD_DIST_aarch64= FreeBSD-${_RUST_FBSD_VER}-arm64${EXTRACT_SUFX}:base _RUST_FBSD_DIST_amd64= FreeBSD-${_RUST_FBSD_VER}-amd64${EXTRACT_SUFX}:base # base.txz for armv* created from WANDBOARD images as there seem # to be no generic base.txz for it. _RUST_FBSD_DIST_armv6= FreeBSD-${_RUST_FBSD_VER}-arm-armv6${EXTRACT_SUFX}:armbase _RUST_FBSD_DIST_armv7= FreeBSD-${_RUST_FBSD_VER}-arm-armv7${EXTRACT_SUFX}:armbase _RUST_FBSD_DIST_i386= FreeBSD-${_RUST_FBSD_VER}-i386${EXTRACT_SUFX}:base _RUST_FBSD_DIST_powerpc64_elfv1= FreeBSD-${_RUST_FBSD_VER}-powerpc64-elfv1${EXTRACT_SUFX}:base \ FreeBSD-${_RUST_FBSD_VER}-powerpc64-elfv1-gcc9-9.3.0${EXTRACT_SUFX}:powerpc64_gcc _RUST_FBSD_DIST_powerpc64_elfv2= FreeBSD-${_RUST_FBSD_VER}-powerpc64-elfv2-v1300123${EXTRACT_SUFX}:base _RUST_FBSD_DIST_powerpc64le= FreeBSD-${_RUST_FBSD_VER}-powerpc64le-r366300${EXTRACT_SUFX}:ppc64lebase _RUST_FBSD_VER= ${_RUST_FBSD_VER_${FLAVOR}:U11.4-RELEASE} _RUST_FBSD_VER_aarch64= 12.2-RELEASE _RUST_FBSD_VER_armv7= 12.2-RELEASE _RUST_FBSD_VER_powerpc64_elfv1= 12.2-RELEASE _RUST_FBSD_VER_powerpc64_elfv2= 13.0-CURRENT _RUST_FBSD_VER_powerpc64le= 13.0-CURRENT _RUST_FBSD_SUBDIR_aarch64= releases/arm64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_amd64= releases/amd64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_i386= releases/i386/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_powerpc64_elfv1= releases/powerpc/powerpc64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_powerpc64_elfv2= snapshots/powerpc/powerpc64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_powerpc64le= snapshots/powerpc/powerpc64le/${_RUST_FBSD_VER}/base.txz?dummy= _CARGO_VENDOR_DIR= ${WRKSRC}/vendor _RUST_ARCH_amd64= x86_64 _RUST_ARCH_i386= i686 _RUST_ARCH_powerpc64_elfv1= powerpc64 _RUST_ARCH_powerpc64_elfv2= powerpc64 _RUST_ARCH_powerpc64le= powerpc64le _RUST_HOST= ${_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl} _RUST_TARGET= ${_RUST_ARCH_${FLAVOR}:U${FLAVOR}}-unknown-${OPSYS:tl} _RUST_LLVM_TARGET= ${_RUST_LLVM_TARGET_${FLAVOR}} _RUST_LLVM_TARGET_aarch64= AArch64 _RUST_LLVM_TARGET_amd64= X86 _RUST_LLVM_TARGET_armv6= ARM _RUST_LLVM_TARGET_armv7= ARM _RUST_LLVM_TARGET_i386= X86 _RUST_LLVM_TARGET_powerpc64_elfv1= PowerPC _RUST_LLVM_TARGET_powerpc64_elfv2= PowerPC _RUST_LLVM_TARGET_powerpc64le= PowerPC _RUST_LLVM_TRIPLE= ${_RUST_LLVM_TRIPLE_${FLAVOR}:U${_RUST_TARGET}} _RUST_LLVM_TRIPLE_armv6= armv6-gnueabihf-freebsd _RUST_LLVM_TRIPLE_armv7= armv7-gnueabihf-freebsd .include .if ${OPSYS} != FreeBSD IGNORE= is only for FreeBSD .elif ${OSVERSION} < 1200502 IGNORE= will not build on 12.0 due to old toolchain; 11.x untested .endif .if ${FLAVOR} == powerpc64le && ${OSVERSION} < 1300116 IGNORE= will not build on 12.x due to old system .endif .if exists(${PATCHDIR}/${FLAVOR:S/_/-/}) EXTRA_PATCHES+= ${PATCHDIR}/${FLAVOR:S/_/-/} .endif post-patch: # Disable vendor checksums @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ ${_CARGO_VENDOR_DIR}/*/.cargo-checksum.json .if ${FLAVOR} == powerpc64_elfv1 @${REINPLACE_CMD} -e 's,"c++","stdc++",g' \ ${WRKSRC}/compiler/rustc_llvm/build.rs .endif @${REINPLACE_CMD} -e 's,%CC%,${CC},g' \ -e 's,%WRKDIR%,${WRKDIR},g' \ ${WRKSRC}/compiler/rustc_llvm/build.rs \ ${WRKSRC}/src/bootstrap/native.rs do-configure: # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh @${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'extended=false' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'docs=false' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cargo-native-static=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cargo="${LOCALBASE}/bin/cargo"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'rustc="${LOCALBASE}/bin/rustc"' >> ${WRKSRC}/config.toml .if ${_RUST_HOST} != ${_RUST_TARGET} @${ECHO_CMD} 'host=["${_RUST_HOST}","${_RUST_TARGET}"]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'target=["${_RUST_TARGET}"]' >> ${WRKSRC}/config.toml .endif @${ECHO_CMD} '[rust]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'channel="stable"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'default-linker="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'deny-warnings=false' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'link-shared=false' >> ${WRKSRC}/config.toml .if ${FLAVOR} == powerpc64_elfv1 @${ECHO_CMD} 'static-libstdcpp=true' >> ${WRKSRC}/config.toml .endif .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 # https://github.com/rust-lang/rust/pull/72696#issuecomment-641517185 @${ECHO_CMD} 'ldflags="-lz"' >> ${WRKSRC}/config.toml # we need to make sure to always build llvm with X86 support to get a # host compiler that can build the host->target compiler @${ECHO_CMD} 'targets="${_RUST_LLVM_TARGET};X86"' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[target.${_RUST_TARGET}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cc="${WRKDIR}/${_RUST_TARGET}-cc"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${WRKDIR}/${_RUST_TARGET}-c++"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'linker="${WRKDIR}/${_RUST_TARGET}-cc"' >> ${WRKSRC}/config.toml .for _key _util in ar ${AR} ranlib ${RANLIB} @bin="$$(which ${_util})"; \ ${ECHO_CMD} "${_key}=\"$$bin\"" >> ${WRKSRC}/config.toml .endfor .if ${_RUST_HOST} != ${_RUST_TARGET} @${ECHO_CMD} '[target.${_RUST_HOST}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml .endif @${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml .if ${FLAVOR} == powerpc64_elfv1 @${RLN} ${WRKDIR}${LOCALBASE}/lib/gcc9/libstdc++.a ${WRKDIR}/usr/lib/libstdc++.a @${RLN} ${WRKDIR}${LOCALBASE}/lib/gcc9/libstdc++.a ${WRKDIR}/usr/lib/libc++.a @gcc="$$(${ECHO_CMD} ${LOCALBASE}/bin/${_RUST_TARGET}*[0-9]-gcc9)"; \ ${PRINTF} '#!/bin/sh\nexec %s --sysroot=${WRKDIR} -Wl,-rpath=${LOCALBASE}/lib/gcc9 -L${WRKDIR}${LOCALBASE}/lib/gcc9 "$$@"\n' "$${gcc}" \ > ${WRKDIR}/${_RUST_TARGET}-cc @gcc="$$(${ECHO_CMD} ${LOCALBASE}/bin/${_RUST_TARGET}*[0-9]-g++9)"; \ cxxinc="/$$(cd ${WRKDIR} && ${ECHO_CMD} ${LOCALBASE:S,^/,,}/lib/gcc9/include/c++/powerpc64-*)"; \ ${PRINTF} '#!/bin/sh\nexec %s --sysroot=${WRKDIR} -isystem=${LOCALBASE}/lib/gcc9/include/c++ -isystem=%s -Wl,-rpath=${LOCALBASE}/lib/gcc9 -L${WRKDIR}${LOCALBASE}/lib/gcc9 "$$@"\n' "$${gcc}" "$${cxxinc}" \ > ${WRKDIR}/${_RUST_TARGET}-c++ .elif ${FLAVOR} == powerpc64_elfv2 @${PRINTF} '#!/bin/sh\nexec ${CC} --sysroot=${WRKDIR} -mabi=elfv2 --target=${_RUST_LLVM_TRIPLE} "$$@"\n' \ > ${WRKDIR}/${_RUST_TARGET}-cc @${PRINTF} '#!/bin/sh\nexec ${CXX} --sysroot=${WRKDIR} -mabi=elfv2 --target=${_RUST_LLVM_TRIPLE} -stdlib=libc++ "$$@"\n' \ > ${WRKDIR}/${_RUST_TARGET}-c++ .else @${PRINTF} '#!/bin/sh\nexec ${CC} --sysroot=${WRKDIR} --target=${_RUST_LLVM_TRIPLE} "$$@"\n' \ > ${WRKDIR}/${_RUST_TARGET}-cc @${PRINTF} '#!/bin/sh\nexec ${CXX} --sysroot=${WRKDIR} --target=${_RUST_LLVM_TRIPLE} -stdlib=libc++ "$$@"\n' \ > ${WRKDIR}/${_RUST_TARGET}-c++ .endif @${CHMOD} +x ${WRKDIR}/${_RUST_TARGET}-c* # sanity check cross compilers. we cannot execute the result but # at least check that it can link a simple program before going further. @${PRINTF} '#include \nint main(){return printf("hello\\n");}' | ${WRKDIR}/${_RUST_TARGET}-cc -o ${WRKDIR}/test-c -xc - # produce some useful info for the build logs like what release/arch test-c is compiled for @cd ${WRKDIR} && ${FILE} test-c && ${READELF} -A test-c @${PRINTF} '#include \nint main(){std::cout<<"hello"<> ${TMPPLIST} .if !defined(_RUST_MAKESUM_GUARD) makesum: ${MAKE} -D_RUST_MAKESUM_GUARD makesum FLAVOR=${FLAVORS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp .for _flavor in ${FLAVORS:O:[2..-1]} ${MAKE} -D_RUST_MAKESUM_GUARD makesum FLAVOR=${_flavor} DISTINFO_FILE=${DISTINFO_FILE}.${_flavor} ${SED} 1d ${DISTINFO_FILE}.${_flavor} >> ${DISTINFO_FILE}.tmp ${RM} ${DISTINFO_FILE}.${_flavor} .endfor ${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE} ${RM} ${DISTINFO_FILE}.tmp .endif .include