Closed Bug 1523851 Opened 5 years ago Closed 5 years ago

Make ac_cv_prog_cc_works really act as a cache

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(5 files)

No description provided.

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.

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

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
"no".

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

Depends on D18055

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

Depends on D18057

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/bf3ead324b24
Remove AC_PROG_GCC_TRADITIONAL test. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/697b9cab7789
Remove the AC_FUNC_MEMCMP test. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/699954de14e3
Remove the dynamic_cast<void*> test. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/d7d0d7ad4c0b
Remove system sqlite compile option tests. r=mak
https://hg.mozilla.org/integration/autoland/rev/6a22ba01cdfb
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.

Attachment

General

Created:
Updated:
Size: