maintainer-feedback requested: [Bug 257274] www/firefox: LTO on i386 fails with link errors (firefox-90.0,2)

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 19 Jul 2021 11:36:38 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-gecko (Nobody)
<gecko@FreeBSD.org> for maintainer-feedback:
Bug 257274: www/firefox: LTO on i386 fails with link errors (firefox-90.0,2)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257274



--- Description ---
As in the subject, with firefox 90, building on i386 with recent -CURRENT and
LTO enabled, errors out while linking libxul.so:

...
chmod +x libmozavcodec.so
strip  libmozavcodec.so
../../../config/nsinstall -R -m 644 'libmozavcodec.so' '../../../dist/bin'
gmake[4]: Leaving directory
'/wrkdirs/share/dim/ports/www/firefox/work/.build/media/ffvpx/libavcodec'
ld: warning: undefined symbol: environ
>>> referenced by std.ded0i0pe-cgu.12
>>>		 
std-7a67fe162cbea472.std.ded0i0pe-cgu.12.rcgu.o:(_$LT$std..sys..unix..process..
process_inner..$LT$impl$u20$std..sys..unix..process..process_common..Command$GT
$..do_exec..Reset$u20$as$u20$core..ops..drop..Drop$GT$::drop::h65d9d963df9ffb00
) in archive
/wrkdirs/share/dim/ports/www/firefox/work/.build/i686-unknown-freebsd/release/l
ibgkrust.a
>>> referenced by std.ded0i0pe-cgu.3
>>>		 
std-7a67fe162cbea472.std.ded0i0pe-cgu.3.rcgu.o:(std::env::vars_os::hee869aae8e4
44309) in archive
/wrkdirs/share/dim/ports/www/firefox/work/.build/i686-unknown-freebsd/release/l
ibgkrust.a
>>> referenced by std.ded0i0pe-cgu.6
>>>		 
std-7a67fe162cbea472.std.ded0i0pe-cgu.6.rcgu.o:(std::sys::unix::process::proces
s_inner::_$LT$impl$u20$std..sys..unix..process..process_common..Command$GT$::sp
awn::hd5fbb5eedad9ba90) in archive
/wrkdirs/share/dim/ports/www/firefox/work/.build/i686-unknown-freebsd/release/l
ibgkrust.a
>>> referenced 2 more times

ld: error: undefined hidden symbol: mozilla::ServoTraversalStatistics::sActive
>>> referenced by geckoservo.b505lk5b-cgu.0
>>>		  lto.tmp:(style::driver::traverse_dom::h677487bc5a4d3515)
>>> referenced by style.9xypcjio-cgu.0
>>>		 
lto.tmp:(style::driver::should_report_statistics::he4cbd63b2025df9b)
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
gmake[4]: ***
[/wrkdirs/share/dim/ports/www/firefox/work/firefox-90.0/config/rules.mk:545:
libxul.so] Error 1

I think I've seen the "environ" error lots of times, but I forgot what the fix
was. The mozilla::ServoTraversalStatistics::sActive is completely unknown to
me, though.