Kernel Make system and linking static libraries on kernel versions2.6.14+

From: Puvvada, Vijay B.
Date: Mon Jan 02 2006 - 16:31:50 EST


Hello,

This is a "I'm stumped kind of problem" and desperately need some
guidance with regards to the kernel make system..

I had also started a thread at
http://forums.fedoraforum.org/showthread.php?p=428551#post428551 with
regards to this, where I describe the context of the problem.

In a nutshell, I am trying to compile the Nortel VPN client (which is
written as part driver and part app) against the 2.6.14 kernel and I am
getting the following warning.

Warning: could not
find /usr/local/cvc_linux-rh-gcc3-3.3/src/k2.6/../.libmishim-2.6.a.cmd
for /usr/local/cvc_linux-rh-gcc3-3.3/src/k2.6/../libmishim-2.6.a

For some reason, the kernel make system does not seem to know what to do
with static libraries. It doesn't seem to create a .cmd for these
files.

1. Is this a normal warning when trying to link in static libraries
with the kernel make system? ie, the kernel make system does not create
a .cmd file for static libraries/archives.

2. Do they all still get linked in or is this a real problem? It seems
to warn on the first static library so I am assuming the rest of the
line is just abandoned. Is this a correct interpretation?

3. How can I clean up the warning? Is there a proper way to specify
static libraries to the kernel make system?

So far as I can tell, this is an interaction between the kernel make
system and the application I have and not distro-specific.

If you require any information, please do not hesitate to ask.

Vij

The full makefile for the kernel driver portion is below:


Makefile:
obj-m += mishim.o nlvcard.o
mishim-libs += ../libmishim-2.6.a ../libnlcmp.a ../libz.a ../liblzs.a
mishim-c-objs += linux_wrapper.o
mishim-objs += $(mishim-c-objs) $(mishim-libs)

EXTRA_CFLAGS += -fno-common -w

ifeq ($(KERNELRELEASE),)

KVER = $(shell uname -r)

ifeq (1,1)
KDIR = /lib/modules/$(KVER)/build
else
KDIR = /usr/src/linux-$(KVER)
endif

PWD = $(shell pwd)

mishim-cfiles = ${mishim-c-objs:.o=.c}


kmod_build:: $(mishim-libs) $(mishim-cfiles)
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
@cp mishim.ko ../mishim.o
@cp nlvcard.ko ../nlvcard.o

%.c:
@ln -s ../linux_wrapper.c

clean:
-rm -rf *.o *.ko *.mod.* .??*

install: all
@echo "Installing VPN agent."
cd .. && ./install.sh

uninstall:
@echo "Uninstalling VPN agent."
cd .. && ./uninstall.sh

endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/