Re: RLIM_INFINITY inconsistency between archs

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu Jul 27 2000 - 12:03:57 EST


Theodore Y. Ts'o wrote:
> I'd really, really, like some kind of convention that could be
> standardized. It could be any one of
>
> /usr/src/linux
> /lib/include/`uname -r`
> ../linux
>
> (the last requires that pcmcia and Rocketport packages have to be in the
> same top-level directory as the kernel source tree).
>
> I could live with any of these; as long as we all can agree on a single
> convention, so that default is always right. If you don't like
> /usr/src/linux because of the past history, and how user-mode packages
> are using it incorrectly, let's create a new convention. I personally
> think /lib/include (ala /lib/modules) is probably the best one but it
> means dropping approxmiately 4 megabytes into /lib, which might cause
> some problems for some partitioning schemes.

Please, if it goes in /lib then /lib/modules/include.

But instead, how about a script: /lib/modules/VERSION/compile-module.
The script would know where to find the kernel headers. That could be
/lib/modules/include for distributions, and /my/kernel/tree/include for
folks who used `make modules_install' recently.

Even better, the script has the ability to add multiple include paths,
so that you get the right SMP/UP-specific config.h but don't have to
have two copies of the unchanged headers.

Distributions can change the script if they want to control where the
relevant headers are installed. They'd probably set the location to
/usr/src/linux-DISTVERSION/include/linux or
/lib/modules/DISTVERSION/include according to their preference. And
they might want to do the subtarget-specific config.h thing.

Here's a first stab at one a distro might use:

#!/bin/sh
KERNEL_CONFIG=/lib/modules/2.2.14-12/include
KERNEL_HEADERS=/usr/src/linux-2.2.14/include
gcc -O2 -I$KERNEL_CONFIG_HEADERS -I$KERNEL_HEADERS -c "$@" ;;

And one installed by doing `make modules_install' in /home/jamie/kernel/v2.4

#!/bin/sh
gcc -O2 -I/home/jamie/kernel/v2.4 -c "$@" ;;

You get the idea,

enjoy,
-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:24 EST