[lkml]   [2001]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] 2.4.0-prerelease drm and modversions
Keith Owens writes:
kaos> drivers/char/drm/Makefile is breaking the Makefile rules. It builds
kaos> drmlib.a and expects to link that library into both the kernel and into
kaos> modules.

Ah, shit.

kaos> The kernel makefile system assumes that everything is either kernel or
kaos> module, not both. The components in drmlib.a get compiled for kernel
kaos> only, when used in a module they are missing the symbol versions.

I agree with Keith.

The kernel version is going to get compiled, and then the module version is
going to get compiled with different compilation flags: -DMODULE. The two
versions are always going to fight.

kaos> +$(patsubst %.o,%.c,$(lib-objs-mod)):
kaos> + @ln -sf $(subst -mod,,$@) $@
kaos> +

This looks good to me. It's missing a dependency though. If foo-mod.c
exists, and someone edits or patches foo.c, then foo-mod.c needs to be

Keith, what do you think of this:

source-objs-mod := $(patsubst %-mod.o,%-mod.c,$(lib-objs-mod))
$(source-objs-mod): $(patsubst %-mod.c,%.c,$(source-objs-mod))
ln -sf $(patsubst %-mod.c,%.c,$@) $@

It suffers from the thundering herd problem (each *-mod.c depend on
all *.c files) but I think it's correct.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:1.300 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site