From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Lev Lvovsky <lists1@sonous.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: older kernels + new glibc?
Date: Mon, 29 Mar 2004 17:10:59 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.53.0403291659400.3272@chaos> (raw)
In-Reply-To: <BB3FCEF5-81CB-11D8-A0A8-000A959DCC8C@sonous.com>
On Mon, 29 Mar 2004, Lev Lvovsky wrote:
>
> On Mar 29, 2004, at 1:50 PM, Richard B. Johnson wrote:
>
> > On Mon, 29 Mar 2004, Lev Lvovsky wrote:
> >> I might be a bit confused here, but the problem with that, is that I'm
> >> effectively working backwards. I've reverted the kernel version, but
> >> all other applications have been kept of course - this means that
> >> though I can keep those sym-links pointing to the correct kernel
> >> headers (those which were present when glibc was compiled), the
> >> current
> >> kernel (the reverted one) will obviously have different include files.
> >>
> >> In order to compile the modules for the afformentioned hardware, those
> >> symlinks need to point to the 2.2.x kernel directories - will this
> >> break functionality of future compiled applications etc?
> >>
> >
> > No No. Never! The modules never, ever, use glibc headers. Never!
> >
> > The compilation should set the -I (include) parameter to point
> > to the kernel headers.
> >
> > Something like:
> >
> > VER := $(shell uname -r)
> > INC= -I. -I/usr/src/linux-$(VER)
> > DEF= -D__KERNEL__ -DMODULE
> >
> > gcc -c -Wall -O2 -fomit-frame-pointer $(INC) $(DEF) -m module.o
> > module.c
>
> sorry, that was my mistake in wording - the modules point to the kernel
> headers. However, the system as it was first made, had those
> directories symlinked to the 2.4.7 (?) kernel - I had to remove that
> package, and symlink the "asm", and "linux" directories to the 2.2.26
> kernel directories of the same name - I'm assuming this is the correct
> thing to do? (it did work ;)
>
You didn't care to read what I said? I said to remove those sym-links.
They must be replaced by headers that were in-use around the time
the C library code was compiled, preferably the exact same headers.
There must not be any sym-link in the /usr/include/... directories
pointing to any kernel headers. That way, you can add new kernels
without ever screwing up your compiler.
When you compile modules, NO 'C' runtime library components are
used at except, possibly, stddef.h or stdarg.h. These are
automatically searched in the `gcc -print-file-name=include`
directory. You can see what's there by executing:
ls `gcc -print-file-name=include`. You can guarantee that
only the files you want are searched by using -nostdinc on
the gcc command line. Of course if you do this, stddef.h
won't be found, if needed so you would need to add the
that directory back to the search-list.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
next prev parent reply other threads:[~2004-03-29 22:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 20:40 Lev Lvovsky
2004-03-29 21:00 ` Arjan van de Ven
2004-03-29 21:09 ` Lev Lvovsky
2004-03-29 21:22 ` Arjan van de Ven
2004-03-29 21:26 ` Lev Lvovsky
2004-03-29 21:28 ` Arjan van de Ven
2004-03-29 21:34 ` Lev Lvovsky
2004-03-29 21:36 ` Arjan van de Ven
2004-03-29 21:45 ` Chris Meadors
2004-03-29 23:03 ` David T Hollis
2004-03-30 15:07 ` Adrian Bunk
2004-03-31 0:54 ` GOTO Masanori
2004-03-29 21:17 ` Richard B. Johnson
2004-03-29 21:36 ` Lev Lvovsky
2004-03-29 21:50 ` Richard B. Johnson
2004-03-29 21:55 ` Lev Lvovsky
2004-03-29 22:10 ` Richard B. Johnson [this message]
2004-03-29 22:55 ` Lev Lvovsky
2004-03-30 12:19 ` Richard B. Johnson
2004-03-29 22:27 ` DervishD
2004-03-29 23:55 ` Matthew Reppert
2004-03-30 0:09 ` Lev Lvovsky
2004-03-30 14:50 ` DervishD
2004-03-30 15:15 ` Richard B. Johnson
2004-03-30 17:10 ` DervishD
2004-03-30 12:16 ` Richard B. Johnson
2004-03-30 15:20 ` DervishD
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=Pine.LNX.4.53.0403291659400.3272@chaos \
--to=root@chaos.analogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lists1@sonous.com \
/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
all inboxes | Powered by JetHome®