On Sat, 24 Mar 2012, Woodchuck wrote:
> Recently, working with a yacc grammar, I had the occasion to export 
> YYDEBUG=1 to the environment.  Running make then caused a spew of 
> yydebug: messages to the console.  These appear to emanate from ld(1).
...
> Perhaps the culprit is in /usr/src/gnu/binutils/ld/ldgram.y, where
> this code exists:
...
> #ifndef YYDEBUG
> #define YYDEBUG 1
> #endif

It's that YYDEBUG chunk that's causing it, yes.  The obvious diff to 
remove that from ldgram.y works.  This appears to have been from the 
initial import, which means it's probably the default in the binutils 
source distributions.  If making that change and pushing it back to the 
binutils people turns people's stomaches' there's the alternative of 
turning it off locally.  Diff below...


Philip Guenther


Index: Makefile.bsd-wrapper
===================================================================
RCS file: /cvs/src/gnu/usr.bin/binutils/Makefile.bsd-wrapper,v
retrieving revision 1.76
diff -u -p -r1.76 Makefile.bsd-wrapper
--- Makefile.bsd-wrapper        30 Oct 2011 20:57:06 -0000      1.76
+++ Makefile.bsd-wrapper        26 Mar 2012 06:09:32 -0000
@@ -2,6 +2,8 @@
 
 NEW_BINUTILS=alpha amd64 arm hppa hppa64 i386 mips64 powerpc sh sparc sparc64
 
+CFLAGS += -DYYDEBUG=0
+
 .for _arch in ${MACHINE_CPU}
 .  if !empty(NEW_BINUTILS:M${_arch})
 USING_NEW_BINUTILS?=yes

Reply via email to