https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277021

--- Comment #75 from Tatsuki Makino <tatsuki_mak...@hotmail.com> ---
(In reply to jakub_lach from comment #74)
> I've wrote in comment #53

Yeah, you got 🥇 I got 🥈 or 🥉 on 𔔪 or nothing 🤣
But this can only be a workaround-patch, and we will need a fix-patch.
It seems that amd64 has reached a solution, but there is a reason why it
doesn't work on aarch64 as well.

(In reply to Tomoaki AOKI from comment #73)

Hmmm, this seems to be one cause and a combination of many different parts.
Perhaps :)

First, the entry point, /usr/local/lib/firefox/firefox binary, is linked
without -lm.
But it uses clang++15 to do the linking, so if libm is needed, it is
automatically linked.
Furthermore, since the only reason the binary needs libm is to use the floor
and ceil functions, those functions will no longer exist when compiled using
-march=havesse4.1cpu or -msse4.1, and libm will not be automatically linked.

Then, when firefox starts, it loads additional libraries.
The order depends on /usr/local/lib/firefox/dependentlibs.list.
However, this order is not altered by the definition of CPUTYPE. It doesn't
matter.
The first on that list, libgkcodecs.so, is a library that requires libm, but
libm is not linked.
Therefore, whether or not libm is loaded at this point determines whether the
startup is a success or failure.

It is in this vein, hmmm.

So far this is for amd64, and from here on for aarch64.

(In reply to Nuno Teixeira from comment #72)

The libraries to be linked may have changed for the same reason in aarch64.
However, if the conditions under which it is started do not exist at all, then
a patch is needed to suppress all of the following warnings.

ld.lld: warning: undefined symbol: floor

It is not only about floor.
All commands seem to include -Wl,--as-needed when linking, so unnecessary
libraries will not be linked.
It would not be a problem for libraries that change whether they are used or
not to also always be specified.

Also, I don't seem to be able to cross-compile aarch64 in the environment I
have, so we'll have to get someone else to help with the interesting
experiments. That is Mark-san, for example :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to