public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* difference between compiling Kernel modules for linux 2.4 with gcc 3.4 rather than 3.3
@ 2012-10-19 17:52 Åke Forslund
  2012-10-19 18:19 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Åke Forslund @ 2012-10-19 17:52 UTC (permalink / raw)
  To: gcc-help

Hello,

My question is about differences between gcc-3.3 and gcc-3.4 and is asked mostly because of curiosity since I've got a working solution.

We have an old x86-based product that uses RTL on Linux 2.4 and to build it we use a virtual Mandrake machine from way back. Earlier this week I got fed up with the old build system and started migrating to a more modern distro (Debian Squeeze). gcc-4.4 showed lots of warnings and in the end no object file was created. 

I downgraded to gcc-3.4 and managed to get module compiled but for some reason modinfo doesn't output anything and when installing the module in our target system we get 

                             uw.o: couldn't find the kernel version the module was compiled for

After testing switching to older version of libraries and what not to no avail I installed gcc-3.3 (the version used on the old build machine), and with after compiling with this version modinfo shows:

Filename:                                      uw.o
kernel_version:                          2.4.21
kernel_version:                          2.4.21
kernel_version:                          2.4.21
etc.

and the module works fine when installed.

What is different between the gcc-versions 3.3 and 3.4 that can cause this behavior or is there some quirky behavior of the Linux-headers?

Flags used for the project:
-D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common \
    -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -fomit-frame-pointer \
    -D__RTL__ -D_LOOSE_KERNEL_NAMES -O2 \
    -I$(RTL_DIR)/linux/include \
    -I$(RTL_DIR)/include \
    -I$(RTL_DIR)/include/compat \
    -I$(RTL_DIR)/include/posix \


Best regards
/ Åke Forslund

Åke Forslund
Lasermax Roll Systems
Tel: +46 (0) 372-25639


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: difference between compiling Kernel modules for linux 2.4 with gcc 3.4 rather than 3.3
  2012-10-19 17:52 difference between compiling Kernel modules for linux 2.4 with gcc 3.4 rather than 3.3 Åke Forslund
@ 2012-10-19 18:19 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2012-10-19 18:19 UTC (permalink / raw)
  To: Åke Forslund; +Cc: gcc-help

On 19 October 2012 12:52, Åke Forslund wrote:
> Hello,
>
> My question is about differences between gcc-3.3 and gcc-3.4 and is asked mostly because of curiosity since I've got a working solution.

Quite a lot, see http://gcc.gnu.org/gcc-3.4/changes.html for starters

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-19 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-19 17:52 difference between compiling Kernel modules for linux 2.4 with gcc 3.4 rather than 3.3 Åke Forslund
2012-10-19 18:19 ` Jonathan Wakely

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 read-only IMAP folder(s) and NNTP newsgroup(s).