George Nychis wrote:
> Clemens Ladisch wrote:
> > Please try adding quotes around the four KBUILD_BASENAME definitions in
> > alsa-driver/Rules.make, like this:
> > 
> >     ... -DKBUILD_BASENAME=\"$(subst ...)\" $...
> 
> hmmm, I seem to get different errors:

Okay, I just changed it to use the same mechanism as the kernel build
system (using a helper macro).

The attached patch is also in the Hg tree.


HTH
Clemens
fix compilation with 2.6.18

Change the definition of KBUILD_BASENAME so that it can be properly used
as a preprocessor string literal.

diff -r e381a75adf4c Rules.make
--- alsa-driver/Rules.make      Thu Jul 06 15:13:52 2006 +0200
+++ alsa-driver/Rules.make      Wed Jul 26 17:54:14 2006 +0200
@@ -85,13 +85,13 @@ endif
 #
 
 %.s: %.c
-       $(CC) -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -DKBUILD_BASENAME=$(subst 
$(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -S $< -o $@
+       $(CC) -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -D"KBUILD_STR(s)=#s" 
-D"KBUILD_BASENAME=KBUILD_STR($(subst $(comma),_,$(subst -,_,$(*F))))" 
$(CFLAGS_$@) -S $< -o $@
 
 %.i: %.c
-       $(CPP) -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -DKBUILD_BASENAME=$(subst 
$(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) $(CFLAGS_$@) $< > $@
+       $(CPP) -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -D"KBUILD_STR(s)=#s" 
-D"KBUILD_BASENAME=KBUILD_STR($(subst $(comma),_,$(subst -,_,$(*F))))" 
$(CFLAGS_$@) $(CFLAGS_$@) $< > $@
 
 %.o: %.c
-       $(CC) -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -DKBUILD_BASENAME=$(subst 
$(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) $(CFLAGS_$@) -c -o $@ $<
+       $(CC) -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -D"KBUILD_STR(s)=#s" 
-D"KBUILD_BASENAME=KBUILD_STR($(subst $(comma),_,$(subst -,_,$(*F))))" 
$(CFLAGS_$@) $(CFLAGS_$@) -c -o $@ $<
 
 %.o: %.s
        $(AS) -D__KERNEL__ $(AFLAGS) $(EXTRA_CFLAGS) -o $@ $<
@@ -118,7 +118,7 @@ endif
 
 %.isapnp: %.c
 ifeq (y,$(CONFIG_ISAPNP))
-       $(CPP) -C -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -D__isapnp_now__ 
-DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) 
$(CFLAGS_$@) $< | awk -f $(TOPDIR)/utils/convert_isapnp_ids > $@
+       $(CPP) -C -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -D__isapnp_now__ 
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR($(subst $(comma),_,$(subst 
-,_,$(*F))))" $(CFLAGS_$@) $(CFLAGS_$@) $< | awk -f 
$(TOPDIR)/utils/convert_isapnp_ids > $@
 else
        rm -f $@
        touch $@
diff -r e381a75adf4c configure.in
--- alsa-driver/configure.in    Thu Jul 06 15:13:52 2006 +0200
+++ alsa-driver/configure.in    Wed Jul 26 17:54:14 2006 +0200
@@ -1279,7 +1279,7 @@ fi
 fi
 AC_SUBST(msmp)
 
-KERNEL_CHECK_CFLAGS="-Wall -fno-strict-aliasing $CFLAGS $KERNEL_INC 
$HACK_KERNEL_INC -nostdinc -iwithprefix include -DKBUILD_BASENAME=\"dummy\""
+KERNEL_CHECK_CFLAGS="-Wall -fno-strict-aliasing $CFLAGS $KERNEL_INC 
$HACK_KERNEL_INC -nostdinc -iwithprefix include -D\"KBUILD_STR(s)=#s\" 
-D\"KBUILD_BASENAME=KBUILD_STR(dummy)\""
 
 dnl Check for video device support... (2.2 kernels excluded due to API 
incompatibility)
 if test $kpatchlevel -gt 2; then
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to