RE: Building Kernels and Kernel modules

Kevin Curtis <[email protected]>
Newsgroups gmane.linux.aurora.devel
Message-ID <[email protected]>
Thanks,
	that has got me going.  I needed some extra flags on the link too.
But now at least my nodule loads. :-o


Kevin

-----Original Message-----
From: Jakub Jelinek [mailto:[email protected]]
Sent: 29 April 2003 10:15
To: [email protected]
Subject: Re: [aurora-sparc-devel] Building Kernels and Kernel modules


On Tue, Apr 29, 2003 at 10:06:33AM +0100, Kevin Curtis wrote:
> Hi,
> 	At last I have got a Kernel to build (2.4.21.-pre7).  Now when I try
> to build our X.25 module I get the following error:
> 
> cd ~/develop/ia64x25/src/kernel/
> make 
> gcc -m64 -Wall -Wstrict-prototypes -DMODULE -D__KERNEL__ -DLINUX
-DFSK_HP2FS
> -DCONFIG_X25_MODULE -DFSC_DEBUG=0 -O2	  -I/lib/modules/`uname
> -r`/build/include -I/usr/src/linux/include -I../lib   -c -o fsx25main.o
> fsx25main.c
> In file included from
> /lib/modules/2.4.21-pre7/build/include/asm/processor.h:23,
>                  from
> /lib/modules/2.4.21-pre7/build/include/linux/prefetch.h:13,
>                  from
/lib/modules/2.4.21-pre7/build/include/linux/list.h:6,
>                  from
> /lib/modules/2.4.21-pre7/build/include/linux/module.h:12,
>                  from fsx25main.c:70:
> /lib/modules/2.4.21-pre7/build/include/asm/page.h:111: global register
> variable follows a function definition
> /lib/modules/2.4.21-pre7/build/include/asm/page.h:111: warning:
> call-clobbered register used for global register variable
> make: *** [fsx25main.o] Error 1

You need to use the same kgcc (or gcc) options and the same compiler
as the kernel has been built with, particularly you should make sure all
-f* and -m* options which are used for building modules normally are on
your command line.
For kgcc, the important options include
-m64 -mno-fpu -mtune=ultrasparc -mmedlow -ffixed-g4 -fcall-used-g5
-fcall-used-g7
and for gcc
-m64 -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5
-fcall-used-g7

	Jakub
_______________________________________________
aurora-sparc-devel mailing list
[email protected]
http://lists.linuxpower.org/mailman/listinfo/aurora-sparc-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.