xfs
[Top] [All Lists]

Re: [PATCH XFSPROGS 2/3] Build without enabling DEBUG by default

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH XFSPROGS 2/3] Build without enabling DEBUG by default
From: "Ted Ts'o" <tytso@xxxxxxx>
Date: Fri, 22 Jul 2011 14:30:48 -0400
Cc: Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20110722141753.GA19681@xxxxxxxxxxxxx>
References: <1311292237-4155-1-git-send-email-tytso@xxxxxxx> <1311292237-4155-2-git-send-email-tytso@xxxxxxx> <20110722141753.GA19681@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Jul 22, 2011 at 10:17:53AM -0400, Christoph Hellwig wrote:
> On Thu, Jul 21, 2011 at 07:50:36PM -0400, Theodore Ts'o wrote:
> > The tree currently will blow out with a build failure if -DDEBUG is
> > specified.
> 
> This still doesn't make sense to me.  libxfs explicily overrides
> DEBUG in the makefile:
> 
> # don't try linking xfs_repair with a debug libxfs.
> DEBUG = -DNDEBUG

I added some debugging statements in libxfs/Makefile, and found this
(see below).

It looks like the problem is that GNU make 3.81 is doing an immediate
expansion of this line in builddefs:

CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)

                                                        - Ted

LTCOMPILE is /bin/sh ../libtool --quiet --tag=CC --mode=compile gcc 
-I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall
FCFLAGS is -I.
GCFLAGS is -g -O2 -DNDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" 
-DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT
PCFLAGS is -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 
-funsigned-char -fno-strict-aliasing -Wall
CFLAGS is -I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall
CCF is gcc -I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" 
-DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT 
-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char 
-fno-strict-aliasing -Wall

<Prev in Thread] Current Thread [Next in Thread>