From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 18 21:24:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 72C85106566B; Sat, 18 Dec 2010 21:24:31 +0000 (UTC) Date: Sat, 18 Dec 2010 21:24:31 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20101218212431.GA35554@freebsd.org> References: <20101218200937.GA2932@freebsd.org> <20101218204047.GA4214@straylight.ringlet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101218204047.GA4214@straylight.ringlet.net> Cc: Subject: Re: question about CFLAGS, CXXFLAGS and DEBUG_FLAGS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2010 21:24:31 -0000 On Sat Dec 18 10, Peter Pentchev wrote: > On Sat, Dec 18, 2010 at 08:09:37PM +0000, Alexander Best wrote: > > hi there, > > > > i just stumbled over these lines: > > > > otaku% grep -n \${DEBUG_FLAGS} /usr/share/mk/bsd.prog.mk > > 24:CFLAGS+=${DEBUG_FLAGS} > > 25:CXXFLAGS+=${DEBUG_FLAGS} > > > > is it really necessary to assign the debug flags to both CFLAGS *and* CXXFLAGS? > > Uhm... yes, so they can be used in both C and C++ programs :) > ...or are you making the mistake I've made too many times (and still > make sometimes) of confusing CXXFLAGS with CPPFLAGS? :) *hehehe* i don't think so. i just saw a lot of these lines in buildworld: clang++ -O2 -pipe -DNDEBUG -g -I/usr/obj/usr/subversion-src/tmp/legacy/usr/include -I/usr/subversion-src/gnu/usr.bin/gperf/../../../contrib/gperf/lib -I/usr/subversion-src/gnu/usr.bin/gperf -g -c /usr/subversion-src/gnu/usr.bin/gperf/../../../contrib/gperf/lib/hash.cc clang++: warning: argument unused during compilation: '-g' clang++: warning: argument unused during compilation: '-g' as you can see -g gets specified twice, so i thought maybe adding -g to CFLAGS makes adding it to CXXFLAGS obsolete. cheers. alex > > G'luck, > Peter > > -- > Peter Pentchev roam@space.bg roam@ringlet.net roam@FreeBSD.org > PGP key: http://people.FreeBSD.org/~roam/roam.key.asc > Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 > Hey, out there - is it *you* reading me, or is it someone else? -- a13x