Make ac_cv_prog_cc_works really act as a cache

RESOLVED FIXED in Firefox 67


5 months ago
5 months ago


(Reporter: glandium, Assigned: glandium)


Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)



(5 attachments)



5 months ago
No description provided.

Comment 1

5 months ago

While not related, it turns out this test was opted in by ourselves,
while it's practically useless. Recent autoconf documentation says it's
obsolescent, and even autoconf 2.13 documentation said with "recent
versions of the GNU C compiler", the issue it's detecting "is becoming
a less prevalent problem". Recent as of 20 years ago.


Comment 2

5 months ago

Autoconf 2.13 documentation says: "If the memcmp function is not
available, or does not work on 8-bit data (like the one on SunOS 4.1.3),
add `memcmp.o' to output variable LIBOBJS."

The documentation of more recent versions of autoconf also mention NeXT
x86 OpenStep, and say "This macro is obsolescent, as current systems
have a working memcmp. New programs need not use this macro."

We're also not using LIBOBJS, so, even if somehow some machine had the
test detect something weird going on, the result of the test wouldn't
have an effect on the build anyways.

Apart from that, it's also one of the few tests that relies on actually
running a compiled binary during configure, which requires some
autoconf-specific definition of cross-compilation (where --target=i686
--host=x86_64 is not cross-compilation), and we're better off getting
rid of such tests completely.

Depends on D18054


Comment 3

5 months ago

It relies on AC_TRY_RUN, which doesn't work on cross-compiles. What this
means is that the feature has been disabled on mac builds on automation
ever since we switched to cross-compiles. It's still enabled on local
mac builds because the test runs there, and returns "yes". It also means
it's disabled on Android, where it probably works (at least debug tests
on try don't complain).

It also doesn't currently run on Windows because it's in a skipped
section on Windows, but if moved out of that section, the test returns

So, we remove any configure test for the feature, in favor of
preprocessor checks in nsTraceRefcnt.cpp.

Depends on D18055


Comment 4

5 months ago

Those tests rely on the build not being a cross-compile, which is fine
most of the time, but more importantly, rely on the fact that the
version of sqlite that Firefox is being built against is the same as the
one it will be running against, which is not likely to be true.

So, all in all, it's better to do the checks at runtime.

Depends on D18056


Comment 5

5 months ago

Depends on D18057

Comment 6

5 months ago
Pushed by
Remove AC_PROG_GCC_TRADITIONAL test. r=froydnj
Remove the AC_FUNC_MEMCMP test. r=froydnj
Remove the dynamic_cast<void*> test. r=froydnj
Remove system sqlite compile option tests. r=mak
Make ac_cv_prog_*_works act as a cache. r=froydnj
You need to log in before you can comment on or make changes to this bug.