diff options
author | seawood%netscape.com <devnull@localhost> | 2002-08-07 11:10:59 +0000 |
---|---|---|
committer | seawood%netscape.com <devnull@localhost> | 2002-08-07 11:10:59 +0000 |
commit | aced453024584a9c31c3f0ff96d1e2298779841b (patch) | |
tree | 653f1ee404dba53eaa534814562ce72835b2e375 | |
parent | 43cdbe68c37bddcb974b65efab34c06bf7f40147 (diff) | |
download | nspr-hg-aced453024584a9c31c3f0ff96d1e2298779841b.tar.gz |
Remove explicitly linking against -lc on linux as it could break backwards binary compatibility. Linking using gcc/g++ should automatically link against libc.
Thanks to Franz.Sirl-kernel@lauterbach.com for the patch.
Bug #72766 r=wtc,cls
-rwxr-xr-x | configure | 43 | ||||
-rw-r--r-- | configure.in | 1 |
2 files changed, 21 insertions, 23 deletions
@@ -3662,7 +3662,6 @@ EOF MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' - OS_LIBS="$OS_LIBS -lc" _OPTIMIZE_FLAGS=-O2 COMPILER_TAG=_glibc if echo "$OS_TEST" | grep -c 86 >/dev/null; then @@ -4163,17 +4162,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:4167: checking for machine/builtins.h" >&5 +echo "configure:4166: 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 4172 "configure" +#line 4171 "configure" #include "confdefs.h" #include <machine/builtins.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4176: \"$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* @@ -4680,12 +4679,12 @@ esac if test -z "$SKIP_LIBRARY_CHECKS"; then echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:4684: checking for dlopen" >&5 +echo "configure:4683: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4689 "configure" +#line 4688 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen(); below. */ @@ -4708,7 +4707,7 @@ dlopen(); ; return 0; } EOF -if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else @@ -4727,7 +4726,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4731: checking for dlopen in -ldl" >&5 +echo "configure:4730: 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 @@ -4735,7 +4734,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4739 "configure" +#line 4738 "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 @@ -4746,7 +4745,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4749: \"$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 @@ -4774,13 +4773,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:4778: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4777: 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 4784 "configure" +#line 4783 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -4798,7 +4797,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 4802 "configure" +#line 4801 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -4822,12 +4821,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4826: checking for $ac_func" >&5 +echo "configure:4825: 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 4831 "configure" +#line 4830 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4850,7 +4849,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4853: \"$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 @@ -4888,7 +4887,7 @@ fi echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:4892: checking for pthread_create in -lpthreads" >&5 +echo "configure:4891: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -4910,7 +4909,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:4914: checking for pthread_create in -lpthread" >&5 +echo "configure:4913: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -4932,7 +4931,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:4936: checking for pthread_create in -lc_r" >&5 +echo "configure:4935: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -4954,7 +4953,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:4958: checking for pthread_create in -lc" >&5 +echo "configure:4957: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5106,7 +5105,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:5110: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5109: 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 @@ -5129,7 +5128,7 @@ echo "configure:5110: 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:5133: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5132: 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 cc3cc06b..5e886893 100644 --- a/configure.in +++ b/configure.in @@ -1134,7 +1134,6 @@ case "$target" in MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' - OS_LIBS="$OS_LIBS -lc" _OPTIMIZE_FLAGS=-O2 COMPILER_TAG=_glibc if echo "$OS_TEST" | grep -c 86 >/dev/null; then |