Git even with -M -C -C couldn't detect all renames in modified files,
so rename in a separate commit.
Approved by: rust (tobik)
Differential Revision: https://reviews.freebsd.org/D18858
- Simplify .cargo-checksum.json handling [1]. Similar to USES=cargo
we disable vendor checksum checking by clearing the list of files
in all .cargo-checksum.json, so that cargo does not complain when
we patch something. The overall distfile is already checked by
us which should be enough.
- Add an overridable CARGO_VENDOR_DIR variable to set the crate
vendor directory which has moved location in nightly
- Add upstream openssl-sys patch to fix build with LibreSSL 2.9.0 [2]
Changes: https://blog.rust-lang.org/2018/12/20/Rust-1.31.1.html
Submitted by: mikael.urankar@gmail.com [1], ml@vishwin.info [2]
Differential Revision: https://reviews.freebsd.org/D18610
- libgit2 in ports is nowadays newer than bundled version
- libssh2 was already unbundled until 1.29.0 update
- Unbundle libssh2 for USES=cargo (unused atm)
PR: 231411
Approved by: rust (dumbbell, tobik)
Release notes:
* https://blog.rust-lang.org/2018/07/20/Rust-1.27.2.html
* https://blog.rust-lang.org/2018/08/02/Rust-1.28.html
* https://blog.rust-lang.org/2018/09/13/Rust-1.29.html
Up to and including Rust 1.27.x, the Rust build system shelled out to
a configure script to detect the presence and usability of libunwind.
Since Rust 1.28.0, it's using a static result in a `build.rs` file and
expects libunwind to be used. It was not the case on FreeBSD so far, so
we need a patch to this `build.rs` to disable that. We still need to
study if the FreeBSD port should use libunwind and what to do with this
patch. But this problem prevented the update to Rust 1.28.0 already, so
enough delay.
The update also comes with a patch to a few `USE_GECKO`-based ports such
as Firefox [1]. Their configure script has some asumptions on the output
of `rustc --print target-list` which are not true anymore. The patch was
already committed upstream.
The aarch64 version is still marked as BROKEN because I didn't find the
time to work on it. As a consequence, there is also no aarch64 bootstrap
for Rust 1.29.0.
PR: 229826
Approved by: jbeich [1]
Obtained from: https://bugzilla.mozilla.org/show_bug.cgi?id=1479540 [1]
Differential Revision: https://reviews.freebsd.org/D17178
It was part of the initial patch from Charlie Li to support LibreSSL
2.7. However, I misread it and though he was only removing bits
which were not needed anymore (updating checksums for openssl and
openssl-sys).
Now, we update all three: libgit2-sys, openssl and openssl-sys.
PR: 226955
Submitted by: Charlie Li <ml+freebsd@vishwin.info>
Reported by: Charlie Li <ml+freebsd@vishwin.info>
Release notes:
* https://blog.rust-lang.org/2018/06/21/Rust-1.27.html
* https://blog.rust-lang.org/2018/07/10/Rust-1.27.1.html
Rust is marked as broken on aarch64. The reason is the bootstrap
compiler crashes currently. See PR 228892 which tracks the issue.
A patch for aarch64 is still included. It fixes the sign for unqualified
C char. This patch still needs to be upstream, but for that, the
compiler needs to work again first.
PR: 228892
The announcement is available on Rust blog:
https://blog.rust-lang.org/2018/05/10/Rust-1.26.html
Rust 1.25.0, used as the bootstrap compiler, contains the patch from
bdrewery@ to use the compat (non-ino64) symbols on FreeBSD 12-CURRENT.
Therefore, we don't need `old_fstat.c` and the associated machinery in
the `Makefile` anymore.
- The ABI patch is no longer needed on head due to fixes being upstreamed
to use the pre-ino64 symbols. The ABI patch is still needed for the
bootstrap but should be removable for 1.26.0 if it uses beta 2018-03-18.
PR: 227130 [based on]
Tested by: dumbbell, Charlie Li
Submitted by: riggs [based on]
Differential Revision: https://reviews.freebsd.org/D14921 [based on]
The announcement is available on Rust blog:
https://blog.rust-lang.org/2018/03/01/Rust-1.24.1.html
There is a compilation error when it builds `clippy-driver` and `miri`
but it apparently doesn't affect the result. There are probably optional
tools/dependencies.
- Add some context in the patches for where they came from. They need to be
in 1 patch due to needing to use the .orig file for fixing up checksums.
Obtained from: rust upstream
- Stop using git to build as it is unmaintainable due to submodules,
but more importantly because src/vendor is no longer bundled. Just
fetch the source already generated that has all dependencies bundled.
It may be a bit slower to get updates but is far more maintainable.
- Copy all patches to lang/rust-nightly/files since they may not always
apply exactly between both versions.
- Add in patch for llvm-config getting -lexecinfo wrong, this is in
review with LLVM at https://reviews.llvm.org/D42702.
- Bring in other random updates from lang/rust.
gmake: Leaving directory '.../aarch64-unknown-freebsd/release/build/rustc_binaryen-cfb76adb9420e94c/out/build'
--- stderr
c++: error: the clang compiler does not support '-march=native'
c++: error: the clang compiler does not support '-march=native'
PR: 225600
Reported by: Gergely Czuczy, pkg-fallout
Obtained from: upstream (binaryen 1.37.35)
Approved by: portmgr blanket
The suffix of that file changed in recent versions of Rust and it's
changing again between Rust 1.23.0 and 1.24.0. So let's grep the
filename from the list of files contained in the ar archive.
This wasn't reported by a simple `poudriere bulk`, but a `poudriere
testport` revealed the problem:
====> Running Q/A tests (stage-qa)
Error: 'lib/rustlib/manifest-rustfmt-preview' is referring to /wrkdirs/usr/ports/lang/rust/work/stage
Warning: 'bin/rustfmt' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
...
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: bin/rustfmt
Error: Orphaned: lib/rustlib/manifest-rustfmt-preview
PR: 225445
Reported by: jbeich@
Firefox 57.0 failed to build with Rust 1.23.0 with the following error:
error: unused import: `std::ascii::AsciiExt`
--> /wrkdirs/usr/ports/www/firefox/work/firefox-57.0.4/servo/components/style/gecko_string_cache/mod.rs:16:5
|
16 | use std::ascii::AsciiExt;
| ^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> /wrkdirs/usr/ports/www/firefox/work/firefox-57.0.4/servo/components/style/lib.rs:26:9
|
26 | #![deny(warnings)]
| ^^^^^^^^
= note: #[deny(unused_imports)] implied by #[deny(warnings)]
Now that Firefox is updated to 58.0, the build succeeds.
Currently we need to update `.cargo-checksum.json` in several patched
crates. But those crates are missing from the sources if they come from
GitHub instead of a proper released source archive. This change makes
`post-patch` and `do-configure` recipes fine in both cases.
This simplifies the `Makefile`. The condition was fragile anyway because
it was based solely on the Makefile and not the actual content of
`stage0.txt`.
Before the patch, the default behavior of the compiler was to omit frame
pointers. However, even though it looks fine for the code produced
by the compiler, the compiler itself was broken. When there was a
compilation error, rustc panics to report that error. While handling
that panic, it tries to unwind the stack but fails to do so, which
results in an abort(3).
Here is an example:
$ rustc hello.rs
error: invalid reference to argument `0` (no arguments given)
--> hello.rs:2:5
|
2 | println!("Hello {}")
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro outside of the current crate
error: aborting due to previous error
fatal runtime error: failed to initiate panic, error 5
Abort trap (core dumped)
The problem also exists on other systems such as OpenBSD and
i686-unknown-linux-musl. "omit frame pointers" was already disabled for
i686-unknown-linux-musl:
88a28ff602/src/librustc_back/target/i686_unknown_linux_musl.rs (L22)
The patch does the same for *-unknown-freebsd.
See the upstream bug for more informations:
https://github.com/rust-lang/rust/issues/43575
This may help ports like textproc/ripgrep to run on old hardware.
Rust itself still requires SSE2 until bootstrap is regenerated.
PR: 223415
Approved by: rust (dumbbell)
FTR, this option allowed to used LLVM from ports instead of building the
bundled copy.
The problem is that this combination isn't really tested upstream. This
led to regressions which are difficult to diagnose. For instance, in
Rust 1.21.0, the bundled LLVM provided a new API to query the features
supported by the target arch. The equivalent code inside Rust was
removed to use that new API. Unfortunately, building Rust 1.21.0+ with a
copy of LLVM not providing this API didn't failed but instead made that
list of CPU features empty. This resulted in the following obscure build
failure in Firefox:
error[E0432]: unresolved import `x86::sse2`
To avoid future pain for both end users and maintainers, we decided to
remove that option. Yes, it will increase the (already long) time to
build Rust, but it should save time wasted on debugging what is not
really supported anyway.
PR: 223342, 223300
Reported by: Many users
Support for LibreSSL up-to 2.6.3 is now included, thus we can remove the
patches to the `openssl` and `openssl-sys` crates.
The renewed bootstrap for aarch64 was created on 11.0-RELEASE, instead
of 11.1-STABLE. It should allow it to run on all 11.x and thus fix the
build on 11.0-RELEASE. [1]
PR: 223009 [1]