This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] ppc64 reset minimum kernel and use kernel feature instead


After trying to build glibc on a stock Suse SLES 8 system I see Andreas
has valid concern. Even with new (2.4.21) kernel headers the glibc make
fails when it tries to build the sunrpc library (Fatal: kernel too old).

So the attached patch will set the minimum kernel for PowerPC64 back to
2.4.19 update kernel-features.h to define __ASSUME_NEW_PRCTL_SYSCALL and
__ASSUME_NEW_RT_SIGRETURN_SYSCALL for __powerpc64__ on 2.4.21+ kernels.
In patches to follow (fe_nomask and get/make/set/swapcontext) I will use
the absence of these definitions to render fe_nomask and
get/make/set/swapcontext safe to run on pre 2.4.21 kernels. 

2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>

        * sysdeps/unix/sysv/linux/configure.in: Change
arch_minimum_kernel 
	back to 2.4.19 for powerpc64.
	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_NEW_PRCTL_SYSCALL): Define for powerpc64.
	(__ASSUME_NEW_RT_SIGRETURN_SYSCALL): Define for powerpc64.

-- 
Steven Munroe
sjmunroe@us.ibm.com
Linux on PowerPC-64 Development
GLIBC for PowerPC-64 Development
diff -rupPN libc23-cvstip-20030131/sysdeps/unix/sysv/linux/configure.in libc23/sysdeps/unix/sysv/linux/configure.in
--- libc23-cvstip-20030131/sysdeps/unix/sysv/linux/configure.in	2003-01-16 18:59:02.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/configure.in	2003-01-31 11:11:45.000000000 -0600
@@ -80,7 +80,7 @@ case "$machine" in
     arch_minimum_kernel=2.0.10
     ;;
   powerpc/powerpc64)
-    arch_minimum_kernel=2.4.21
+    arch_minimum_kernel=2.4.19
     ;;
   s390/s390-32)
     libc_cv_gcc_unwind_find_fde=yes
diff -rupPN  libc23-cvstip-20030131/sysdeps/unix/sysv/linux/kernel-features.h libc23/sysdeps/unix/sysv/linux/kernel-features.h
--- libc23-cvstip-20030131/sysdeps/unix/sysv/linux/kernel-features.h	2003-01-12 13:37:12.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/kernel-features.h	2003-01-31 15:14:36.000000000 -0600
@@ -210,6 +210,19 @@
 # define __ASSUME_MMAP2_SYSCALL		1
 #endif
 
+/* Starting with 2.4.21 PowerPC64 implements the new prctl syscall.
+   This allows applications to get/set the Floating Point Exception Mode.  */
+#if __LINUX_KERNEL_VERSION >= (132096+21) && defined __powerpc64__
+# define __ASSUME_NEW_PRCTL_SYSCALL		1
+#endif
+
+/* Starting with 2.4.21 PowerPC64 implements the new rt_sigreturn syscall.
+   The new rt_sigreturn takes an ucontext pointer allowing rt_sigreturn
+   to be used in the set/swapcontext implementation.  */
+#if __LINUX_KERNEL_VERSION >= (132096+21) && defined __powerpc64__
+# define __ASSUME_NEW_RT_SIGRETURN_SYSCALL		1
+#endif
+
 /* On x86, the set_thread_area syscall was introduced in 2.5.29, but its
    semantics was changed in 2.5.30, and again after 2.5.31.  */
 #if __LINUX_KERNEL_VERSION >= 132384 && defined __i386__

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]