summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2005-05-19 17:26:27 +0000
committerwtchang%redhat.com <devnull@localhost>2005-05-19 17:26:27 +0000
commit9a7aa641e4d235a59fc825e311454932316a5e5b (patch)
tree1c90ae848d171060b139589974ff1335656f9571
parentb10016bbf75275b183c40191910ac2602b76361d (diff)
downloadnspr-hg-9a7aa641e4d235a59fc825e311454932316a5e5b.tar.gz
Bugzilla bug 293438: use -fvisibility=hidden, without wrapped systemTHUNDERBIRD_1_1a1_RELEASEFIREFOX_1_1a1_RELEASE
headers and without gcc_hidden.h, because we can't build on Linux x86-64 with the GCC visibility pragmas. r=bryner. a=asa for mozilla1.8b2/aviary1.1a1. Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rwxr-xr-xconfigure73
-rw-r--r--configure.in15
2 files changed, 55 insertions, 33 deletions
diff --git a/configure b/configure
index 0d643171..f3b0ffd6 100755
--- a/configure
+++ b/configure
@@ -2628,8 +2628,19 @@ echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
#define HAVE_VISIBILITY_PRAGMA 1
EOF
- VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
- WRAP_SYSTEM_INCLUDES=1
+ # To work around a build problem on Linux x86-64 (Bugzilla bug
+ # 293438), we use the -fvisibility=hidden flag. This flag is less
+ # optimal than #pragma GCC visibility push(hidden) because the flag
+ # assumes that symbols defined outside the current source file have
+ # the default visibility. This has the advantage that we don't need
+ # to wrap system header files, but has the disadvantage that calls
+ # to hidden symbols defined in other source files cannot be
+ # optimized by the compiler. The -fvisibility=hidden flag does
+ # hide and export symbols correctly.
+ #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
+ #WRAP_SYSTEM_INCLUDES=1
+ VISIBILITY_FLAGS="-fvisibility=hidden"
+ WRAP_SYSTEM_INCLUDES=
fi
fi
fi # GNU_CC
@@ -2641,7 +2652,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2645: checking for $ac_word" >&5
+echo "configure:2656: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2886,17 +2897,17 @@ EOF
DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
-echo "configure:2890: checking for sys/atomic_op.h" >&5
+echo "configure:2901: checking for sys/atomic_op.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2895 "configure"
+#line 2906 "configure"
#include "confdefs.h"
#include <sys/atomic_op.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3053,7 +3064,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
-echo "configure:3057: checking for gethostbyaddr in -lbind" >&5
+echo "configure:3068: checking for gethostbyaddr in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3061,7 +3072,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3065 "configure"
+#line 3076 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3072,7 +3083,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
-if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4277,17 +4288,17 @@ EOF
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4281: checking for machine/builtins.h" >&5
+echo "configure:4292: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4286 "configure"
+#line 4297 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4829,7 +4840,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4833: checking for dlopen in -ldl" >&5
+echo "configure:4844: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4837,7 +4848,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4841 "configure"
+#line 4852 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4848,7 +4859,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4865,17 +4876,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4869: checking for dlfcn.h" >&5
+echo "configure:4880: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4874 "configure"
+#line 4885 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4908,13 +4919,13 @@ esac
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4912: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4923: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 4918 "configure"
+#line 4929 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4932,7 +4943,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4936 "configure"
+#line 4947 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4956,12 +4967,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4960: checking for $ac_func" >&5
+echo "configure:4971: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4965 "configure"
+#line 4976 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4984,7 +4995,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5025,7 +5036,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5029: checking for +Olit support" >&5
+echo "configure:5040: checking for +Olit support" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5059,7 +5070,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5063: checking for pthread_create in -lpthreads" >&5
+echo "configure:5074: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5081,7 +5092,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5085: checking for pthread_create in -lpthread" >&5
+echo "configure:5096: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5103,7 +5114,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5107: checking for pthread_create in -lc_r" >&5
+echo "configure:5118: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5125,7 +5136,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5129: checking for pthread_create in -lc" >&5
+echo "configure:5140: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5277,7 +5288,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5281: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5292: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5300,7 +5311,7 @@ echo "configure:5281: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5304: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5315: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
diff --git a/configure.in b/configure.in
index e1f070e2..aa3b7669 100644
--- a/configure.in
+++ b/configure.in
@@ -526,8 +526,19 @@ EOF
])
if test "$ac_cv_visibility_pragma" = "yes"; then
AC_DEFINE(HAVE_VISIBILITY_PRAGMA)
- VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
- WRAP_SYSTEM_INCLUDES=1
+ # To work around a build problem on Linux x86-64 (Bugzilla bug
+ # 293438), we use the -fvisibility=hidden flag. This flag is less
+ # optimal than #pragma GCC visibility push(hidden) because the flag
+ # assumes that symbols defined outside the current source file have
+ # the default visibility. This has the advantage that we don't need
+ # to wrap system header files, but has the disadvantage that calls
+ # to hidden symbols defined in other source files cannot be
+ # optimized by the compiler. The -fvisibility=hidden flag does
+ # hide and export symbols correctly.
+ #VISIBILITY_FLAGS='-I$(dist_includedir)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
+ #WRAP_SYSTEM_INCLUDES=1
+ VISIBILITY_FLAGS="-fvisibility=hidden"
+ WRAP_SYSTEM_INCLUDES=
fi
fi
fi # GNU_CC