summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-08-09 23:04:44 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-08-09 23:04:44 +0000
commit731bc88b9277949801d9cd44b5f89b483101c180 (patch)
treed1677095a79de2ec7dad38785ada3d2e9e2bdbc3
parentAdd test to detect broken headers in (user land) in 2.5.68 and later. (diff)
downloadgentoo-2-731bc88b9277949801d9cd44b5f89b483101c180.tar.gz
gentoo-2-731bc88b9277949801d9cd44b5f89b483101c180.tar.bz2
gentoo-2-731bc88b9277949801d9cd44b5f89b483101c180.zip
Add test to detect broken headers in (user land) in 2.5.68 and later.
-rw-r--r--sys-libs/glibc/ChangeLog6
-rw-r--r--sys-libs/glibc/Manifest7
-rw-r--r--sys-libs/glibc/files/fix-sysctl_h.patch13
-rw-r--r--sys-libs/glibc/files/test-sysctl_h.c7
-rw-r--r--sys-libs/glibc/glibc-2.3.2-r2.ebuild39
-rw-r--r--sys-libs/glibc/glibc-2.3.2-r3.ebuild39
6 files changed, 96 insertions, 15 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog
index 5eaf33534a8e..60bbb26a5b8a 100644
--- a/sys-libs/glibc/ChangeLog
+++ b/sys-libs/glibc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-libs/glibc
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.73 2003/07/31 20:19:23 frogger Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.74 2003/08/09 23:02:32 azarah Exp $
+
+ 10 Aug 2003; Martin Schlemmer <azarah@gentoo.org> glibc-2.3.2-r2.ebuild,
+ glibc-2.3.2-r3.ebuild, files/fix-sysctl_h.patch, files/test-sysctl_h.c:
+ Add test to detect broken headers in (user land) in 2.5.68 and later.
31 Jul 2003; <matt@gentoo.org> glibc-2.3.2-r1.ebuild, glibc-2.3.2-r2.ebuild,
glibc-2.3.2-r3.ebuild:
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 9cea1f4ae2d9..ee1b55972901 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -1,8 +1,7 @@
-MD5 95fc0df39ec1dc64928eced4802446ce glibc-2.3.2-r3.ebuild 17050
-MD5 96d1346520537a610bbe463051ee30f3 ChangeLog 15052
+MD5 a795eab2e2549121a7ab6651aa5241eb glibc-2.3.2-r3.ebuild 17045
+MD5 78aff1771df92bfa4227392f2d9a5275 ChangeLog 15273
MD5 77f77b7ee2f15ef8b2c3dcfc2b391b50 glibc-2.3.2-r1.ebuild 16036
-MD5 d41d8cd98f00b204e9800998ecf8427e ktest.patch 0
-MD5 e949896f2afa79516630fc1eea3edb44 glibc-2.3.2-r2.ebuild 16507
+MD5 3721c06b428420ff44f81b0345cbbd9c glibc-2.3.2-r2.ebuild 17331
MD5 5cf2ad2ae0b712b0fd0b8659e6334a46 glibc-2.3.1-r4.ebuild 10393
MD5 7264bd42315cd6e06b489d9dd3f88404 glibc-2.2.5-r8.ebuild 9706
MD5 2013443f5192d4b999953ba4248d288c files/nscd.conf 1158
diff --git a/sys-libs/glibc/files/fix-sysctl_h.patch b/sys-libs/glibc/files/fix-sysctl_h.patch
new file mode 100644
index 000000000000..2c490844c81a
--- /dev/null
+++ b/sys-libs/glibc/files/fix-sysctl_h.patch
@@ -0,0 +1,13 @@
+--- linux.orig/include/linux/sysctl.h.orig 2003-05-18 22:12:39.000000000 +0200
++++ linux.fixed/include/linux/sysctl.h 2003-05-18 22:13:58.000000000 +0200
+@@ -35,6 +35,10 @@
+ the largest acceptable value for the nlen
+ member of a struct __sysctl_args to have? */
+
++#ifndef __user
++#define __user
++#endif
++
+ struct __sysctl_args {
+ int __user *name;
+ int nlen;
diff --git a/sys-libs/glibc/files/test-sysctl_h.c b/sys-libs/glibc/files/test-sysctl_h.c
new file mode 100644
index 000000000000..1512b4d5bca1
--- /dev/null
+++ b/sys-libs/glibc/files/test-sysctl_h.c
@@ -0,0 +1,7 @@
+#include <linux/sysctl.h>
+
+int main()
+{
+ return 0;
+}
+
diff --git a/sys-libs/glibc/glibc-2.3.2-r2.ebuild b/sys-libs/glibc/glibc-2.3.2-r2.ebuild
index 05a73eba9c7d..f989440a6c9d 100644
--- a/sys-libs/glibc/glibc-2.3.2-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.3.2-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.2-r2.ebuild,v 1.9 2003/07/31 20:19:23 frogger Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.2-r2.ebuild,v 1.10 2003/08/09 23:02:32 azarah Exp $
IUSE="nls pic build nptl"
@@ -200,10 +200,10 @@ pkg_setup() {
die "GCC too old"
fi
+ echo
+
if use_nptl
then
- echo
-
# The use_nptl should have already taken care of kernel version,
# arch and CHOST, so now just check if we can find suitable kernel
# source tree or headers ....
@@ -219,9 +219,38 @@ pkg_setup() {
else
echo "yes"
fi
-
+ fi
+
+ if [ "$(KV_to_int $(uname -r))" -gt "`KV_to_int '2.5.68'`" ]
+ then
+ local KERNEL_HEADERS="$(get_KHV "`KV_to_int ${MIN_NPTL_KV}`")"
+
+ einfon "Checking kernel headers for broken sysctl.h ... "
+ if ! gcc -I"${KERNEL_HEADERS}" \
+ -c ${FILESDIR}/test-sysctl_h.c -o ${T}/test1.o &> /dev/null
+ then
+ echo "yes"
+ echo
+ eerror "Your version of:"
+ echo
+ eerror " ${KERNEL_HEADERS}/linux/sysctl.h"
+ echo
+ eerror "is broken (from a user space perspective). Please apply"
+ eerror "the following patch:"
+ echo
+ eerror "*******************************************************"
+ cat ${FILESDIR}/fix-sysctl_h.patch
+ eerror "*******************************************************"
+ die "Broken linux/sysctl.h header included in kernel sources!"
+ else
+ echo "no"
+ fi
+ fi
+
+ if use_nptl
+ then
einfon "Checking gcc for __thread support ... "
- if ! gcc -c ${FILESDIR}/test-__thread.c -o ${T}/test.o &> /dev/null
+ if ! gcc -c ${FILESDIR}/test-__thread.c -o ${T}/test2.o &> /dev/null
then
echo "no"
echo
diff --git a/sys-libs/glibc/glibc-2.3.2-r3.ebuild b/sys-libs/glibc/glibc-2.3.2-r3.ebuild
index 7a7281bc984a..5dab9f6836f0 100644
--- a/sys-libs/glibc/glibc-2.3.2-r3.ebuild
+++ b/sys-libs/glibc/glibc-2.3.2-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.2-r3.ebuild,v 1.4 2003/07/31 20:19:23 frogger Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.2-r3.ebuild,v 1.5 2003/08/09 23:02:32 azarah Exp $
IUSE="nls pic build nptl"
@@ -205,10 +205,10 @@ pkg_setup() {
die "GCC too old"
fi
+ echo
+
if use_nptl
then
- echo
-
# The use_nptl should have already taken care of kernel version,
# arch and CHOST, so now just check if we can find suitable kernel
# source tree or headers ....
@@ -224,9 +224,38 @@ pkg_setup() {
else
echo "yes"
fi
-
+ fi
+
+ if [ "$(KV_to_int $(uname -r))" -gt "`KV_to_int '2.5.68'`" ]
+ then
+ local KERNEL_HEADERS="$(get_KHV "`KV_to_int ${MIN_NPTL_KV}`")"
+
+ einfon "Checking kernel headers for broken sysctl.h ... "
+ if ! gcc -I"${KERNEL_HEADERS}" \
+ -c ${FILESDIR}/test-sysctl_h.c -o ${T}/test1.o &> /dev/null
+ then
+ echo "yes"
+ echo
+ eerror "Your version of:"
+ echo
+ eerror " ${KERNEL_HEADERS}/linux/sysctl.h"
+ echo
+ eerror "is broken (from a user space perspective). Please apply"
+ eerror "the following patch:"
+ echo
+ eerror "*******************************************************"
+ cat ${FILESDIR}/fix-sysctl_h.patch
+ eerror "*******************************************************"
+ die "Broken linux/sysctl.h header included in kernel sources!"
+ else
+ echo "no"
+ fi
+ fi
+
+ if use_nptl
+ then
einfon "Checking gcc for __thread support ... "
- if ! gcc -c ${FILESDIR}/test-__thread.c -o ${T}/test.o &> /dev/null
+ if ! gcc -c ${FILESDIR}/test-__thread.c -o ${T}/test2.o &> /dev/null
then
echo "no"
echo