Re: RLIM_INFINITY inconsistency between archs

From: Brian Pomerantz (bapper@piratehaven.org)
Date: Thu Jul 27 2000 - 13:20:47 EST


On Thu, Jul 27, 2000 at 07:03:57PM +0200, Jamie Lokier wrote:
>
> 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 "$@" ;;
>

I kind of like the way the gtk and gnome packages have a script that
can be run to get CFLAGS. You could have a kernel script that gets
generated and installed when you do a 'make install' or
'make modules_install' which would spit out the correct CFLAGS for the
include files. It could be as easy as:

        #!/bin/sh
        echo "-I/home/bapper/src/linux-2.4.0/include"

That way any Makefile can run the script on the command line for gcc:

        gcc -O2 `/lib/modules/kernel-includes` -c foo.c

It could take some arguments to echo other flags such as CFLAGS the
kernel uses to compile modules. And of course, this would have the
added bonus of defining the architecture and optimizations that were
used in the compiling of the kernel.

BAPper

-
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:25 EST