Index: head/Mk/Uses/cargo.mk =================================================================== --- head/Mk/Uses/cargo.mk (revision 569488) +++ head/Mk/Uses/cargo.mk (revision 569489) @@ -1,338 +1,338 @@ # $FreeBSD$ # # This file contains logic to ease porting of Rust packages or # binaries using the `cargo` command. # # Feature: cargo # Usage: USES=cargo # Valid ARGS: none # # MAINTAINER: rust@FreeBSD.org .if !defined(_INCLUDE_USES_CARGO_MK) _INCLUDE_USES_CARGO_MK= yes .if !empty(cargo_ARGS) IGNORE+= USES=cargo takes no arguments .endif # List of static dependencies. The format is cratename-version. # CARGO_CRATES will be downloaded from MASTER_SITES_CRATESIO. CARGO_CRATES?= # List of features to build (space separated list). # Use special token --no-default-features to disable default # features by passing it to cargo build/install/test. CARGO_FEATURES?= # Name of the local directory for vendoring crates. CARGO_VENDOR_DIR?= ${WRKSRC}/cargo-crates # Default path for cargo manifest. CARGO_CARGOTOML?= ${WRKSRC}/Cargo.toml CARGO_CARGOLOCK?= ${WRKSRC}/Cargo.lock # Save crates inside ${DISTDIR}/rust/crates by default. CARGO_DIST_SUBDIR?= rust/crates # Generate list of DISTFILES. .for _crate in ${CARGO_CRATES} MASTER_SITES+= CRATESIO/${_crate:C/^([-_a-zA-Z0-9]+)-[0-9].*/\1/}/${_crate:C/^[-_a-zA-Z0-9]+-([0-9].*)/\1/}:cargo_${_crate:C/[^a-zA-Z0-9_]//g} DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}.tar.gz:cargo_${_crate:C/[^a-zA-Z0-9_]//g} .endfor # Build dependencies. CARGO_BUILDDEP?= yes .if ${CARGO_BUILDDEP:tl} == "yes" -BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.50.0:lang/${RUST_DEFAULT} +BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.51.0:lang/${RUST_DEFAULT} .endif # Location of cargo binary (default to lang/rust's Cargo binary) CARGO_CARGO_BIN?= ${LOCALBASE}/bin/cargo # Location of the cargo output directory. CARGO_TARGET_DIR?= ${WRKDIR}/target # Environment for cargo # - CARGO_HOME: local cache of the registry index # - CARGO_BUILD_JOBS: configure number of jobs to run # - CARGO_TARGET_DIR: location of where to place all generated artifacts # - RUST_BACKTRACE: produce backtraces when something in the build panics # - RUSTC: path of rustc binary (default to lang/rust) # - RUSTDOC: path of rustdoc binary (default to lang/rust) # - RUSTFLAGS: custom flags to pass to all compiler invocations that Cargo performs CARGO_ENV+= \ CARGO_HOME=${WRKDIR}/cargo-home \ CARGO_BUILD_JOBS=${MAKE_JOBS_NUMBER} \ CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \ RUST_BACKTRACE=1 \ RUSTC=${LOCALBASE}/bin/rustc \ RUSTDOC=${LOCALBASE}/bin/rustdoc \ RUSTFLAGS="${RUSTFLAGS} -C linker=${CC:Q} ${LDFLAGS:C/.+/-C link-arg=&/}" # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk .if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} .elif ${ARCH:Mpowerpc64*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} .else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 USE_GCC?= yes .endif # Helper to shorten cargo calls. CARGO_CARGO_RUN= \ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \ ${CARGO_CARGO_BIN} # User arguments for cargo targets. CARGO_BUILD_ARGS?= CARGO_INSTALL_ARGS?= CARGO_INSTALL_PATH?= . CARGO_TEST_ARGS?= CARGO_UPDATE_ARGS?= # Use module targets ? CARGO_BUILD?= yes CARGO_CONFIGURE?= yes CARGO_INSTALL?= yes CARGO_TEST?= yes # Set CARGO_USE_GIT{HUB,LAB} to yes if your application requires # some dependencies from git repositories hosted on GitHub or # GitLab instances. All Cargo.toml files will be patched to point # to the right offline sources based on what is defined in # {GH,GL}_TUPLE. This makes sure that cargo does not attempt to # access the network during the build. CARGO_USE_GITHUB?= no CARGO_USE_GITLAB?= no # Manage crate features. .if !empty(CARGO_FEATURES:M--no-default-features) CARGO_BUILD_ARGS+= --no-default-features CARGO_INSTALL_ARGS+= --no-default-features CARGO_TEST_ARGS+= --no-default-features .endif .if !empty(CARGO_FEATURES:N--no-default-features) CARGO_BUILD_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_INSTALL_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_TEST_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' .endif .if !defined(WITH_DEBUG) CARGO_BUILD_ARGS+= --release CARGO_TEST_ARGS+= --release .else CARGO_INSTALL_ARGS+= --debug .endif .if ${CARGO_CRATES:Mcmake-[0-9]*} BUILD_DEPENDS+= cmake:devel/cmake .endif .if ${CARGO_CRATES:Mgettext-sys-[0-9]*} CARGO_ENV+= GETTEXT_BIN_DIR=${LOCALBASE}/bin \ GETTEXT_INCLUDE_DIR=${LOCALBASE}/include \ GETTEXT_LIB_DIR=${LOCALBASE}/lib .endif .if ${CARGO_CRATES:Mjemalloc-sys-[0-9]*} BUILD_DEPENDS+= gmake:devel/gmake .endif .for libc in ${CARGO_CRATES:Mlibc-[0-9]*} # FreeBSD 12.0 changed ABI: r318736 and r320043 # https://github.com/rust-lang/libc/commit/78f93220d70e # https://github.com/rust-lang/libc/commit/969ad2b73cdc _libc_VER= ${libc:C/.*-//} . if ${_libc_VER:R:R} == 0 && (${_libc_VER:R:E} < 2 || ${_libc_VER:R:E} == 2 && ${_libc_VER:E} < 38) DEV_ERROR+= "CARGO_CRATES=${libc} may be unstable on FreeBSD 12.0. Consider updating to the latest version \(higher than 0.2.37\)." . endif . if ${_libc_VER:R:R} == 0 && (${_libc_VER:R:E} < 2 || ${_libc_VER:R:E} == 2 && ${_libc_VER:E} < 49) DEV_ERROR+= "CARGO_CRATES=${libc} may be unstable on aarch64 or not build on armv6, armv7, powerpc64. Consider updating to the latest version \(higher than 0.2.49\)." . endif .undef _libc_VER .endfor .if ${CARGO_CRATES:Mlibgit2-sys-[0-9]*} # Use the system's libgit2 instead of building the bundled version CARGO_ENV+= LIBGIT2_SYS_USE_PKG_CONFIG=1 .endif .if ${CARGO_CRATES:Mlibssh2-sys-[0-9]*} # Use the system's libssh2 instead of building the bundled version CARGO_ENV+= LIBSSH2_SYS_USE_PKG_CONFIG=1 .endif .if ${CARGO_CRATES:Monig_sys-[0-9]*} # onig_sys always prefers the system library but will try to link # statically with it. Since devel/oniguruma doesn't provide a static # library it'll link to libonig.so instead. Strictly speaking setting # RUSTONIG_SYSTEM_LIBONIG is not necessary, but will force onig_sys to # always use the system's libonig as returned by `pkg-config oniguruma`. CARGO_ENV+= RUSTONIG_SYSTEM_LIBONIG=1 .endif .if ${CARGO_CRATES:Mopenssl-0.[0-9].*} # FreeBSD 12.0 updated base OpenSSL in r339270: # https://github.com/sfackler/rust-openssl/commit/276577553501 . if !exists(${PATCHDIR}/patch-openssl-1.1.1) # skip if backported _openssl_VER= ${CARGO_CRATES:Mopenssl-0.[0-9].*:C/.*-//} . if ${_openssl_VER:R:R} == 0 && (${_openssl_VER:R:E} < 10 || ${_openssl_VER:R:E} == 10 && ${_openssl_VER:E} < 4) DEV_WARNING+= "CARGO_CRATES=openssl-0.10.3 or older do not support OpenSSL 1.1.1. Consider updating to the latest version." . endif . endif .undef _openssl_VER .endif .if ${CARGO_CRATES:Mopenssl-src-[0-9]*} DEV_WARNING+= "Please make sure this port uses the system OpenSSL and consider removing CARGO_CRATES=${CARGO_CRATES:Mopenssl-src-[0-9]*} (a vendored copy of OpenSSL) from the build, e.g., by patching Cargo.toml appropriately." .endif .if ${CARGO_CRATES:Mopenssl-sys-[0-9]*} # Make sure that openssl-sys can find the correct version of OpenSSL CARGO_ENV+= OPENSSL_LIB_DIR=${OPENSSLLIB} \ OPENSSL_INCLUDE_DIR=${OPENSSLINC} .endif .if ${CARGO_CRATES:Mpkg-config-[0-9]*} .include "${USESDIR}/pkgconfig.mk" .endif _USES_extract+= 600:cargo-extract cargo-extract: # target for preparing crates directory. It will put all crates in # the local crates directory. @${ECHO_MSG} "===> Moving crates to ${CARGO_VENDOR_DIR}" @${MKDIR} ${CARGO_VENDOR_DIR} .for _crate in ${CARGO_CRATES} @${MV} ${WRKDIR}/${_crate} ${CARGO_VENDOR_DIR}/${_crate} @${PRINTF} '{"package":"%s","files":{}}' \ $$(${SHA256} -q ${DISTDIR}/${CARGO_DIST_SUBDIR}/${_crate}.tar.gz) \ > ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json @if [ -r ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig ]; then \ ${MV} ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig \ ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig-cargo; \ fi .endfor _CARGO_GIT_PATCH_CARGOTOML= .if ${CARGO_USE_GITHUB:tl} == "yes" . for _group in ${GH_TUPLE:C@^[^:]*:[^:]*:[^:]*:(([^:/]*)?)((/.*)?)@\2@} . if empty(CARGO_GIT_SUBDIR:M${_group}\:*) _CARGO_GIT_PATCH_CARGOTOML:= ${_CARGO_GIT_PATCH_CARGOTOML} \ -e "s@git = ['\"](https|http|git)://github.com/${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}(\.git)?/?[\"']@path = \"${WRKSRC_${_group}}\"@" . else . for _group2 _crate _subdir in ${CARGO_GIT_SUBDIR:M${_group}\:*:S,:, ,g} _CARGO_GIT_PATCH_CARGOTOML:= ${_CARGO_GIT_PATCH_CARGOTOML} \ -e "/^${_crate} =/ s@git = ['\"](https|http|git)://github.com/${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}(\.git)?/?[\"']@path = \"${WRKSRC_${_group}}/${_subdir}\"@" . endfor . endif . endfor .endif .if ${CARGO_USE_GITLAB:tl} == "yes" . for _group in ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\8@:S/^://} . if empty(CARGO_GIT_SUBDIR:M${_group}\:*) _CARGO_GIT_PATCH_CARGOTOML:= ${_CARGO_GIT_PATCH_CARGOTOML} \ -e "s@git = ['\"]${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}(\.git)?/?['\"]@path = \"${WRKSRC_${_group}}\"@" . else . for _group2 _crate _subdir in ${CARGO_GIT_SUBDIR:M${_group}\:*:S,:, ,g} _CARGO_GIT_PATCH_CARGOTOML:= ${_CARGO_GIT_PATCH_CARGOTOML} \ -e "/^${_crate} = / s@git = ['\"]${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}(\.git)?/?['\"]@path = \"${WRKSRC_${_group}}/${_subdir}\"@" . endfor . endif . endfor .endif .if !empty(_CARGO_GIT_PATCH_CARGOTOML) _USES_patch+= 600:cargo-patch-git cargo-patch-git: @${FIND} ${WRKDIR} -name Cargo.toml -type f -exec \ ${SED} -i.dist -E ${_CARGO_GIT_PATCH_CARGOTOML} {} + .endif .if ${CARGO_CONFIGURE:tl} == "yes" _USES_configure+= 250:cargo-configure # configure hook. Place a config file for overriding crates-io index # by local source directory. cargo-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 @${MKDIR} ${WRKDIR}/.cargo @${ECHO_CMD} "[source.cargo]" > ${WRKDIR}/.cargo/config @${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config @${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config @${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config @if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \ ${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "opt-level = 2" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "debug = false" >> ${CARGO_CARGOTOML}; \ fi @${CARGO_CARGO_RUN} update \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ ${CARGO_UPDATE_ARGS} .endif .if !target(do-build) && ${CARGO_BUILD:tl} == "yes" do-build: @${CARGO_CARGO_RUN} build \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ ${CARGO_BUILD_ARGS} .endif .if !target(do-install) && ${CARGO_INSTALL:tl} == "yes" do-install: . for path in ${CARGO_INSTALL_PATH} @${CARGO_CARGO_RUN} install \ --no-track \ --path "${path}" \ --root "${STAGEDIR}${PREFIX}" \ --verbose \ ${CARGO_INSTALL_ARGS} . endfor .endif .if !target(do-test) && ${CARGO_TEST:tl} == "yes" do-test: @${CARGO_CARGO_RUN} test \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ ${CARGO_TEST_ARGS} .endif # # Helper targets for port maintainers # # cargo-crates will output the crates list from Cargo.lock. If there # is no Cargo.lock for some reason, try and generate it first. cargo-crates: extract @if [ ! -r "${CARGO_CARGOLOCK}" ]; then \ ${ECHO_MSG} "===> ${CARGO_CARGOLOCK} not found. Trying to generate it..."; \ ${CARGO_CARGO_RUN} generate-lockfile \ --manifest-path ${CARGO_CARGOTOML} \ --verbose; \ fi @${SETENV} USE_GITHUB=${USE_GITHUB} USE_GITLAB=${USE_GITLAB} GL_SITE=${GL_SITE} \ ${AWK} -f ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} # cargo-crates-licenses will try to grab license information from # all downloaded crates. cargo-crates-licenses: configure @${FIND} ${CARGO_VENDOR_DIR} -name 'Cargo.toml' -maxdepth 2 \ -exec ${GREP} -H '^license' {} \; \ | ${SED} \ -e 's@^${CARGO_VENDOR_DIR}/@@' \ -e 's@/Cargo.toml:license.*= *"@|@' \ -e 's@"$$@@g' | sort | /usr/bin/column -t -s '|' .endif Index: head/Mk/bsd.gecko.mk =================================================================== --- head/Mk/bsd.gecko.mk (revision 569488) +++ head/Mk/bsd.gecko.mk (revision 569489) @@ -1,400 +1,400 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Date created: 12 Nov 2005 # Whom: Michael Johnson # # $FreeBSD$ # # 4 column tabs prevent hair loss and tooth decay! # bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users # and porters to support any available gecko backend without needing to build # many conditional tests. ${USE_GECKO} is the list of backends that your port # can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend. # Users set ${WITH_GECKO} to the list of gecko backends they want on their # system. .if defined(USE_GECKO) .if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) Gecko_Pre_Include= bsd.gecko.mk # This file contains some reusable components for mozilla ports. It's of # use primarily to apps from the mozilla project itself (such as Firefox, # Thunderbird, etc.), and probably won't be of use for gecko-based ports # like epiphany, galeon, etc. # # You need to make sure to add USE_GECKO=gecko to for your port can uses # one of these options below. # # Ports can use the following: # # USE_MOZILLA By default, it enables every system dependency # listed in '_ALL_DEPENDS'. If your port doesn't # need one of those then you can use '-' like # 'USE_MOZILLA= -png -vpx' to subtract the # dependencies. Experimental deps use '+' like # 'USE_MOZILLA= +speex +theora'. # # MOZILLA_PLIST_DIRS List of directories to descend into when installing # and creating the plist # # MOZ_OPTIONS configure arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # CONFIGURE_ARGS+=${MOZ_OPTIONS} # # MOZ_MK_OPTIONS The make(1) arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # MAKE_ARGS+=${MOZ_MK_OPTIONS} # # MOZ_EXPORT Environment variables for the build process (added # to .mozconfig). If NOMOZCONFIG is defined, you # probably want to set MAKE_ENV+=${MOZ_EXPORT} # # NOMOZCONFIG Don't drop a customized .mozconfig into the build # directory. Options will have to be specified in # CONFIGURE_ARGS instead # MAINTAINER?= gecko@FreeBSD.org MOZILLA?= ${PORTNAME} MOZILLA_VER?= ${PORTVERSION} MOZILLA_BIN?= ${PORTNAME}-bin MOZILLA_EXEC_NAME?=${MOZILLA} USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \ python:3.6+,build desktop-file-utils CPE_VENDOR?=mozilla USE_GL= gl USE_GNOME= cairo gdkpixbuf2 gtk20 gtk30 USE_PERL5= build USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt HAS_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes LDFLAGS+= -Wl,--as-needed BINARY_ALIAS+= python3=${PYTHON_CMD} BUNDLE_LIBS= yes BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \ rust-cbindgen>=0.16.0:devel/rust-cbindgen \ - ${RUST_DEFAULT}>=1.50:lang/${RUST_DEFAULT} \ + ${RUST_DEFAULT}>=1.51.0:lang/${RUST_DEFAULT} \ node:www/node LIB_DEPENDS+= libdrm.so:graphics/libdrm MOZ_EXPORT+= ${CONFIGURE_ENV} \ PERL="${PERL}" \ PYTHON3="${PYTHON_CMD}" \ RUSTFLAGS="${RUSTFLAGS}" MOZ_OPTIONS+= --prefix="${PREFIX}" MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}" MOZ_OPTIONS+= --with-libclang-path="${LOCALBASE}/llvm${LLVM_DEFAULT}/lib" .if !exists(/usr/bin/llvm-objdump) MOZ_EXPORT+= LLVM_OBJDUMP="${LOCALBASE}/bin/llvm-objdump${LLVM_DEFAULT}" .endif # Ignore Mk/bsd.default-versions.mk but respect make.conf(5) .if !defined(DEFAULT_VERSIONS) || ! ${DEFAULT_VERSIONS:Mllvm*} LLVM_DEFAULT= 11 # bump if not latest release .endif # Require newer Clang than what's in base system unless user opted out . if ${CC} == cc && ${CXX} == c++ && exists(/usr/lib/libc++.so) BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT} USES:= ${USES:Ncompiler\:*} # XXX avoid warnings . endif MOZSRC?= ${WRKSRC} PLISTF?= ${WRKDIR}/plist_files MOZCONFIG?= ${WRKSRC}/.mozconfig MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk .if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} .elif ${ARCH:Mpowerpc64*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} .else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif # Standard depends _ALL_DEPENDS= av1 event ffi graphite harfbuzz icu jpeg nspr nss png pixman sqlite vpx webp .if exists(${FILESDIR}/patch-bug1559213) av1_LIB_DEPENDS= libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d av1_MOZ_OPTIONS= --with-system-av1 .endif event_LIB_DEPENDS= libevent.so:devel/libevent event_MOZ_OPTIONS= --with-system-libevent ffi_LIB_DEPENDS= libffi.so:devel/libffi ffi_MOZ_OPTIONS= --enable-system-ffi .if exists(${FILESDIR}/patch-bug847568) graphite_LIB_DEPENDS= libgraphite2.so:graphics/graphite2 graphite_MOZ_OPTIONS= --with-system-graphite2 harfbuzz_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz .endif icu_LIB_DEPENDS= libicui18n.so:devel/icu icu_MOZ_OPTIONS= --with-system-icu --with-intl-api -jpeg_BUILD_DEPENDS=yasm:devel/yasm jpeg_USES= jpeg jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE} nspr_LIB_DEPENDS= libnspr4.so:devel/nspr nspr_MOZ_OPTIONS= --with-system-nspr nss_LIB_DEPENDS= libnss3.so:security/nss nss_MOZ_OPTIONS= --with-system-nss pixman_LIB_DEPENDS= libpixman-1.so:x11/pixman pixman_MOZ_OPTIONS= --enable-system-pixman png_LIB_DEPENDS= libpng.so:graphics/png png_MOZ_OPTIONS= --with-system-png=${LOCALBASE} sqlite_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite -vpx_BUILD_DEPENDS= yasm:devel/yasm vpx_LIB_DEPENDS= libvpx.so:multimedia/libvpx vpx_MOZ_OPTIONS= --with-system-libvpx webp_LIB_DEPENDS= libwebp.so:graphics/webp webp_MOZ_OPTIONS= --with-system-webp .for use in ${USE_MOZILLA} ${use:S/-/_WITHOUT_/}= ${TRUE} .endfor LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 .for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//} .if !defined(_WITHOUT_${dep}) BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS} LIB_DEPENDS+= ${${dep}_LIB_DEPENDS} RUN_DEPENDS+= ${${dep}_RUN_DEPENDS} USES+= ${${dep}_USES} MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS} .else BUILD_DEPENDS+= ${-${dep}_BUILD_DEPENDS} .endif .endfor # Standard options MOZ_OPTIONS+= \ --enable-update-channel=${PKGNAMESUFFIX:Urelease:S/^-//} \ --disable-updater \ --with-system-zlib # API keys from www/chromium # http://www.chromium.org/developers/how-tos/api-keys # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. MOZ_EXPORT+= MOZ_GOOGLE_LOCATION_SERVICE_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 MOZ_EXPORT+= MOZ_GOOGLE_SAFEBROWSING_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -O3 MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" MOZ_OPTIONS+= --enable-optimize .else MOZ_OPTIONS+= --disable-optimize . if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # ld 2.17 barfs on Stylo built with -C opt-level=0 USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin . endif .endif .if ${PORT_OPTIONS:MCANBERRA} RUN_DEPENDS+= libcanberra>0:audio/libcanberra .endif .if ${PORT_OPTIONS:MDBUS} BUILD_DEPENDS+= libnotify>0:devel/libnotify LIB_DEPENDS+= libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib .else MOZ_OPTIONS+= --disable-dbus .endif .if ${PORT_OPTIONS:MFFMPEG} # dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp RUN_DEPENDS+= ffmpeg>=0.8,1:multimedia/ffmpeg .endif .if ${PORT_OPTIONS:MLIBPROXY} LIB_DEPENDS+= libproxy.so:net/libproxy MOZ_OPTIONS+= --enable-libproxy .else MOZ_OPTIONS+= --disable-libproxy .endif .if ${PORT_OPTIONS:MLTO} .if ${ARCH} == powerpc64le MOZ_OPTIONS+= --enable-lto=thin .else MOZ_OPTIONS+= --enable-lto=cross .endif .endif .if ${PORT_OPTIONS:MALSA} BUILD_DEPENDS+= ${LOCALBASE}/include/alsa/asoundlib.h:audio/alsa-lib MOZ_OPTIONS+= --enable-alsa .endif .if ${PORT_OPTIONS:MJACK} BUILD_DEPENDS+= ${LOCALBASE}/include/jack/jack.h:audio/jack MOZ_OPTIONS+= --enable-jack .endif .if ${PORT_OPTIONS:MPULSEAUDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio MOZ_OPTIONS+= --enable-pulseaudio .else MOZ_OPTIONS+= --disable-pulseaudio .endif .if ${PORT_OPTIONS:MSNDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/sndio.h:audio/sndio post-patch-SNDIO-on: @${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \ -e '/DISABLE_LIBSNDIO_DLOPEN/d' \ ${MOZSRC}/media/libcubeb/src/moz.build .endif .if ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-debug --disable-release STRIP= # ports/184285 .else MOZ_OPTIONS+= --disable-debug --disable-debug-symbols --enable-release . if ${ARCH:Maarch64} || (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse2}) MOZ_OPTIONS+= --enable-rust-simd . endif .endif .if ${PORT_OPTIONS:MPROFILE} MOZ_OPTIONS+= --enable-profiling STRIP= .else MOZ_OPTIONS+= --disable-profiling .endif .if ${PORT_OPTIONS:MTEST} USE_XORG+= xscrnsaver MOZ_OPTIONS+= --enable-tests .else MOZ_OPTIONS+= --disable-tests .endif .if !defined(STRIP) || ${STRIP} == "" MOZ_OPTIONS+= --disable-strip --disable-install-strip .else MOZ_OPTIONS+= --enable-strip --enable-install-strip .endif # _MAKE_JOBS is only available after bsd.port.post.mk, thus cannot be # used in .mozconfig. And client.mk automatically uses -jN where N # is what multiprocessing.cpu_count() returns. .if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) MAKE_JOBS_NUMBER= 1 .endif .if defined(MAKE_JOBS_NUMBER) MOZ_MAKE_FLAGS+=-j${MAKE_JOBS_NUMBER} .endif .if defined(MOZ_MAKE_FLAGS) MOZ_MK_OPTIONS+=MOZ_MAKE_FLAGS="${MOZ_MAKE_FLAGS}" .endif .if ${ARCH} == amd64 . if ${USE_MOZILLA:M-nss} USE_BINUTILS= # intel-gcm.s CFLAGS+= -B${LOCALBASE}/bin LDFLAGS+= -B${LOCALBASE}/bin . endif .elif ${ARCH:Mpowerpc*} BUILD_DEPENDS+= as:devel/binutils . if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" . endif .endif .else # bsd.port.post.mk post-patch: gecko-post-patch gecko-post-patch: @${RM} ${MOZCONFIG} .if !defined(NOMOZCONFIG) .for arg in ${MOZ_OPTIONS} @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for arg in ${MOZ_MK_OPTIONS} @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for var in ${MOZ_EXPORT} @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG} .endfor .endif # .if !defined(NOMOZCONFIG) .if ${USE_MOZILLA:M-nspr} @${ECHO_MSG} "===> Applying NSPR patches" @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub < $$i; \ done .endif .if ${USE_MOZILLA:M-nss} @${ECHO_MSG} "===> Applying NSS patches" @for i in ${.CURDIR}/../../security/nss/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/security/nss < $$i; \ done .endif @if [ -f ${WRKSRC}/config/baseconfig.mk ] ; then \ ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${WRKSRC}/config/baseconfig.mk; \ fi @${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${MOZSRC}/config/baseconfig.mk @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \ s|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \ ${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \ ${MOZSRC}/xpcom/build/nsXPCOMPrivate.h @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ -e 's|mozilla/plugins|browser_plugins|g' \ -e 's|share/mozilla/extensions|lib/xpi|g' \ ${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \ ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp # Disable vendor checksums like lang/rust @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ ${MOZSRC}/third_party/rust/*/.cargo-checksum.json pre-configure-script: # 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 post-install-script: gecko-create-plist gecko-create-plist: # Create the plist ${RM} ${PLISTF} .for dir in ${MOZILLA_PLIST_DIRS} @cd ${STAGEDIR}${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \ ${SED} -e 's|^|${dir}/|' >> ${PLISTF} .endfor ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST} .endif .endif # HERE THERE BE TACOS -- adamw Index: head/lang/rust/Makefile =================================================================== --- head/lang/rust/Makefile (revision 569488) +++ head/lang/rust/Makefile (revision 569489) @@ -1,240 +1,247 @@ # Created by: Jyun-Yan You # $FreeBSD$ PORTNAME= rust -PORTVERSION?= 1.50.0 -PORTREVISION?= 1 +PORTVERSION?= 1.51.0 +PORTREVISION?= 0 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 \ + LOCAL/mikael/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 .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_DATE?= 2021-02-11 +RUST_BOOTSTRAP_VERSION?= 1.50.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 +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 && ${LOCALBASE} != /usr/local + @${REINPLACE_CMD} 's,/usr/local/,${LOCALBASE}/,g' \ + ${WRKSRC}/compiler/rustc_llvm/build.rs \ + ${WRKSRC}/src/bootstrap/native.rs +.endif 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} 'changelog-seen=2' > ${WRKSRC}/config.toml @${ECHO_CMD} '[build]' >> ${WRKSRC}/config.toml + @${ECHO_CMD} 'build-stage=2' >> ${WRKSRC}/config.toml + @${ECHO_CMD} 'doc-stage=2' >> ${WRKSRC}/config.toml + @${ECHO_CMD} 'test-stage=2' >> ${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 \ ${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/distinfo =================================================================== --- head/lang/rust/distinfo (revision 569488) +++ head/lang/rust/distinfo (revision 569489) @@ -1,51 +1,51 @@ -TIMESTAMP = 1613066854 -SHA256 (rust/rustc-1.50.0-src.tar.xz) = f54adf9204ed3cb3998cdc1baa5645b346d8cf8f18205e3b15fcae194ba5457c -SIZE (rust/rustc-1.50.0-src.tar.xz) = 108666272 -SHA256 (rust/2020-12-31/cargo-1.49.0-aarch64-unknown-freebsd.tar.xz) = 1f29206d9bdebc4f7a85bc40e26bed20919a7efc374493ef6dc8fcb76d9dd757 -SIZE (rust/2020-12-31/cargo-1.49.0-aarch64-unknown-freebsd.tar.xz) = 4124680 -SHA256 (rust/2020-12-31/rust-std-1.49.0-aarch64-unknown-freebsd.tar.xz) = b326929f61f90ca47d9e5ca683a1bd0c72da308e15758f3b1358707c39763890 -SIZE (rust/2020-12-31/rust-std-1.49.0-aarch64-unknown-freebsd.tar.xz) = 16758184 -SHA256 (rust/2020-12-31/rustc-1.49.0-aarch64-unknown-freebsd.tar.xz) = aa469cc62df63c4718106a6c47c6a3b9e4d294691a61d03e446ceea1f182557e -SIZE (rust/2020-12-31/rustc-1.49.0-aarch64-unknown-freebsd.tar.xz) = 36458176 -SHA256 (rust/2020-12-31/rustc-1.49.0-x86_64-unknown-freebsd.tar.xz) = 6e4b19b96663042bfe94634025565d57c944ad6e1c6c40dd7b1c56f72eaa2808 -SIZE (rust/2020-12-31/rustc-1.49.0-x86_64-unknown-freebsd.tar.xz) = 39597956 -SHA256 (rust/2020-12-31/rust-std-1.49.0-x86_64-unknown-freebsd.tar.xz) = 55fabca711092c67bbffb3e3fec886acf6b90094b256c10998e4f77f90281805 -SIZE (rust/2020-12-31/rust-std-1.49.0-x86_64-unknown-freebsd.tar.xz) = 19435648 -SHA256 (rust/2020-12-31/cargo-1.49.0-x86_64-unknown-freebsd.tar.xz) = 8af89e8c81beaa3222c2da65a43d8fda5e887552684601ceb35666184ae54294 -SIZE (rust/2020-12-31/cargo-1.49.0-x86_64-unknown-freebsd.tar.xz) = 4877948 -SHA256 (rust/2020-12-31/rustc-1.49.0-armv6-unknown-freebsd.tar.xz) = c713f8c1662abf2e1d55183907b1ddae17888352bafafd88bc67952da7abc3a5 -SIZE (rust/2020-12-31/rustc-1.49.0-armv6-unknown-freebsd.tar.xz) = 38281092 -SHA256 (rust/2020-12-31/rust-std-1.49.0-armv6-unknown-freebsd.tar.xz) = a867971dcceecc41e3bb19befef2f77513a130d512df961a2b0954b6236aff3e -SIZE (rust/2020-12-31/rust-std-1.49.0-armv6-unknown-freebsd.tar.xz) = 17007160 -SHA256 (rust/2020-12-31/cargo-1.49.0-armv6-unknown-freebsd.tar.xz) = b416f6df6cbf22a0cf656b9ae462859062abaa26cf66c62cf90688558e90a814 -SIZE (rust/2020-12-31/cargo-1.49.0-armv6-unknown-freebsd.tar.xz) = 4283936 -SHA256 (rust/2020-12-31/rustc-1.49.0-armv7-unknown-freebsd.tar.xz) = 812f52a37c15da4f344bd2e6f4ef13482931013dc51ddf8a340fb7d7045aa7cd -SIZE (rust/2020-12-31/rustc-1.49.0-armv7-unknown-freebsd.tar.xz) = 37941452 -SHA256 (rust/2020-12-31/rust-std-1.49.0-armv7-unknown-freebsd.tar.xz) = a73f9b10f537ea3538d7139414ec1dd38926a9f892d03f85df7ce779421117ba -SIZE (rust/2020-12-31/rust-std-1.49.0-armv7-unknown-freebsd.tar.xz) = 17139628 -SHA256 (rust/2020-12-31/cargo-1.49.0-armv7-unknown-freebsd.tar.xz) = 0e47d84c6caa9fbcece0a1affefb730466b66de03422d666a0ad12acb2ef8504 -SIZE (rust/2020-12-31/cargo-1.49.0-armv7-unknown-freebsd.tar.xz) = 4273576 -SHA256 (rust/2020-12-31/rustc-1.49.0-i686-unknown-freebsd.tar.xz) = 38e60e3870d7be62bd38dd27418821e0bda403663941b245eb1e06d16cb15254 -SIZE (rust/2020-12-31/rustc-1.49.0-i686-unknown-freebsd.tar.xz) = 40971152 -SHA256 (rust/2020-12-31/rust-std-1.49.0-i686-unknown-freebsd.tar.xz) = 0c14316074c3ae6690b0f9169fd40c2889aab54baa856a55ebd814a5aed23081 -SIZE (rust/2020-12-31/rust-std-1.49.0-i686-unknown-freebsd.tar.xz) = 19461844 -SHA256 (rust/2020-12-31/cargo-1.49.0-i686-unknown-freebsd.tar.xz) = 4b3e30c79baef4ca4bb7f061e61a97652289d42f2c10653ccbe99a82b60ba345 -SIZE (rust/2020-12-31/cargo-1.49.0-i686-unknown-freebsd.tar.xz) = 4942980 -SHA256 (rust/2020-12-31/rustc-1.49.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 1557c59eeaa7db5f037b51e01787f55dfcccb00aa01f32dfab5b22880a8c3f0a -SIZE (rust/2020-12-31/rustc-1.49.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 44844340 -SHA256 (rust/2020-12-31/rust-std-1.49.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = d1807da240efabe0dfc038ce9bf71170d2d0ef6d5a8c14d206cb42a08bb84b55 -SIZE (rust/2020-12-31/rust-std-1.49.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 16862016 -SHA256 (rust/2020-12-31/cargo-1.49.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = e2d032d66a14a5fba1a0c74da283f49b09dd0d9f795d87defad661fe59c433b5 -SIZE (rust/2020-12-31/cargo-1.49.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 4752512 -SHA256 (rust/2020-12-31/rustc-1.49.0-powerpc64le-unknown-freebsd.tar.xz) = 7885b37a3b68ce9faa6dcc3d400157a514d57483af3e1d383774a0be7d3845df -SIZE (rust/2020-12-31/rustc-1.49.0-powerpc64le-unknown-freebsd.tar.xz) = 39868780 -SHA256 (rust/2020-12-31/rust-std-1.49.0-powerpc64le-unknown-freebsd.tar.xz) = 2997b1593c5ec28e32040d2bb643712f9a555a257e7a32bb0b5db4e3bc3f95c5 -SIZE (rust/2020-12-31/rust-std-1.49.0-powerpc64le-unknown-freebsd.tar.xz) = 17006712 -SHA256 (rust/2020-12-31/cargo-1.49.0-powerpc64le-unknown-freebsd.tar.xz) = 0fd8651dda85b1548986ba5b9286c8de70543adabba547d065c45ee6a96c831b -SIZE (rust/2020-12-31/cargo-1.49.0-powerpc64le-unknown-freebsd.tar.xz) = 4693276 -SHA256 (rust/2020-12-31/rustc-1.49.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 04144ce50f91a175ea5b9954909c2d408c265e7191d7175f2c8c316ad8eab12a -SIZE (rust/2020-12-31/rustc-1.49.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 38025780 -SHA256 (rust/2020-12-31/rust-std-1.49.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 43a08e6459bfb4498a395b07c194a4bbc38915e7027ba2ec4e8939087abeeb7a -SIZE (rust/2020-12-31/rust-std-1.49.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 16795244 -SHA256 (rust/2020-12-31/cargo-1.49.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = cae1f2f35330bbfd82a5ab1e3f3b82d3981f7b22541becf69659323edb9a6a8c -SIZE (rust/2020-12-31/cargo-1.49.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 4447368 +TIMESTAMP = 1616749421 +SHA256 (rust/rustc-1.51.0-src.tar.xz) = 92c68a91fca33cbafb83442cde722d010cc387dc1ee8a2680e2fb33a575821a1 +SIZE (rust/rustc-1.51.0-src.tar.xz) = 109596164 +SHA256 (rust/2021-02-11/rustc-1.50.0-aarch64-unknown-freebsd.tar.xz) = 35861e14be840d59465c3958d7bf56960be362f593f14f440329504d29bdc0e0 +SIZE (rust/2021-02-11/rustc-1.50.0-aarch64-unknown-freebsd.tar.xz) = 45220868 +SHA256 (rust/2021-02-11/rust-std-1.50.0-aarch64-unknown-freebsd.tar.xz) = e9a8237c2f3b8e7cf40608f48d27345a3c1601fa0ddcf8abfb94b879ca1a8bbc +SIZE (rust/2021-02-11/rust-std-1.50.0-aarch64-unknown-freebsd.tar.xz) = 17429788 +SHA256 (rust/2021-02-11/cargo-1.50.0-aarch64-unknown-freebsd.tar.xz) = 4daf13681f990bcf8d0ca28ab410e0a3d0e5b533772f55e7568eea7e61bca89a +SIZE (rust/2021-02-11/cargo-1.50.0-aarch64-unknown-freebsd.tar.xz) = 4287964 +SHA256 (rust/2021-02-11/rustc-1.50.0-x86_64-unknown-freebsd.tar.xz) = c0148c65ab21f7a49f6d393ba140bf53c05e73276383dd7eb2b65048b1ba4a16 +SIZE (rust/2021-02-11/rustc-1.50.0-x86_64-unknown-freebsd.tar.xz) = 47818616 +SHA256 (rust/2021-02-11/rust-std-1.50.0-x86_64-unknown-freebsd.tar.xz) = c9ff9ef502675bf40f8d7a806d967551f8c3402ff54c48aec7afd63291f64009 +SIZE (rust/2021-02-11/rust-std-1.50.0-x86_64-unknown-freebsd.tar.xz) = 21624016 +SHA256 (rust/2021-02-11/cargo-1.50.0-x86_64-unknown-freebsd.tar.xz) = 1a49a9aa5374258499048c163de3f0c736f75d12210f299afdbca2099060926d +SIZE (rust/2021-02-11/cargo-1.50.0-x86_64-unknown-freebsd.tar.xz) = 5073160 +SHA256 (rust/2021-02-11/rustc-1.50.0-armv6-unknown-freebsd.tar.xz) = 628987b6f5cd018a650d1a0b1ec27132cf0a1dd0dd6bffb4387a72466ecb9460 +SIZE (rust/2021-02-11/rustc-1.50.0-armv6-unknown-freebsd.tar.xz) = 46037188 +SHA256 (rust/2021-02-11/rust-std-1.50.0-armv6-unknown-freebsd.tar.xz) = ed722bfe0c3c3267550767afc59d5d93056018cd664d1182dce3b187d00d3b96 +SIZE (rust/2021-02-11/rust-std-1.50.0-armv6-unknown-freebsd.tar.xz) = 17375956 +SHA256 (rust/2021-02-11/cargo-1.50.0-armv6-unknown-freebsd.tar.xz) = 27ce8e045304146879c48792447de0eb09e92c0e9ce27d80f4dc5d96a005adf8 +SIZE (rust/2021-02-11/cargo-1.50.0-armv6-unknown-freebsd.tar.xz) = 4459520 +SHA256 (rust/2021-02-11/rustc-1.50.0-armv7-unknown-freebsd.tar.xz) = 479b2c740e1244863f4450bb800e96832182b80dcfdc6f8c70d0248bac312e4f +SIZE (rust/2021-02-11/rustc-1.50.0-armv7-unknown-freebsd.tar.xz) = 46085828 +SHA256 (rust/2021-02-11/rust-std-1.50.0-armv7-unknown-freebsd.tar.xz) = cce6d3a91ba8f982ca218782be1ea0500add316bd83cbe3ce701ec1f10dcf498 +SIZE (rust/2021-02-11/rust-std-1.50.0-armv7-unknown-freebsd.tar.xz) = 17546932 +SHA256 (rust/2021-02-11/cargo-1.50.0-armv7-unknown-freebsd.tar.xz) = 307586fb4d0d33b861d008472b65f6bae9502b7ef44921881046442a81da32d6 +SIZE (rust/2021-02-11/cargo-1.50.0-armv7-unknown-freebsd.tar.xz) = 4453420 +SHA256 (rust/2021-02-11/rustc-1.50.0-i686-unknown-freebsd.tar.xz) = ad52fa90b986770ed2809aae666b9ebe3062b1b0f470fdaa519bc0633a4eab92 +SIZE (rust/2021-02-11/rustc-1.50.0-i686-unknown-freebsd.tar.xz) = 48989020 +SHA256 (rust/2021-02-11/rust-std-1.50.0-i686-unknown-freebsd.tar.xz) = d59650dea7fed2dbcc03fdc006d691c8fceb18db6ad575801e5b898ffbdf71a0 +SIZE (rust/2021-02-11/rust-std-1.50.0-i686-unknown-freebsd.tar.xz) = 21622960 +SHA256 (rust/2021-02-11/cargo-1.50.0-i686-unknown-freebsd.tar.xz) = 7b07204894a3c5c1f4b39e03c475d8a5ea523a30721af19ba49211c8f46e0cf4 +SIZE (rust/2021-02-11/cargo-1.50.0-i686-unknown-freebsd.tar.xz) = 5145204 +SHA256 (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = a215d00ffd5e561471ded1ee546c66b3852c83a727f459c3c224eb78cfd67fd5 +SIZE (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 55203080 +SHA256 (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = c80da6b2b3ba447550c311eda47748e1cf6620e095bec5e60c65d24e711f7eb6 +SIZE (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 17337608 +SHA256 (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = b5347cc6d5369a93667249b68d19075971836c536128053abf768ed759bdde48 +SIZE (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 4946400 +SHA256 (rust/2021-02-11/rustc-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 11a9ec86be232486f2f42f44e28b7be3baa7cc19d137d87a95851529e3e64f61 +SIZE (rust/2021-02-11/rustc-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 48136856 +SHA256 (rust/2021-02-11/rust-std-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 8c5ad05fcb0cf55c762ad6f85cbe0d67663cba0cdd82cfe1378d6004e4b4abeb +SIZE (rust/2021-02-11/rust-std-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 17429708 +SHA256 (rust/2021-02-11/cargo-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = bc9ea6b58fa346f1ed04ef21561a8cd81937eb61fa6c7a3272586336d734089e +SIZE (rust/2021-02-11/cargo-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 4887040 +SHA256 (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = b88a9b5ea755207ad431852e009c1e0d993bffca40c6aaa69f76183876b5c603 +SIZE (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 46199556 +SHA256 (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = f55a7b1560aef7cbb44cbbffa6d0baee4598d715fe32865cf3fcae9951b2cd70 +SIZE (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 17233672 +SHA256 (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = f8ea608809f9bd760e9e280d2b183b003727cae682eae16892cc570379e83d13 +SIZE (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 4627136 Index: head/lang/rust/files/patch-backtrace =================================================================== --- head/lang/rust/files/patch-backtrace (revision 569488) +++ head/lang/rust/files/patch-backtrace (revision 569489) @@ -1,918 +1,12 @@ 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! { Index: head/lang/rust/files/patch-src_bootstrap_native.rs =================================================================== --- head/lang/rust/files/patch-src_bootstrap_native.rs (revision 569488) +++ head/lang/rust/files/patch-src_bootstrap_native.rs (revision 569489) @@ -1,43 +1,35 @@ -From 9741fbd202b2b55de95abe1eb7f3d8185e312444 Mon Sep 17 00:00:00 2001 -From: Jake Goulding -Date: Sat, 11 Jul 2020 09:38:01 -0400 -Subject: [PATCH] Don't allow `DESTDIR` to influence LLVM builds - -When running a command like `DESTDIR=foo x.py install` in a completely -clean build directory, this will cause LLVM to be installed into -`DESTDIR`, which then causes the build to fail later when it attempts -to *use* those LLVM files. ---- - src/bootstrap/native.rs | 5 +++++ - 1 file changed, 5 insertions(+) +There seems to be some kind of race when using llvm-config-wrapper +for building rust-lld. Attempt to improve reliability of the build +by not using it. llvm-config-wrapper is a hack in the first place +that is only really needed on Windows. --- src/bootstrap/native.rs.orig 2020-08-24 15:00:49 UTC +++ src/bootstrap/native.rs @@ -517,26 +522,9 @@ impl Step for Lld { let mut cfg = cmake::Config::new(builder.src.join("src/llvm-project/lld")); configure_cmake(builder, target, &mut cfg, true); - // This is an awful, awful hack. Discovered when we migrated to using - // clang-cl to compile LLVM/LLD it turns out that LLD, when built out of - // tree, will execute `llvm-config --cmakedir` and then tell CMake about - // that directory for later processing. Unfortunately if this path has - // forward slashes in it (which it basically always does on Windows) - // then CMake will hit a syntax error later on as... something isn't - // escaped it seems? - // - // Instead of attempting to fix this problem in upstream CMake and/or - // LLVM/LLD we just hack around it here. This thin wrapper will take the - // output from llvm-config and replace all instances of `\` with `/` to - // ensure we don't hit the same bugs with escaping. It means that you - // can't build on a system where your paths require `\` on Windows, but - // there's probably a lot of reasons you can't do that other than this. - let llvm_config_shim = env::current_exe().unwrap().with_file_name("llvm-config-wrapper"); - cfg.out_dir(&out_dir) .profile("Release") - .env("LLVM_CONFIG_REAL", &llvm_config) - .define("LLVM_CONFIG_PATH", llvm_config_shim) + .define("LLVM_CONFIG_PATH", &llvm_config) .define("LLVM_INCLUDE_TESTS", "OFF"); // While we're using this horrible workaround to shim the execution of Index: head/lang/rust/files/powerpc64-elfv2/patch-compiler_rustc__target_src_spec_powerpc64__unknown__freebsd.rs =================================================================== --- head/lang/rust/files/powerpc64-elfv2/patch-compiler_rustc__target_src_spec_powerpc64__unknown__freebsd.rs (revision 569488) +++ head/lang/rust/files/powerpc64-elfv2/patch-compiler_rustc__target_src_spec_powerpc64__unknown__freebsd.rs (revision 569489) @@ -1,14 +1,14 @@ --- compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs.orig 2020-12-29 04:03:08 UTC +++ compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs @@ -11,6 +11,10 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), -- options: TargetOptions { endian: "big".to_string(), mcount: "_mcount".to_string(), ..base }, +- options: TargetOptions { endian: Endian::Big, mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { -+ endian: "big".to_string(), ++ endian: Endian::Big, + mcount: "_mcount".to_string(), + llvm_abiname: "elfv2".to_string(), + ..base }, } } Index: head/lang/rust/files/powerpc64le/patch-compiler_rustc__target_src_spec_powerpc64le__unknown__freebsd.rs =================================================================== --- head/lang/rust/files/powerpc64le/patch-compiler_rustc__target_src_spec_powerpc64le__unknown__freebsd.rs (revision 569488) +++ head/lang/rust/files/powerpc64le/patch-compiler_rustc__target_src_spec_powerpc64le__unknown__freebsd.rs (revision 569489) @@ -1,19 +1,19 @@ --- compiler/rustc_target/src/spec/powerpc64le_unknown_freebsd.rs.orig 2021-01-07 03:05:53 UTC +++ compiler/rustc_target/src/spec/powerpc64le_unknown_freebsd.rs @@ -0,0 +1,16 @@ +use crate::spec::{LinkerFlavor, Target, TargetOptions}; + +pub fn target() -> Target { + let mut base = super::freebsd_base::opts(); + base.cpu = "ppc64le".to_string(); + base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); + base.max_atomic_width = Some(64); + + Target { -+ llvm_target: "powerpc64le-unknown-freebsd".to_string(), -+ pointer_width: 64, -+ data_layout: "e-m:e-i64:64-n32:64".to_string(), -+ arch: "powerpc64".to_string(), -+ options: TargetOptions { endian: "little".to_string(), mcount: "_mcount".to_string(), ..base }, ++ llvm_target: "powerpc64le-unknown-freebsd".to_string(), ++ pointer_width: 64, ++ data_layout: "e-m:e-i64:64-n32:64".to_string(), ++ arch: "powerpc64".to_string(), ++ options: TargetOptions { mcount: "_mcount".to_string(), ..base }, + } +} Index: head/lang/rust-bootstrap/Makefile =================================================================== --- head/lang/rust-bootstrap/Makefile (revision 569488) +++ head/lang/rust-bootstrap/Makefile (revision 569489) @@ -1,249 +1,248 @@ # $FreeBSD$ # Once the bootstraps are available on pkg.FreeBSD.org run sync.sh # to upload them to ~/public_distfiles on freefall in preparation # for the next lang/rust update. PORTNAME= rust -PORTVERSION= 1.50.0 -PORTREVISION= 2 +PORTVERSION= 1.51.0 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- aarch64_BUILD_DEPENDS= llvm90>0:devel/llvm90 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 .if ${FLAVOR} == aarch64 CC= clang90 CXX= clang++90 .endif 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 Index: head/lang/rust-bootstrap/distinfo =================================================================== --- head/lang/rust-bootstrap/distinfo (revision 569488) +++ head/lang/rust-bootstrap/distinfo (revision 569489) @@ -1,21 +1,21 @@ -TIMESTAMP = 1613722755 -SHA256 (rust/rustc-1.50.0-src.tar.xz) = f54adf9204ed3cb3998cdc1baa5645b346d8cf8f18205e3b15fcae194ba5457c -SIZE (rust/rustc-1.50.0-src.tar.xz) = 108666272 +TIMESTAMP = 1616754064 +SHA256 (rust/rustc-1.51.0-src.tar.xz) = 92c68a91fca33cbafb83442cde722d010cc387dc1ee8a2680e2fb33a575821a1 +SIZE (rust/rustc-1.51.0-src.tar.xz) = 109596164 SHA256 (FreeBSD-12.2-RELEASE-arm64.tar.xz) = 3f82224fbcc6b2a2e1a1358cec5f32c0a08b5c5e6796e1a998369eb624a11cf3 SIZE (FreeBSD-12.2-RELEASE-arm64.tar.xz) = 158493712 SHA256 (FreeBSD-11.4-RELEASE-amd64.tar.xz) = 3bac8257bdd5e5b071f7b80cc591ebecd01b9314ca7839a2903096cbf82169f9 SIZE (FreeBSD-11.4-RELEASE-amd64.tar.xz) = 132075024 SHA256 (FreeBSD-11.4-RELEASE-arm-armv6.tar.xz) = 8a7c95aaac4fe9591f586fa274c1ffb9adba2e0f191a5a26f6222331a7ae0afb SIZE (FreeBSD-11.4-RELEASE-arm-armv6.tar.xz) = 25605880 SHA256 (FreeBSD-12.2-RELEASE-arm-armv7.tar.xz) = b56bfaf0e9994723b2bb8c36b268ea1d0c6e9378c83211ed84ecca5c0a5420da SIZE (FreeBSD-12.2-RELEASE-arm-armv7.tar.xz) = 70116512 SHA256 (FreeBSD-11.4-RELEASE-i386.tar.xz) = ae602552ff4c26f31b304e4a1ffc066db826e75d07ba9a4bf33649e9549bf27b SIZE (FreeBSD-11.4-RELEASE-i386.tar.xz) = 110296208 SHA256 (FreeBSD-12.2-RELEASE-powerpc64-elfv1.tar.xz) = 762ec55a9bd40dc93231e24f2df53c58d90b7cef63892b2740a59f9e8f40898e SIZE (FreeBSD-12.2-RELEASE-powerpc64-elfv1.tar.xz) = 109121900 SHA256 (FreeBSD-12.2-RELEASE-powerpc64-elfv1-gcc9-9.3.0.tar.xz) = b1bd46b347e0ef55e8868537aaefe323622adf6fa081bef9ca5f24fc711d40ea SIZE (FreeBSD-12.2-RELEASE-powerpc64-elfv1-gcc9-9.3.0.tar.xz) = 36842348 SHA256 (FreeBSD-13.0-CURRENT-powerpc64-elfv2-v1300123.tar.xz) = 0713b0c4bd3c19520714054b087d8f0d8dc7acc3610d8ae30df51ab07d566d92 SIZE (FreeBSD-13.0-CURRENT-powerpc64-elfv2-v1300123.tar.xz) = 75289700 SHA256 (FreeBSD-13.0-CURRENT-powerpc64le-r366300.tar.xz) = a828a3a968c9911655148fa080587ecd7673aa3d58588ed3dafa55a5c2e12dd3 SIZE (FreeBSD-13.0-CURRENT-powerpc64le-r366300.tar.xz) = 167748612