diff options
author | wtc%google.com <devnull@localhost> | 2008-01-24 05:00:04 +0000 |
---|---|---|
committer | wtc%google.com <devnull@localhost> | 2008-01-24 05:00:04 +0000 |
commit | 308290a67a7136e70df568a1bc2aeadf8c10f575 (patch) | |
tree | 691115b7d20a8678fc4a4e13d5ef89bc11dbc749 | |
parent | 5fdf30fc2561deda9aabd55e09734221a1aad96f (diff) | |
download | nspr-hg-308290a67a7136e70df568a1bc2aeadf8c10f575.tar.gz |
Bug 296878: disable the use of os_Linux_ppc.s for 64-bit PowerPC builds
because the assembly code crashes. Add nonexecutable stack directive
to os_Linux_ppc.s.
Modified files: configure.in configure _linux.h os_Linux_ppc.s
-rwxr-xr-x | configure | 47 | ||||
-rw-r--r-- | configure.in | 3 | ||||
-rw-r--r-- | pr/include/md/_linux.h | 2 | ||||
-rw-r--r-- | pr/src/md/unix/os_Linux_ppc.s | 3 |
4 files changed, 30 insertions, 25 deletions
@@ -3931,10 +3931,11 @@ EOF PR_MD_ASFILES=os_Linux_ppc.s ;; powerpc64) - PR_MD_ASFILES=os_Linux_ppc.s if test -n "$USE_64"; then CC="$CC -m64" CXX="$CXX -m64" + else + PR_MD_ASFILES=os_Linux_ppc.s fi ;; m68k) @@ -4473,17 +4474,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:4477: checking for machine/builtins.h" >&5 +echo "configure:4478: 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 4482 "configure" +#line 4483 "configure" #include "confdefs.h" #include <machine/builtins.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4488: \"$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* @@ -5053,7 +5054,7 @@ case $target in ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:5057: checking for dlopen in -ldl" >&5 +echo "configure:5058: 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 @@ -5061,7 +5062,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 5065 "configure" +#line 5066 "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 @@ -5072,7 +5073,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:5076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5077: \"$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 @@ -5089,17 +5090,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:5093: checking for dlfcn.h" >&5 +echo "configure:5094: 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 5098 "configure" +#line 5099 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5104: \"$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* @@ -5132,13 +5133,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:5136: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5137: 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 5142 "configure" +#line 5143 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -5156,7 +5157,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 5160 "configure" +#line 5161 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -5180,12 +5181,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5184: checking for $ac_func" >&5 +echo "configure:5185: 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 5189 "configure" +#line 5190 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5208,7 +5209,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5213: \"$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 @@ -5249,7 +5250,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5253: checking for +Olit support" >&5 +echo "configure:5254: 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 @@ -5288,7 +5289,7 @@ darwin*) *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5292: checking for pthread_create in -lpthreads" >&5 +echo "configure:5293: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5310,7 +5311,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5314: checking for pthread_create in -lpthread" >&5 +echo "configure:5315: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5332,7 +5333,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5336: checking for pthread_create in -lc_r" >&5 +echo "configure:5337: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5354,7 +5355,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5358: checking for pthread_create in -lc" >&5 +echo "configure:5359: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5508,7 +5509,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:5512: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5513: 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 @@ -5531,7 +5532,7 @@ echo "configure:5512: 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:5535: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5536: 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 3e66a3bb..5355d1a4 100644 --- a/configure.in +++ b/configure.in @@ -1465,10 +1465,11 @@ tools are selected during the Xcode/Developer Tools installation.]) PR_MD_ASFILES=os_Linux_ppc.s ;; powerpc64) - PR_MD_ASFILES=os_Linux_ppc.s if test -n "$USE_64"; then CC="$CC -m64" CXX="$CXX -m64" + else + PR_MD_ASFILES=os_Linux_ppc.s fi ;; m68k) diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h index ef8e0b31..c6ee449e 100644 --- a/pr/include/md/_linux.h +++ b/pr/include/md/_linux.h @@ -138,7 +138,7 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval); #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet #endif -#if defined(__powerpc__) +#if defined(__powerpc__) && !defined(__powerpc64__) #define _PR_HAVE_ATOMIC_OPS #define _MD_INIT_ATOMIC() extern PRInt32 _PR_ppc_AtomicIncrement(PRInt32 *val); diff --git a/pr/src/md/unix/os_Linux_ppc.s b/pr/src/md/unix/os_Linux_ppc.s index 80c60396..0e1c195d 100644 --- a/pr/src/md/unix/os_Linux_ppc.s +++ b/pr/src/md/unix/os_Linux_ppc.s @@ -102,3 +102,6 @@ _PR_ppc_AtomicAdd: mr 3,0 blr .Lfe4: .size _PR_ppc_AtomicAdd,.Lfe4-_PR_ppc_AtomicAdd + +# Magic indicating no need for an executable stack +.section .note.GNU-stack, "", @progbits ; .previous |