Re: Kernel Module building problem

[email protected]
Newsgroups gmane.linux.suse.sparc
Message-ID <[email protected]>
Murray,

I have had the same exact problem on a Sun Blade 100.  I found that the problem lie somewhere in the gcc commands...  Finally I just copied the flags directly from "make modules" ...  The result works :)

Anyhow, this Makefile compiles them just fine.  I also modified the include directories in mine to be friendlier to new kernel's...  As per Linus' recommendation.

Include: Makefile
==================
::BEGIN::

CC=sparc64-linux-gcc
VERSIONINFO=$(shell uname -r)

CFLAGS  :=      -D__KERNEL__ -I/lib/modules/$(VERSIONINFO)/build/include \
                -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
                -fno-strict-aliasing -fno-common -fomit-frame-pointer \
                -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
                -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare \
                -Wa,--undeclared-regs -DMODULE -DMODVERSIONS \
                -include /usr/src/linux-2.4.19/include/linux/modversions.h \
                -nostdinc -I /usr/lib/gcc-lib/sparc64-suse-linux/egcs-2.92.11/include



testmodule.o:   testmodule.c
                $(CC) $(CFLAGS) -c -o testmodule.o testmodule.c

::END::

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
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.