Skip to content

Commit

Permalink
Remove pre-2.4.1 Linux kernel support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Myers committed Jul 12, 2012
1 parent 7b6e99b commit ec332e9
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 80 deletions.
22 changes: 22 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
2012-07-12 Joseph Myers <joseph@codesourcery.com>

[BZ #13717]
* sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel):
Change to 2.4.1 where previously 2.4.0.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* sysdeps/unix/sysv/linux/kernel-features.h [!__sh__]
(__ASSUME_ST_INO_64_BIT): Do not condition definition on kernel
version.
[__i386__ || __sparc__] (__ASSUME_FCNTL64): Likewise.
(__ASSUME_AT_CLKTCK): Remove.
(__ASSUME_AT_PAGESIZE): Likewise.
(__ASSUME_AT_XID): Likewise.
(__ASSUME_GETDENTS64_SYSCALL): Define unconditionally.
[__i386__] (__ASSUME_VFORK_SYSCALL): Define unconditionally.
* sysdeps/unix/sysv/linux/ldsodefs.h (HAVE_AUX_XID): Define
unconditionally.
(HAVE_AUX_PAGESIZE): Likewise.
* sysdeps/unix/sysv/linux/prof-freq.c (__profile_frequency)
[__ASSUME_AT_CLKTCK]: Make code unconditional.
[!__ASSUME_AT_CLKTCK]: Remove conditional code.

2012-07-12 Jeroen van Bemmel <jvb127@gmail.com>

[BZ #14307]
Expand Down
7 changes: 7 additions & 0 deletions ports/ChangeLog.arm
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2012-07-12 Joseph Myers <joseph@codesourcery.com>

* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_MMAP2_SYSCALL): Define unconditionally.
(__ASSUME_STAT64_SYSCALL): Likewise.
(__ASSUME_VFORK_SYSCALL): Likewise.

2012-07-10 Joseph Myers <joseph@codesourcery.com>

* sysdeps/arm/sysdep.h (ENTRY): Change ASM_GLOBAL_DIRECTIVE to
Expand Down
10 changes: 3 additions & 7 deletions ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,16 @@

/* On ARM the mmap2/stat64/lstat64/fstat64 syscalls were introduced in
2.3.35. */
#if __LINUX_KERNEL_VERSION >= 131875
# define __ASSUME_MMAP2_SYSCALL 1
# define __ASSUME_STAT64_SYSCALL 1
#endif
#define __ASSUME_MMAP2_SYSCALL 1
#define __ASSUME_STAT64_SYSCALL 1

/* Arm got fcntl64 in 2.4.4. */
#if __LINUX_KERNEL_VERSION >= 132100
# define __ASSUME_FCNTL64 1
#endif

/* The vfork syscall on arm was definitely available in 2.4. */
#if __LINUX_KERNEL_VERSION >= 132097
# define __ASSUME_VFORK_SYSCALL 1
#endif
#define __ASSUME_VFORK_SYSCALL 1

/* The signal frame layout changed in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 132626
Expand Down
14 changes: 7 additions & 7 deletions sysdeps/unix/sysv/linux/configure
Original file line number Diff line number Diff line change
Expand Up @@ -284,25 +284,25 @@ test -n "$arch_minimum_kernel" ||
case "$machine" in
i386*)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
powerpc/powerpc64)
arch_minimum_kernel=2.4.21
;;
s390/s390-32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
s390/s390-64)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
sh*)
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
libc_cv_gcc_unwind_find_fde=yes
;;
sparc/sparc64*)
Expand All @@ -311,10 +311,10 @@ case "$machine" in
;;
sparc*)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
*)
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
esac
if test -n "$minimum_kernel"; then
Expand Down
14 changes: 7 additions & 7 deletions sysdeps/unix/sysv/linux/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,25 @@ test -n "$arch_minimum_kernel" ||
case "$machine" in
i386*)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
powerpc/powerpc64)
arch_minimum_kernel=2.4.21
;;
s390/s390-32)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
s390/s390-64)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
sh*)
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
libc_cv_gcc_unwind_find_fde=yes
;;
sparc/sparc64*)
Expand All @@ -68,10 +68,10 @@ case "$machine" in
;;
sparc*)
libc_cv_gcc_unwind_find_fde=yes
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
*)
arch_minimum_kernel=2.4.0
arch_minimum_kernel=2.4.1
;;
esac
if test -n "$minimum_kernel"; then
Expand Down
39 changes: 8 additions & 31 deletions sysdeps/unix/sysv/linux/kernel-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,18 @@
# define __ASSUME_STAT64_SYSCALL 1
#endif

/* The changed st_ino field appeared in 2.4.0-test6. But we cannot
distinguish this version from other 2.4.0 releases. Therefore play
save and assume it available is for 2.4.1 and up. However, SH is lame,
/* The changed st_ino field appeared in 2.4.0-test6. However, SH is lame,
and still does not have a 64-bit inode field. */
#if __LINUX_KERNEL_VERSION >= 132097 && !defined __sh__
#ifndef __sh__
# define __ASSUME_ST_INO_64_BIT 1
#endif

/* To support locking of large files a new fcntl() syscall was introduced
in 2.4.0-test7. We test for 2.4.1 for the earliest version we know
the syscall is available. */
#if __LINUX_KERNEL_VERSION >= 132097 && (defined __i386__ || defined __sparc__)
in 2.4.0-test7. */
#if defined __i386__ || defined __sparc__
# define __ASSUME_FCNTL64 1
#endif

/* The AT_CLKTCK auxiliary vector entry was introduction in the 2.4.0
series. */
#if __LINUX_KERNEL_VERSION >= 132097
# define __ASSUME_AT_CLKTCK 1
#endif

/* Arm got fcntl64 in 2.4.4, PowerPC and SH have it also in 2.4.4 (I
don't know when it got introduced). But PowerPC64 does not support
separate FCNTL64 call, FCNTL is already 64-bit */
Expand All @@ -106,23 +97,9 @@
# define __ASSUME_FCNTL64 1
#endif

/* The getdents64 syscall was introduced in 2.4.0-test7. We test for
2.4.1 for the earliest version we know the syscall is available. */
#if __LINUX_KERNEL_VERSION >= 132097
# define __ASSUME_GETDENTS64_SYSCALL 1
#endif

/* Starting with one of the 2.4.0 pre-releases the Linux kernel passes
up the page size information. */
#if __LINUX_KERNEL_VERSION >= 132097
# define __ASSUME_AT_PAGESIZE 1
#endif

/* Starting with at least 2.4.0 the kernel passes the uid/gid unconditionally
up to the child. */
#if __LINUX_KERNEL_VERSION >= 132097
# define __ASSUME_AT_XID 1
#endif
/* The getdents64 syscall was introduced in 2.4.0-test7 (but later for
MIPS n32). */
#define __ASSUME_GETDENTS64_SYSCALL 1

/* Starting with 2.4.5 kernels PPC passes the AUXV in the standard way
and the vfork syscall made it into the official kernel. */
Expand Down Expand Up @@ -164,7 +141,7 @@
#endif

/* The vfork syscall on x86 and arm was definitely available in 2.4. */
#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__
#ifdef __i386__
# define __ASSUME_VFORK_SYSCALL 1
#endif

Expand Down
10 changes: 3 additions & 7 deletions sysdeps/unix/sysv/linux/ldsodefs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
Copyright (C) 2001, 2002, 2003, 2006, 2009, 2010 Free Software Foundation, Inc.
Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -37,9 +37,7 @@ extern void _dl_non_dynamic_init (void) internal_function;

/* We can assume that the kernel always provides the AT_UID, AT_EUID,
AT_GID, and AT_EGID values in the auxiliary vector from 2.4.0 or so on. */
#if __ASSUME_AT_XID
# define HAVE_AUX_XID
#endif
#define HAVE_AUX_XID

/* We can assume that the kernel always provides the AT_SECURE value
in the auxiliary vector from 2.5.74 or so on. */
Expand All @@ -49,9 +47,7 @@ extern void _dl_non_dynamic_init (void) internal_function;

/* Starting with one of the 2.4.0 pre-releases the Linux kernel passes
up the page size information. */
#if __ASSUME_AT_PAGESIZE
# define HAVE_AUX_PAGESIZE
#endif
#define HAVE_AUX_PAGESIZE

/* Accept binaries which identify the binary as using Linux extensions. */
#define VALID_ELF_HEADER(hdr,exp,size) (memcmp (hdr, exp, size) == 0 \
Expand Down
22 changes: 1 addition & 21 deletions sysdeps/unix/sysv/linux/prof-freq.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Determine realtime clock frequency.
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -25,26 +25,6 @@
int
__profile_frequency (void)
{
#ifdef __ASSUME_AT_CLKTCK
return GLRO(dl_clktck);
#else
if (GLRO(dl_clktck) != 0)
return GLRO(dl_clktck);

struct itimerval tim;

tim.it_interval.tv_sec = 0;
tim.it_interval.tv_usec = 1;
tim.it_value.tv_sec = 0;
tim.it_value.tv_usec = 0;

__setitimer (ITIMER_REAL, &tim, 0);
__setitimer (ITIMER_REAL, 0, &tim);

if (tim.it_interval.tv_usec < 2)
return 0;

return 1000000 / tim.it_interval.tv_usec;
#endif
}
libc_hidden_def (__profile_frequency)

0 comments on commit ec332e9

Please sign in to comment.