Bug 332942: use 'uname -p' instead of 'uname -m' to determine if we're

building on SPARC.  Note that we may not be able to build NSPR on SPARC V8
after this change.  If that's a problem, please reopen this bug.  The patch
is contributed by Julien Pierre <julien.pierre.boogz@sun.com>.  r=wtc.
Modified Files:
	configure configure.in pr/src/Makefile.in
	pr/src/md/unix/Makefile.in
This commit is contained in:
wtc%google.com 2008-06-07 20:25:59 +00:00
Родитель c100cdd4ad
Коммит d36f687b32
4 изменённых файлов: 29 добавлений и 27 удалений

43
nsprpub/configure поставляемый
Просмотреть файл

@ -4760,6 +4760,7 @@ EOF
#define HAVE_FCNTL_FILE_LOCKING 1
EOF
CPU_ARCH=`uname -p`
MDCPUCFG_H=_solaris.cfg
PR_MD_CSRCS=solaris.c
LD=/usr/ccs/bin/ld
@ -4889,8 +4890,8 @@ EOF
;;
esac
if test "$OS_TEST" = "sun4u"; then
# 64-bit Solaris requires SPARC V9 architecture, so the following
if test "$CPU_ARCH" = "sparc"; then
# 64-bit SPARC Solaris requires V9 architecture, so the following
# is not needed.
if test -z "$USE_64"; then
ULTRASPARC_LIBRARY=nspr_flt
@ -5026,7 +5027,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:5030: checking for dlopen in -ldl" >&5
echo "configure:5031: 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
@ -5034,7 +5035,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5038 "configure"
#line 5039 "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
@ -5045,7 +5046,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:5049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5050: \"$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
@ -5062,17 +5063,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:5066: checking for dlfcn.h" >&5
echo "configure:5067: 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 5071 "configure"
#line 5072 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5077: \"$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*
@ -5105,13 +5106,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:5109: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:5110: 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 5115 "configure"
#line 5116 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -5129,7 +5130,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 5133 "configure"
#line 5134 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -5153,12 +5154,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5157: checking for $ac_func" >&5
echo "configure:5158: 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 5162 "configure"
#line 5163 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5181,7 +5182,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5186: \"$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
@ -5222,7 +5223,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
echo "configure:5226: checking for +Olit support" >&5
echo "configure:5227: 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
@ -5261,7 +5262,7 @@ darwin*)
*)
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:5265: checking for pthread_create in -lpthreads" >&5
echo "configure:5266: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5283,7 +5284,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5287: checking for pthread_create in -lpthread" >&5
echo "configure:5288: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5305,7 +5306,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5309: checking for pthread_create in -lc_r" >&5
echo "configure:5310: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5327,7 +5328,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5331: checking for pthread_create in -lc" >&5
echo "configure:5332: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5459,7 +5460,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:5463: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5464: 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
@ -5482,7 +5483,7 @@ echo "configure:5463: 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:5486: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5487: 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

Просмотреть файл

@ -1980,6 +1980,7 @@ mips-sony-newsos*)
AC_DEFINE(__svr4__)
AC_DEFINE(SOLARIS)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
CPU_ARCH=`uname -p`
MDCPUCFG_H=_solaris.cfg
PR_MD_CSRCS=solaris.c
LD=/usr/ccs/bin/ld
@ -2088,8 +2089,8 @@ mips-sony-newsos*)
AC_DEFINE(_PR_INET6)
;;
esac
if test "$OS_TEST" = "sun4u"; then
# 64-bit Solaris requires SPARC V9 architecture, so the following
if test "$CPU_ARCH" = "sparc"; then
# 64-bit SPARC Solaris requires V9 architecture, so the following
# is not needed.
if test -z "$USE_64"; then
ULTRASPARC_LIBRARY=nspr_flt

Просмотреть файл

@ -94,11 +94,11 @@ OS_LIBS = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
else
OS_LIBS = -lsocket -lnsl -ldl -lc
endif # USE_PTHREADS
ifeq ($(OS_TEST),sun4u)
ifeq ($(CPU_ARCH),sparc)
ifndef USE_64
DSO_LDOPTS += -Wl,-f,\$$ORIGIN/cpu/\$$ISALIST/lib$(ULTRASPARC_LIBRARY)$(LIBRARY_VERSION).so
endif
endif # sun4u
endif # sparc
endif # 4.1.3_U1
endif # SunOS

Просмотреть файл

@ -69,7 +69,7 @@ TARGETS = $(OBJS)
ifeq ($(OS_ARCH),SunOS)
ifneq ($(OS_RELEASE),4.1.3_U1)
ifeq ($(OS_TEST),sun4u)
ifeq ($(CPU_ARCH),sparc)
ifdef USE_64
ULTRASPARC_ASFILES = os_SunOS_sparcv9.s
ULTRASPARC_ASOBJS = $(addprefix $(OBJDIR)/,$(ULTRASPARC_ASFILES:.s=.$(OBJ_SUFFIX)))
@ -97,7 +97,7 @@ export:: $(TARGETS)
ifeq ($(OS_ARCH),SunOS)
ifneq ($(OS_RELEASE),4.1.3_U1)
ifeq ($(OS_TEST),sun4u)
ifeq ($(CPU_ARCH),sparc)
ifdef USE_64
$(ULTRASPARC_ASOBJS): $(ULTRASPARC_ASFILES)