Re: Re: make test failed

edward mzj <[email protected]>
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
Hi, Peter
--- "Peter T. Breuer" <[email protected]> wrote:
> "Also sprach Peter T. Breuer:"
> > Script started on Sat Mar 26 19:27:50 2005
> > /usr/oboe/ptb/lang/c/nbd/nbd-2.4.32% sudo make LINUXDIR=/usr/local/src/linux-2.6.8.1-uml
> > ...
> > make[1]: Entering directory `/usr/local/src/linux-2.6.8.1-uml'
> > *** Warning: Overriding SUBDIRS on the command line can cause
> > ***          inconsistencies
> > mkdir -p /tmp/linux-2.6.x/.tmp_versions
> > make -f /usr/local/src/linux-2.6.8.1-uml/scripts/Makefile.build obj=arch/i386/ke
> > rnel arch/i386/kernel/asm-offsets.s
> 
> 
> I should have showed what the make command that the Makefile ran was (in
> and among the ellipsis ...).  It was:
> 
> 
>      VPATH="/home/oboe/ptb/lang/c/nbd/nbd-2.4.32/kernel/linux-2.6.x"; \
>      cp -a "$VPATH" "/tmp/linux-2.6.x" && \
>            cd "/tmp/linux-2.6.x/drivers/block"; \
>      make -C "/usr/local/src/linux-2.6.8.1-uml" \
>            -f "$VPATH/Makefile" \
>            SUBDIRS="/tmp/linux-2.6.x/drivers/block/enbd" \
>            KBUILD_VERBOSE=1 \
>            CONFIG_BLK_DEV_ENBD=m \
>            CONFIG_BLK_DEV_ENBD_IOCTL=m \
>            CFLAGS_KERNEL=-I"$VPATH/include" \
>            CFLAGS_MODULE=-I"$VPATH/include" \
>            MODVERDIR="/tmp/linux-2.6.x/.tmp_versions" \
>            VERSION="2" \
>            PATCHLEVEL="6" \
>            SUBLEVEL="8" \
>            EXTRAVERSION=".1-SMP" \
>            modules
> 
> which generates the .ko files in /tmp.
> 

after a few test, i finally can say it's exactly this part of Makefile makes
gcc to generate the erroneous obj file and consequently the incorrect enbd*.ko
which has pissed me off during the past a few days. 

especially, the blame goes to the "CFLAGS_MODULE". in the kernel Makefile,
the value of "CFLAGS_MODULE" is same as "MODFLAG" which is defined as 
"-DMODULE" and should be passed to gcc when compiling modules.

but your assignment here override the default value of "CFLAGS_MODULE". so
when gcc compiles the source files, the "-DMODULE" flag is missing, and the 
conditional compilations need the "MODULE" macro are ignored or mis-understood
and that's why i got those faulty modules in the last a few days.

i think you might consider to use 'CFLAGS+=-I"$VPATH/include"', instead of 
'CFLAGS_MODULE'. i've verified. it works.




_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.