On 4/22/2014 6:41 PM, Robert O'Callahan wrote:


On B2G and Android we're compiling with -fvisibility=hidden. configure output says:
checking For gcc visibility bug with class-level attributes (GCC bug 26905)... 
yes
checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)... yes
Is that a problem?

Yes! We can probably get codesize, startup perf, and runtime perf gains of 3-8% by fixing this. There was a recent thread in dev.builds about this, actually, which I didn't realize was related but probably is:


I found a bug in configure.in around line 2640:

                       ac_cv_have_visibility_builtin_bug=no
if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
                         ac_cv_have_visibility_builtin_bug=yes
                       else
                         if test `grep -c "@PLT" conftest.S` = 0; then
                           ac_cv_visibility_builtin_bug=yes
                         fi
                       fi

The second 'if' uses a wrong variable name, so the result of 'grep' is effectively ignored. The problem is that if I fix this bug, clang (3.4.1) fails this test (it optimizes all code out with -O2), the configuration variables (related to -fvisibility) are changed accordingly, and then a simple firefox build fails. The same bug is also in js/src/configure.in.

We should either fix or remove this configure test. I think that removing it and always using pragmas is probably correct, but we might need to opt mac out of that because our list of system headers on mac isn't up to date.

--BDS

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to