From 85d3afc6eec85090b1d8d7f4986481cf6b1a6c59 Mon Sep 17 00:00:00 2001 From: "wtchang%redhat.com" Date: Fri, 11 Nov 2005 22:23:08 +0000 Subject: [PATCH] Bugzilla Bug 312199: HP-UX IPF (Itanium) changes contributed by Grace Lu of HP: use .so as shared library suffix, link shared libraries with +b $ORIGIN. r=wtc,darin. Modified Files: configure configure.in _hpux.h git-svn-id: svn://10.0.0.236/trunk@184485 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/configure | 63 +++++++++++++++------------ mozilla/nsprpub/configure.in | 13 ++++-- mozilla/nsprpub/pr/include/md/_hpux.h | 7 ++- 3 files changed, 51 insertions(+), 32 deletions(-) diff --git a/mozilla/nsprpub/configure b/mozilla/nsprpub/configure index 35e9cbba5c0..487dc6ef3c8 100755 --- a/mozilla/nsprpub/configure +++ b/mozilla/nsprpub/configure @@ -3463,10 +3463,6 @@ EOF cat >> confdefs.h <<\EOF #define _HPUX_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define hppa 1 EOF # OSF1 and HPUX report the POLLHUP event for a socket when the @@ -3481,10 +3477,21 @@ EOF #define _USE_BIG_FDS 1 EOF - DLL_SUFFIX=sl DSO_LDOPTS='-b +h $(notdir $@)' PR_MD_CSRCS=hpux.c - if test "$OS_TEST" != "ia64"; then + if test "$OS_TEST" = "ia64"; then + DLL_SUFFIX=so + DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'" + CPU_ARCH_TAG=_$OS_TEST + if test -z "$USE_64"; then + COMPILER_TAG=_32 + fi + else + cat >> confdefs.h <<\EOF +#define hppa 1 +EOF + + DLL_SUFFIX=sl PR_MD_ASFILES=os_HPUX.s fi if test -n "$USE_64"; then @@ -4393,17 +4400,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:4397: checking for machine/builtins.h" >&5 +echo "configure:4404: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4414: \"$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* @@ -4965,7 +4972,7 @@ case $target in ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4969: checking for dlopen in -ldl" >&5 +echo "configure:4976: 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 @@ -4973,7 +4980,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4995: \"$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 @@ -5001,17 +5008,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:5005: checking for dlfcn.h" >&5 +echo "configure:5012: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5022: \"$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* @@ -5044,13 +5051,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:5048: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5055: 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 < Autoconf TIOCGETP @@ -5068,7 +5075,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -5092,12 +5099,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5096: checking for $ac_func" >&5 +echo "configure:5103: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5131: \"$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 @@ -5161,7 +5168,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5165: checking for +Olit support" >&5 +echo "configure:5172: 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 @@ -5200,7 +5207,7 @@ darwin*) *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5204: checking for pthread_create in -lpthreads" >&5 +echo "configure:5211: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { return v; } @@ -5222,7 +5229,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5226: checking for pthread_create in -lpthread" >&5 +echo "configure:5233: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { return v; } @@ -5244,7 +5251,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5248: checking for pthread_create in -lc_r" >&5 +echo "configure:5255: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { return v; } @@ -5266,7 +5273,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5270: checking for pthread_create in -lc" >&5 +echo "configure:5277: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { return v; } @@ -5420,7 +5427,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:5424: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5431: 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 @@ -5443,7 +5450,7 @@ echo "configure:5424: 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:5447: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5454: 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/mozilla/nsprpub/configure.in b/mozilla/nsprpub/configure.in index e24dd82409a..fbe7dfba6e1 100644 --- a/mozilla/nsprpub/configure.in +++ b/mozilla/nsprpub/configure.in @@ -1093,17 +1093,24 @@ tools are selected during the Xcode/Developer Tools installation.]) AC_DEFINE(XP_UNIX) AC_DEFINE(HPUX) AC_DEFINE(_HPUX_SOURCE) - AC_DEFINE(hppa) # OSF1 and HPUX report the POLLHUP event for a socket when the # shutdown(SHUT_WR) operation is called for the remote end, even though # the socket is still writeable. Use select(), instead of poll(), to # workaround this problem. AC_DEFINE(_PR_POLL_WITH_SELECT) AC_DEFINE(_USE_BIG_FDS) - DLL_SUFFIX=sl DSO_LDOPTS='-b +h $(notdir $@)' PR_MD_CSRCS=hpux.c - if test "$OS_TEST" != "ia64"; then + if test "$OS_TEST" = "ia64"; then + DLL_SUFFIX=so + DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'" + CPU_ARCH_TAG=_$OS_TEST + if test -z "$USE_64"; then + COMPILER_TAG=_32 + fi + else + AC_DEFINE(hppa) + DLL_SUFFIX=sl PR_MD_ASFILES=os_HPUX.s fi if test -n "$USE_64"; then diff --git a/mozilla/nsprpub/pr/include/md/_hpux.h b/mozilla/nsprpub/pr/include/md/_hpux.h index 7392831355e..9c294dc5b7a 100644 --- a/mozilla/nsprpub/pr/include/md/_hpux.h +++ b/mozilla/nsprpub/pr/include/md/_hpux.h @@ -44,8 +44,13 @@ #define PR_LINKER_ARCH "hpux" #define _PR_SI_SYSNAME "HPUX" -#define _PR_SI_ARCHITECTURE "hppa1.1" +#ifdef __ia64 +#define _PR_SI_ARCHITECTURE "ia64" +#define PR_DLL_SUFFIX ".so" +#else +#define _PR_SI_ARCHITECTURE "hppa" #define PR_DLL_SUFFIX ".sl" +#endif #define _PR_VMBASE 0x30000000 #define _PR_STACK_VMBASE 0x50000000