Bug 260186 - devel/wasi-compiler-rt*: predefine test results (should fix build on aarch64)
Summary: devel/wasi-compiler-rt*: predefine test results (should fix build on aarch64)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2021-12-03 08:46 UTC by Val Packett
Modified: 2021-12-07 00:00 UTC (History)
2 users (show)

See Also:


Attachments
0001-devel-wasi-compiler-rt-predefine-test-results-should.patch (7.82 KB, patch)
2021-12-03 08:46 UTC, Val Packett
val: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Val Packett 2021-12-03 08:46:57 UTC
Created attachment 229856 [details]
0001-devel-wasi-compiler-rt-predefine-test-results-should.patch

Silly LLVM, no one bothered to exclude the float16 flag when building for wasm >_<

Haven't had the time to test but this should fix the build.
Comment 1 Emmanuel Vadot freebsd_committer freebsd_triage 2021-12-03 08:56:27 UTC
Yup that did it.
Will commit today.
Thanks Greg.
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2021-12-03 09:06:51 UTC
Why not passing the correct CFLAGS instead?
CFLAGS+=       --target=wasm32-unknown-unknown
Comment 3 Val Packett 2021-12-03 10:29:34 UTC
(In reply to Mikael Urankar from comment #2)
Hmm. The target is set by -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=wasm32-wasi.
I don't think using raw CFLAGS for the target to force llvm to use the same target for tests is "clean", but this isn't "clean" either.
I guess it doesn't matter which hack we use, whatever works is fine.
Comment 4 Emmanuel Vadot freebsd_committer freebsd_triage 2021-12-03 16:19:52 UTC
So with Greg's current patch I can build firefox fine.
But it doesn't work, direct segfault on wayland and tab crash all the time on Xorg. That's probably not related to this so Mikael which version you seems is best ?
I honestly don't care.
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2021-12-04 18:34:22 UTC
(In reply to Emmanuel Vadot from comment #4)
Use greg's version
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-12-05 08:42:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d2374818d84832752be57cb4469c5ecd0004bad8

commit d2374818d84832752be57cb4469c5ecd0004bad8
Author:     Greg V <greg@unrelenting.technology>
AuthorDate: 2021-12-03 08:43:44 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2021-12-05 08:41:13 +0000

    devel/wasi-compiler-rt*: predefine test results

    PR:     260186

 devel/wasi-compiler-rt11/Makefile | 12 +++++++++++-
 devel/wasi-compiler-rt12/Makefile | 12 +++++++++++-
 devel/wasi-compiler-rt13/Makefile | 12 +++++++++++-
 3 files changed, 33 insertions(+), 3 deletions(-)
Comment 7 Val Packett 2021-12-07 00:00:42 UTC
(In reply to Emmanuel Vadot from comment #4)
> it doesn't work, direct segfault on wayland and tab crash all the time on Xorg

hm. Just built a nightly on an EC2 c6g instance using llvm13 with about the same mozconfig I use on amd64, running remotely with waypipe "just worked".

ports r95.0 did segfault in libX11.so.6`XInternAtoms via nsXRemoteServer — idk why is it trying to touch libX11 without $DISPLAY, but adding a --no-remote argument bypasses this and it works.