linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Iain Sandoe" <iain@sandoe.co.uk>
To: Josh Huber <huber@mclx.com>, linuxppc-dev@lists.linuxppc.org
Subject: Re: Kernel build headers [was: Re: problems about __cli()]
Date: Mon, 24 Jul 2000 21:58:12 +0100	[thread overview]
Message-ID: <200007242101.WAA16532@hyperion.valhalla.net> (raw)


On Mon, Jul 24, 2000, Josh Huber wrote:
> On Mon, Jul 24, 2000 at 09:11:08AM +0100, Iain Sandoe wrote:
>> On 2.2.17pre10 (having done a make mrproper, menuconfig, dep):
[snip]

Thanks for the info. read & understood... guess I'll have to continue this
way until my distro settles into the new way (or I have time to change
distro)...

>> Also, as I am doing, if you have a user-land program that accesses a
>> kernel-maintained structure via a syscall - the layout of the kernel
>> structure is (properly) defined in a header in linux/include/asm - but you
>> also need to get at it when compiling the user-land program.
>
> In this case you should ship the corresponding header files that your
> user space program uses with that user-space utility.  This makes sure
> that it gets things right and doesn't depend on having a kernel tree
> around that you know the location of.  For example, for a program I'm
> working with, which uses an ioctl interface on a /dev entry (used to
> use system calls, but switched), I've set up a directory tree like:
> src    all the code
> include
>     linux  header files copied from the kernel tree (just the ones I
>            need)
>     other header files
>
> This way, when autoconf places a -Ibuild_root/include with each
> compile, it uses the local header files.
>
> Before I did this, building was hell -- it's SO much better being able
> to build the user-space code on any box without having to untar kernel
> source.
>
> Again, just my opinion, but I've found that this works very well.
>
> I believe in general, unless the program you're writing needs to track
> the kernel very closely, it's bad practice to include kernel headers
> in user-space code.

Well, the user space prog. (posting due in about an hour ;-) is mainly for
kernel/driver developers so they would naturally need to track the two
together - I'm entirely in agreement that it is a bad idea to have general
user programs that require kernel sources :-)

Thanks,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2000-07-24 20:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-24 20:58 Iain Sandoe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-07-24  8:11 Kernel build headers [was: Re: problems about __cli()] Iain Sandoe
2000-07-24  9:52 ` Michel Dänzer
2000-07-24 12:42 ` Josh Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200007242101.WAA16532@hyperion.valhalla.net \
    --to=iain@sandoe.co.uk \
    --cc=huber@mclx.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).