Christoph Hellwig started a thread a while ago about integrating kerntypes builds into kbuild, but I'm not sure anything came of it.

Unfortunately I have to build some kerntypes files nonetheless.  :)

I'm currently building the kerntypes file as a hostprog, and forcing it to be built w/ kernel flags:

# Kerntypes file

# hostprogs-y, hostprogs-m, host-progs gyrations for older kbuild compat
hostprogs-$(subst m,y,$(CONFIG_FOO)) :=       $(KERNTYPES_NAME)
host-progs := $(hostprogs-y)

$(KERNTYPES_NAME)-objs := kerntypes.o

always := $(host-progs)

# We compile/link it with kernelspace flags, even though it's not a module...
HOSTCFLAGS_kerntypes.o := $(NOSTDINC_FLAGS) $(CPPFLAGS) $(CFLAGS) \
                          $(EXTRA_CFLAGS) -g3
# -r -nostdlib etc because kerntypes.c has no main()
HOSTLOADLIBES_$(KERNTYPES_NAME) += -r -nostdlib

but this seems pretty hacky to me, at best.

It seems like maybe declaring it as a lib-y might work too, but my impression is that these libs are really only intended to be linked into the kernel image itself.

Any other suggestions on a clean way to do this with the existing kbuild infrastructure?

Thanks,

-Eric


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to