mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [kbuild,-mm] [PATCH] workaround a cscope bug (make cscope segfaults)
@ 2006-02-19 12:50 Mattia Dongili
  2006-02-19 13:24 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Mattia Dongili @ 2006-02-19 12:50 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Sam Ravnborg


Workaround a cscope bug where a trailing ':' in VPATH makes it segfault
and let it build the cross-reference succesfully.

VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b
[1]    17555 segmentation fault VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b

Signed-off-by: Mattia Dongili <malattia@linux.it>
---

'make cscope' segfaults with current kbuild.git (I'm using -rc3-mm1 actually
and the same problem appears in some previous versions too).
I'm running Debian's cscope-15.5+cvs20050816-1 (cscope --version says
16.0a).

I think it would be nice to have this workaround as cscope CVS doesn't
show much activity and its latest release dates somewhen in 2003.

As shown above, to reproduce the segfault here I just need to run
VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b
in the kernel source tree with the previously generated cscope.files,
the trailing ':' is what makes cscope die.

 Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

77d1a8a386df409709ad0b4f48a8b09ce08d990d
diff --git a/Makefile b/Makefile
index 111a699..e0f9108 100644
--- a/Makefile
+++ b/Makefile
@@ -138,7 +138,11 @@ objtree		:= $(CURDIR)
 src		:= $(srctree)
 obj		:= $(objtree)
 
+ifeq ($(KBUILD_EXTMOD),)
+VPATH		:= $(srctree)
+else
 VPATH		:= $(srctree):$(KBUILD_EXTMOD)
+endif
 
 export srctree objtree VPATH TOPDIR
 
-- 
1.2.1-dirty

-- 
mattia
:wq!


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [kbuild,-mm] [PATCH] workaround a cscope bug (make cscope segfaults)
  2006-02-19 12:50 [kbuild,-mm] [PATCH] workaround a cscope bug (make cscope segfaults) Mattia Dongili
@ 2006-02-19 13:24 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2006-02-19 13:24 UTC (permalink / raw)
  To: Linux Kernel Mailing List

On Sun, Feb 19, 2006 at 01:50:37PM +0100, Mattia Dongili wrote:
> 
> Workaround a cscope bug where a trailing ':' in VPATH makes it segfault
> and let it build the cross-reference succesfully.
> 
> VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b
> [1]    17555 segmentation fault VPATH=/home/mattia/devel/kernel/git/linux-2.6: cscope -b
> 
> Signed-off-by: Mattia Dongili <malattia@linux.it>
Hi Mattia.
I have added the following patch to my tree.
Thanks for the report.

	Sam

diff --git a/Makefile b/Makefile
index a55a1e4..7a95f4f 100644
--- a/Makefile
+++ b/Makefile
@@ -137,7 +137,7 @@ objtree		:= $(CURDIR)
 src		:= $(srctree)
 obj		:= $(objtree)
 
-VPATH		:= $(srctree):$(KBUILD_EXTMOD)
+VPATH		:= $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
 
 export srctree objtree VPATH TOPDIR
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-19 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-19 12:50 [kbuild,-mm] [PATCH] workaround a cscope bug (make cscope segfaults) Mattia Dongili
2006-02-19 13:24 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®