From nobody Sat Nov 09 22:47:09 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xm9t60jmsz5bn7W; Sat, 09 Nov 2024 22:47:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xm9t55cH7z4vlh; Sat, 9 Nov 2024 22:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731192429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XbnxDTI4gcxoUN6Qd8V8CG9J7HDHUo1zS6j/vSWr1FA=; b=ASL/exx/OUFHLehuWTXijhVI3enIHp3dmLbBWDaQSj+lTEjyrqXUY+o8ekqzBs0S5QbpaQ nkaQ8K1HwtEos5MHmEcoUwRg6AAd0YCPmBH1OjULzDqcM+AQFo5XAMGyDL5MM1Oc2R9LmM CGLwQAk9y8riTxPFwpzJPPXZ3bXm3LBzF/k8oDbKqBTXBbMdMSFdaKUKa+0448XsxRuxwv 0pLonur1MbV32vc0CBdgiuD3J9KqUCm6zBEsMizRqOWS4smwQXKwnUx/neGwez0ZpVMJf/ Q5kjtJUMLWNN5gzsbNkoNYc7QFz2Dqy32JnedwNnS1SNcu5Do/O5X5iXtBZAFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731192429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XbnxDTI4gcxoUN6Qd8V8CG9J7HDHUo1zS6j/vSWr1FA=; b=LkdMSOnBd7cj3+9awnnCI4+Q6RCyqUhWqpjZu/+F1erlD44+cvAHUborst/mO8hqoAbmud reVU7Ahg8Vh51hoUET66AxxQbPrWpP2fZ9DHP6Hl/hmsdqjTuuJup+RNoVzHw3PTwQYQaB hgwx7V2QwzPfR4y/WBSGtvbX/B8CIbkCwp/e6F1SiDgSGwltrhdG01jOLd/Gppc/40DJ1q K+dYl7sn2uZMpSejnOd6Kvf/jLijKeFVUhXNnlqpk5zT6UgXLWD+Rn6ltDv7qcG6rHeG/2 kCQMfOESkVetlCC0Yy5/XAeZyCz50w/cJtZNPoaltUgm40oyVqppXsceF7wFmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731192429; a=rsa-sha256; cv=none; b=p2jLdNTPhWokCl0bDe21Oe4TSxGgmR3LiPSi++Claf+07dcspyuegbRmoRistH6om2PGLv psc1LxNOiJxkgxeZHLi0gJAsxFGPccy244aVAG86YTliTvn1U75nHODYfbNmtTfCLabvpB dnBi1ORaqxCx5B8oDXz2/Ymflhm1vDPIXLvv/sk7K9b2TFs+M2/699DTCS4cE3rxPvdbva qKKIJigAnx98c2EN7N9wpTlqHJjWhp+FLUr1N1ETPcFpsdJhwWQOw43t/NTmGGfWGLNQiP v4OUVghikfYvBNPBRhm/HJa0DxVgtXB6E4ATvOAKG6djLXolVj192brrSfYBtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xm9t54kxXzGtK; Sat, 9 Nov 2024 22:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A9Ml9VM011521; Sat, 9 Nov 2024 22:47:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A9Ml9Lg011518; Sat, 9 Nov 2024 22:47:09 GMT (envelope-from git) Date: Sat, 9 Nov 2024 22:47:09 GMT Message-Id: <202411092247.4A9Ml9Lg011518@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alan Somers Subject: git: b039f2e46b15 - main - lang/rust: enable SSE2 by default on i386 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b039f2e46b15c1ff5cbaf41e642993d982294da3 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/ports/commit/?id=b039f2e46b15c1ff5cbaf41e642993d982294da3 commit b039f2e46b15c1ff5cbaf41e642993d982294da3 Author: Alan Somers AuthorDate: 2024-10-21 19:25:23 +0000 Commit: Alan Somers CommitDate: 2024-11-09 22:45:49 +0000 lang/rust: enable SSE2 by default on i386 Upstream Rust always requires SSE2 for x86. But back in 2017[^1][^2] we patched lang/rust to disable SSE2 for i386. At the time, it was reported that some people were still using non-SSE2 capable hardware. More recently, LLVM bugs have been discovered[^3][^4] that can result in rounding bugs and reduced accuracy when using f64 on non-SSE hardware. In weird cases, they can even cause wilder unpredictable behavior, like segfaults. Revert our change for the sake of Pentium 4 (and later) users. But add an SSE2 option. Disabling it will allow the port to be used on Pentium 3 and older CPUs. [^1]: https://github.com/freebsd/freebsd-ports/commit/d65b2886b1b3b2135f0b8982de4d9754517acf61 [^2]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223415 [^3]: https://github.com/rust-lang/rust/issues/114479 [^4]: https://github.com/llvm/llvm-project/issues/44218 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D47227 --- UPDATING | 12 ++++++++++++ lang/rust/Makefile | 7 ++++++- ...rustc__target_src_spec_targets_i686__unknown__freebsd.rs} | 0 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 1a674317b048..5a5daad9ddeb 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,18 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20241109: + AFFECTS: all users of i386 + AUTHOR: asomers@FreeBSD.org + + On i386 the lang/rust port has been updated to require SSE2 by default. Not + only does the compiler itself require SSE2, but it unconditionally generates + code that requires it, too. Over 500 ports include Rust code (www/firefox, + security/py-cryptography, etc). Official binary packages of all of those + ports will no longer work on Pentium III and older hardware. PIII users must + now build their own lang/rust packages, clearing the SSE2 option, and rebuild + any dependent ports. + 20241104: AFFECTS: users of mail/fetchmail AUTHOR: chalpin@cs.wisc.edu diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 8c2b971e132a..9406b62a91ad 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -1,6 +1,6 @@ PORTNAME= rust PORTVERSION?= 1.82.0 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:src \ https://dev-static.rust-lang.org/dist/:src \ @@ -48,12 +48,17 @@ TMPDIR?= ${WRKDIR} OPTIONS_DEFINE= DOCS GDB LTO PORT_LLVM SOURCES WASM OPTIONS_DEFAULT= SOURCES WASM +OPTIONS_DEFINE_i386= SSE2 +OPTIONS_DEFAULT_i386= SSE2 GDB_DESC= Install ports gdb (necessary for debugging rust programs) PORT_LLVM_DESC= Build against devel/llvm instead of bundled copy (experimental) +SSE2_DESC= Enable SSE2 instructions SOURCES_DESC= Install source files WASM_DESC= Build the WebAssembly target (wasm32-unknown-unknown) +SSE2_EXTRA_PATCHES_OFF+= ${FILESDIR}/extra-patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs + DOCS_VARS= _RUST_BUILD_DOCS=true \ _COMPONENTS+="rust-docs-${_PACKAGE_VERS}-${_RUST_TARGET} rust-docs-json-${_PACKAGE_VERS}-${_RUST_TARGET}" \ _RUST_TOOLS+=rustdoc diff --git a/lang/rust/files/patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs b/lang/rust/files/extra-patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs similarity index 100% rename from lang/rust/files/patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs rename to lang/rust/files/extra-patch-compiler_rustc__target_src_spec_targets_i686__unknown__freebsd.rs