Open
Bug 1477305
Opened 6 years ago
Updated 2 years ago
Remove ccov Rust workarounds by updating to GCC 7 or cherry-picking a GCC patch
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(Not tracked)
NEW
People
(Reporter: ted, Unassigned)
References
Details
I've spent way too much time in bug 1409276 getting the ccov builds to work. The libgcov.a in GCC 6 includes a reference to `atexit`, which comes from libc_nonshared.a. When rustc runs the system linker it passes `-nodefaultlibs`, and combined with `--coverage` (which inserts `-lgcov`) this makes linking a nightmare. I think I finally figured out a hacky way to work around this, but it would be nice to not need it. Marco said that GCC 7 fixed this by removing the use of `atexit` in gcov. This is the changeset that he said fixed it:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=240529
We can either pick up this fix by switching the ccov builds to GCC 7, or just cherry-pick it into our GCC 6 toolchain build. Marco tried using GCC 7 on try and said it causes a bunch of other issues, so maybe we should just cherry-pick.
Reporter | ||
Comment 1•6 years ago
|
||
My linker hacks did not actually get the job done. The stylo build script linked successfully, but now it crashes and I'm out of patience:
[task 2018-07-20T17:21:32.797Z] 17:21:32 INFO - process didn't exit successfully: `/builds/worker/workspace/build/src/obj-firefox/toolkit/library/release/build/style-5938f41cb64bd839/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
From: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ff2ccc14f3fdae6796cd5f29a7bfcd3b7c7e0251&selectedJob=189224197
I'm just going to apply the same workaround we have for asan/tsan, which is to just not even pass our CFLAGS/CXXFLAGS to cargo.
Summary: Remove ccov link hacks by updating to GCC 7 or cherry-picking a GCC patch → Remove ccov Rust workarounds by updating to GCC 7 or cherry-picking a GCC patch
Updated•6 years ago
|
Comment 3•5 years ago
|
||
It sounds like this might be needed even with Clang, see bug 1509665 comment 6.
Updated•5 years ago
|
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•