-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Ken Moffat wrote:
> Thanks for the reference to where to look, I can now see that I've 
> been wasting my time building agaisnt test kernels with 
> --enable-kernel=2.6.0 (e.g. no *at syscalls, private futexes, 
> fallocate - all the recent changes which sounded like good things to 
> have).

Well, no, you haven't been wasting your time, not really.

Take pselect, for instance.  It was introduced in the kernel in 2.6.17,
so if you --enable-kernel at some version later than 2.6.17, you'll
cause kernel-features.h to define __ASSUME_PSELECT to 1.

However, if __ASSUME_PSELECT is not 1, your compiled glibc *does* still
have pselect support.  See sysdeps/unix/sysv/linux/pselect.c, and note
that the __pselect function does the CALL_PSELECT6 regardless of whether
__ASSUME_PSELECT is defined or not.  (And CALL_PSELECT6 is defined above
as an INLINE_SYSCALL, which calls into the kernel.)  The only difference
between having __ASSUME_PSELECT and not having __ASSUME_PSELECT is that
the former case skips the "errno == ENOSYS" ("system call not supported
on this kernel") check and the __generic_pselect() workaround.

The *at() case is the same: if glibc doesn't define __ASSUME_ATFCTS,
then each *at() call checks to see whether the system call succeeds, and
sets some kind of global variable as soon as one fails with ENOSYS.  And
defining __ASSUME_ATFCTS gets rid of some user-space workaround code as
well.  (See e.g. linkat(), in sysdeps/unix/sysv/linux/linkat.c.)

If you're running a glibc version that has a given syscall on a kernel
that doesn't have it, you get either a glibc-internal workaround or an
ENOSYS value in errno.  That happens regardless of --enable-kernel.  The
thing that --enable-kernel does is disable workaround code for the older
kernels.  (It may also prevent glibc from running on those kernels;
there may be an explicit version check somewhere.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHP3n4S5vET1Wea5wRAxooAKDPaGhI06Gb3VLZPEHRkfXDXp6JZwCgs0xC
tJ/7sxLZuxoTkJaQpzmOddk=
=oYfw
-----END PGP SIGNATURE-----
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to