mol doesn't compile with 2.6.6 kernel :(

Andreas Schwab mol-general@lists.maconlinux.org
Wed, 12 May 2004 15:17:38 +0200


Benoit Chesneau <benoitc@metavers.net> writes:

> I installed kernel 2.6.6 on my gentoo and when I tried to install mol,
> compilation failed. Any id or (better) a patch to solve it ?

Try this:

--- mol-0.9.70.orig/src/kmod/Linux/Makefile.26	2004-03-21 15:32:59.000000000 +0100
+++ mol-0.9.70/src/kmod/Linux/Makefile.26	2004-05-09 23:38:01.243105480 +0200
@@ -9,7 +9,7 @@
 obj-m		:= _kuname.o mol.o 
 
 PERFOBJS	= $(addprefix $(obj)/, $(PERFOBJS_))
-MOL_ASMFLAGS	= $(ASMFLAGS) $(INCLUDES) -D__ASSEMBLY__
+MOL_ASMFLAGS	= $(CPPFLAGS) $(ASMFLAGS) $(INCLUDES) -D__ASSEMBLY__
 
 
 $(obj)/hook.o: 		$(src)/reloc_table.h
@@ -37,7 +37,7 @@
 $(src)/asm_offsets.h:	$(src)/archinclude.h $(src)/kernel_vars.h $(src)/mac_registers.h
 $(src)/asm_offsets.h:	$(src)/asm_offsets.c $(src)/asm_offsets.inc
 	@$(RM) $(src)/tmp-offsets.c $@ ; cat $^ > $(src)/tmp-offsets.c
-	@$(CC) $(CFLAGS) -I$(src) -Wall -S $(src)/tmp-offsets.c
+	@$(CC) $(CPPFLAGS) $(CFLAGS) -I$(src) -Wall -S $(src)/tmp-offsets.c
 	@echo "/* WARNING! Automatically generated from 'shared/asm_offsets.c' - DO NOT EDIT! */" > $@
 	@grep '^#' tmp-offsets.s >> $@
 	@$(RM) $(src)/tmp-offsets.*

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."