summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseawood%netscape.com <devnull@localhost>2002-08-07 11:34:04 +0000
committerseawood%netscape.com <devnull@localhost>2002-08-07 11:34:04 +0000
commitc0257c72ef73b3bcf50466ad67a9a13776564973 (patch)
tree18a4fd83735ddf2b6dcb148d2f11e34fdc1c8b26
parentfb700c5a33721756e686340f6f9e0eb569ac6229 (diff)
downloadnspr-hg-c0257c72ef73b3bcf50466ad67a9a13776564973.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-xconfigure43
-rw-r--r--configure.in1
-rw-r--r--pr/src/Makefile.in4
3 files changed, 23 insertions, 25 deletions
diff --git a/configure b/configure
index 446edb8a..f751ee95 100755
--- a/configure
+++ b/configure
@@ -3661,7 +3661,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
@@ -4160,17 +4159,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:4164: checking for machine/builtins.h" >&5
+echo "configure:4163: 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 4169 "configure"
+#line 4168 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4173: \"$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*
@@ -4677,12 +4676,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4681: checking for dlopen" >&5
+echo "configure:4680: 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 4686 "configure"
+#line 4685 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -4705,7 +4704,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4708: \"$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
@@ -4724,7 +4723,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4728: checking for dlopen in -ldl" >&5
+echo "configure:4727: 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
@@ -4732,7 +4731,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4736 "configure"
+#line 4735 "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
@@ -4743,7 +4742,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4746: \"$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
@@ -4771,13 +4770,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:4775: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4774: 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 4781 "configure"
+#line 4780 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4795,7 +4794,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4799 "configure"
+#line 4798 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4819,12 +4818,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4823: checking for $ac_func" >&5
+echo "configure:4822: 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 4828 "configure"
+#line 4827 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4847,7 +4846,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4850: \"$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
@@ -4885,7 +4884,7 @@ fi
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:4889: checking for pthread_create in -lpthreads" >&5
+echo "configure:4888: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4907,7 +4906,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:4911: checking for pthread_create in -lpthread" >&5
+echo "configure:4910: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4929,7 +4928,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:4933: checking for pthread_create in -lc_r" >&5
+echo "configure:4932: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4951,7 +4950,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:4955: checking for pthread_create in -lc" >&5
+echo "configure:4954: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5103,7 +5102,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:5107: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5106: 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
@@ -5126,7 +5125,7 @@ echo "configure:5107: 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:5130: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5129: 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 b3bbae91..465e01de 100644
--- a/configure.in
+++ b/configure.in
@@ -1133,7 +1133,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
diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
index d4af5676..3e68738c 100644
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -137,9 +137,9 @@ endif
ifeq ($(OS_ARCH),Linux)
ifeq ($(USE_PTHREADS), 1)
-OS_LIBS = -lpthread -ldl -lc
+OS_LIBS = -lpthread -ldl
else
-OS_LIBS = -ldl -lc
+OS_LIBS = -ldl
endif
endif