Re: [PATCH] asm*/resource.h fix for glibc

Miquel van Smoorenburg (miquels@cistron.nl)
17 Dec 1999 10:56:51 GMT


In article <cistron.Pine.LNX.3.96.991217022313.16268P-100000@wakko.deltatee.com>,
Jason Gunthorpe <jgg@ualberta.ca> wrote:
>
>On Fri, 17 Dec 1999, Michael Barabanov wrote:
>
>> It would be very nice if there was some standard way to get all of the needed CFLAGS
>> and paths for a specific kernel.
>
>Maybe that is the answer here..

I proposed that earlier in this thread. Please read all messages carefully.

>What if the kernel build would write a file called
>'/boot/enviornment-2.2.14' when you installed it. This file would be a
>make/shell compatible file that simply consisted of parameters. An
>example,
>
>BUILDROOT=/usr/local/src/linux-2.2/14/
>INCLUDEROOT=/usr/local/src/linux-2.2/14/include/
>KERNELCONFIG=/boot/config-2.2.14
>CPPFLAGS=-D_SMP_
>KERNELVERSION=2.2.14
>[..]
>
>The contents would be generated as part of the kernel build process.

The idea is fine, but:

1. It should probably be in the same place as the header files, since
you need the path to the header files anyway. In fact /usr/src/linux
would be a great default.
2. It should be position independant.

It should be in the form of a Makefile fragment like the first part
of the standard kernel Makefile. Paths should be relative to a variable
set earlier, so that you can do:

# Standard module Makefile

# Point to kernel you want to build against (default /usr/src/linux)
KERNELSRC=/usr/src/linux

include $(KERNELSRC)/config.mk

config.mk sets TOPDIR to KERNELSRC and sets all the other variables
such as HPATH, AS, LD, CC, CPP, CFLAGS, etc. See the first 100 lines
of the standard kernel Makefile - it could simply be a copy of that
(taking .config into account)

Mike.

-- 
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to miquels@cistron.nl (Miquel van Smoorenburg)

- 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/