From: Roland McGrath Date: Sun, 29 Sep 2002 11:32:03 +0000 (+0000) Subject: * sysdeps/unix/sysv/linux/sparc/sysdep.h (inline_syscall0): Make asm X-Git-Tag: cvs/glibc-2-3~51 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=72d4c33d4ca847466c4557024376a2234838a505;p=glibc.git * sysdeps/unix/sysv/linux/sparc/sysdep.h (inline_syscall0): Make asm volatile. (inline_syscall1, inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5, inline_syscall6): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (INLINE_SYSCALL): Likewise. 2002-09-29 Roland McGrath * configure.in (libc_cv_ranlib_necessary check): Put the .o file in the archive, not the .c file. * configure: Regenerated. --- diff --git a/ChangeLog b/ChangeLog index a23bd9d3f8..a8aa0dd48c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2002-09-29 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sparc/sysdep.h (inline_syscall0): Make asm + volatile. + (inline_syscall1, inline_syscall2, inline_syscall3, inline_syscall4, + inline_syscall5, inline_syscall6): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL): + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (INLINE_SYSCALL): + Likewise. + +2002-09-29 Roland McGrath + + * configure.in (libc_cv_ranlib_necessary check): Put the .o file in + the archive, not the .c file. + * configure: Regenerated. + 2002-09-29 Roland McGrath * configure: Regenerated after aclocal.m4 change. diff --git a/configure b/configure index 791f8fbe29..19cdeca11c 100755 --- a/configure +++ b/configure @@ -3697,36 +3697,11 @@ if test "$libc_cv_gcc___thread" = yes; then #define HAVE___THREAD 1 EOF - - echo $ac_n "checking whether __attribute__((tls_model())) is supported ""... $ac_c" 1>&6 -echo "configure:3703: checking whether __attribute__((tls_model())) is supported " >&5 -if eval "test \"`echo '$''{'libc_cv_gcc_attribute_tls_model'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<\EOF - extern __thread int a __attribute__ ((tls_model ("initial-exec"))); - int foo (void) { return a; } - EOF - if { ac_try='${CC-cc} $CFLAGS -c conftest.c >&5'; { (eval echo configure:3711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - libc_cv_gcc_attribute_tls_model=yes - else - libc_cv_gcc_attribute_tls_model=no - fi - rm -f conftest* -fi - -echo "$ac_t""$libc_cv_gcc_attribute_tls_model" 1>&6 - if test "$libc_cv_gcc_attribute_tls_model" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ATTRIBUTE_TLS_MODEL 1 -EOF - - fi fi echo $ac_n "checking for libgd""... $ac_c" 1>&6 -echo "configure:3730: checking for libgd" >&5 +echo "configure:3705: checking for libgd" >&5 if test "$with_gd" != "no"; then old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $libgd_include" @@ -3735,14 +3710,14 @@ if test "$with_gd" != "no"; then old_LIBS="$LIBS" LIBS="$LIBS -lgd -lpng -lz -lm" cat > conftest.$ac_ext < int main() { gdImagePng (0, 0) ; return 0; } EOF -if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBGD=yes else @@ -3762,7 +3737,7 @@ echo "$ac_t""$LIBGD" 1>&6 echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:3766: checking size of long double" >&5 +echo "configure:3741: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3770,7 +3745,7 @@ else ac_cv_sizeof_long_double=0 else cat > conftest.$ac_ext < int main() @@ -3781,7 +3756,7 @@ int main() return(0); } EOF -if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_double=`cat conftestval` else @@ -3859,7 +3834,7 @@ if test "$uname" = "sysdeps/generic"; then fi echo $ac_n "checking OS release for uname""... $ac_c" 1>&6 -echo "configure:3863: checking OS release for uname" >&5 +echo "configure:3838: checking OS release for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3881,7 +3856,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6 uname_release="$libc_cv_uname_release" echo $ac_n "checking OS version for uname""... $ac_c" 1>&6 -echo "configure:3885: checking OS version for uname" >&5 +echo "configure:3860: checking OS version for uname" >&5 if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3910,7 +3885,7 @@ EOF # Test for old glibc 2.0.x headers so that they can be removed properly # Search only in includedir. echo $ac_n "checking for old glibc 2.0.x headers""... $ac_c" 1>&6 -echo "configure:3914: checking for old glibc 2.0.x headers" >&5 +echo "configure:3889: checking for old glibc 2.0.x headers" >&5 if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h" then old_glibc_headers=yes @@ -3971,7 +3946,7 @@ if test $shared = default; then fi echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6 -echo "configure:3975: checking whether -fPIC is default" >&5 +echo "configure:3950: checking whether -fPIC is default" >&5 if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index 2293f7538f..d3d713148b 100644 --- a/configure.in +++ b/configure.in @@ -651,7 +651,7 @@ char b; void c(void) {} EOF $CC $CFLAGS -c conftest.c -$AR cr conftest.a conftest.c +$AR cr conftest.a conftest.o cp conftest.a conftest2.a $RANLIB conftest.a if cmp -s conftest.a conftest2.a; then @@ -1588,7 +1588,7 @@ fi dnl Check whether the compiler supports the __thread keyword. AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread, -[cat > conftest.c < conftest.c <<\EOF __thread int a = 42; EOF if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AC_FD_CC]); then diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index 524a32b9b4..0559210755 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -41,11 +41,11 @@ ({ \ long ret, err; \ LOADARGS_##nr(name, args); \ - __asm__ ("sc\n\t" \ - "mfcr %1\n\t" \ - : "=r" (r3), "=r" (err) \ - : ASM_INPUT_##nr \ - : "cc", "memory"); \ + __asm __volatile ("sc\n\t" \ + "mfcr %1\n\t" \ + : "=r" (r3), "=r" (err) \ + : ASM_INPUT_##nr \ + : "cc", "memory"); \ ret = r3; \ if (err & 1 << 28) \ { \ diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 8e43a39c10..4031959df3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -57,11 +57,11 @@ DECLARGS_##nr; \ long ret, err; \ LOADARGS_##nr(name, args); \ - __asm__ ("sc\n\t" \ - "mfcr %1\n\t" \ - : "=r" (r3), "=r" (err) \ - : ASM_INPUT_##nr \ - : "cc", "memory"); \ + __asm __volatile ("sc\n\t" \ + "mfcr %1\n\t" \ + : "=r" (r3), "=r" (err) \ + : ASM_INPUT_##nr \ + : "cc", "memory"); \ ret = r3; \ if (err & 1 << 28) \ { \ @@ -123,18 +123,20 @@ register long r8 __asm__ ("r8"); \ long ret, err; \ LOADARGS_##nr(name, args); \ - __asm__ ("sc\n\t" \ - "mfcr %7\n\t" \ - : "=r" (r0), "=r" (r3), "=r" (r4), "=r" (r5), \ - "=r" (r6), "=r" (r7), "=r" (r8), "=r" (err) \ - : ASM_INPUT_##nr \ - : "r9", "r10", "r11", "r12", \ - "fr0", "fr1", "fr2", "fr3", \ - "fr4", "fr5", "fr6", "fr7", \ - "fr8", "fr9", "fr10", "fr11", \ - "fr12", "fr13", \ - "ctr", "lr", \ - "cr0", "cr1", "cr5", "cr6", "cr7", "memory"); \ + __asm __volatile ("sc\n\t" \ + "mfcr %7\n\t" \ + : "=r" (r0), "=r" (r3), "=r" (r4), \ + "=r" (r5), "=r" (r6), "=r" (r7), \ + "=r" (r8), "=r" (err) \ + : ASM_INPUT_##nr \ + : "r9", "r10", "r11", "r12", \ + "fr0", "fr1", "fr2", "fr3", \ + "fr4", "fr5", "fr6", "fr7", \ + "fr8", "fr9", "fr10", "fr11", \ + "fr12", "fr13", \ + "ctr", "lr", \ + "cr0", "cr1", "cr5", "cr6", "cr7", \ + "memory"); \ ret = r3; \ if (err & 1 << 28) \ { \ diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h index f128f4e43f..cf59f12972 100644 --- a/sysdeps/unix/sysv/linux/sparc/sysdep.h +++ b/sysdeps/unix/sysv/linux/sparc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2000. @@ -27,9 +27,9 @@ ({ \ register long __o0 __asm__ ("o0"); \ register long __g1 __asm__ ("g1") = __NR_##name; \ - __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ - "0" (__g1) : \ - __SYSCALL_CLOBBERS); \ + __asm __volatile (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1) : \ + __SYSCALL_CLOBBERS); \ __o0; \ }) @@ -37,9 +37,9 @@ ({ \ register long __o0 __asm__ ("o0") = (long)(arg1); \ register long __g1 __asm__ ("g1") = __NR_##name; \ - __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ - "0" (__g1), "1" (__o0) : \ - __SYSCALL_CLOBBERS); \ + __asm __volatile (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0) : \ + __SYSCALL_CLOBBERS); \ __o0; \ }) @@ -48,9 +48,9 @@ register long __o0 __asm__ ("o0") = (long)(arg1); \ register long __o1 __asm__ ("o1") = (long)(arg2); \ register long __g1 __asm__ ("g1") = __NR_##name; \ - __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ - "0" (__g1), "1" (__o0), "r" (__o1) : \ - __SYSCALL_CLOBBERS); \ + __asm __volatile (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0), "r" (__o1) : \ + __SYSCALL_CLOBBERS); \ __o0; \ }) @@ -60,9 +60,10 @@ register long __o1 __asm__ ("o1") = (long)(arg2); \ register long __o2 __asm__ ("o2") = (long)(arg3); \ register long __g1 __asm__ ("g1") = __NR_##name; \ - __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ - "0" (__g1), "1" (__o0), "r" (__o1), "r" (__o2) : \ - __SYSCALL_CLOBBERS); \ + __asm __volatile (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0), "r" (__o1), \ + "r" (__o2) : \ + __SYSCALL_CLOBBERS); \ __o0; \ }) @@ -73,10 +74,10 @@ register long __o2 __asm__ ("o2") = (long)(arg3); \ register long __o3 __asm__ ("o3") = (long)(arg4); \ register long __g1 __asm__ ("g1") = __NR_##name; \ - __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ - "0" (__g1), "1" (__o0), "r" (__o1), "r" (__o2), \ - "r" (__o3) : \ - __SYSCALL_CLOBBERS); \ + __asm __volatile (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0), "r" (__o1), \ + "r" (__o2), "r" (__o3) : \ + __SYSCALL_CLOBBERS); \ __o0; \ }) @@ -88,10 +89,10 @@ register long __o3 __asm__ ("o3") = (long)(arg4); \ register long __o4 __asm__ ("o4") = (long)(arg5); \ register long __g1 __asm__ ("g1") = __NR_##name; \ - __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ - "0" (__g1), "1" (__o0), "r" (__o1), "r" (__o2), \ - "r" (__o3), "r" (__o4) : \ - __SYSCALL_CLOBBERS); \ + __asm __volatile (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0), "r" (__o1), \ + "r" (__o2), "r" (__o3), "r" (__o4) : \ + __SYSCALL_CLOBBERS); \ __o0; \ }) @@ -104,10 +105,11 @@ register long __o4 __asm__ ("o4") = (long)(arg5); \ register long __o5 __asm__ ("o5") = (long)(arg6); \ register long __g1 __asm__ ("g1") = __NR_##name; \ - __asm__ (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ - "0" (__g1), "1" (__o0), "r" (__o1), "r" (__o2), \ - "r" (__o3), "r" (__o4), "r" (__o5) : \ - __SYSCALL_CLOBBERS); \ + __asm __volatile (__SYSCALL_STRING : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0), "r" (__o1), \ + "r" (__o2), "r" (__o3), "r" (__o4), \ + "r" (__o5) : \ + __SYSCALL_CLOBBERS); \ __o0; \ })