Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: Joe Buehler Subject: Re: DEBUG build of cygwin Date: Fri, 21 Mar 2003 16:13:14 -0500 Organization: Spirent Communications, Inc. Lines: 62 Message-ID: References: Reply-To: jbuehler AT hekimian DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT main DOT gmane DOT org User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en In-Reply-To: X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Vishal Jain wrote: > Just typing make CFLAGS=-g does not help. It still adds -O2. > Removing -O2 from the top level makefile also does not help. Here's what I do: cat >$_BUILD/gcc <<-\! && #!/bin/bash I=0 unset ARGV for ARG; do case "$ARG" in -O*) ARGV[$I]=-g ;; *) ARGV[$I]="$ARG" ;; esac I=$(expr $I + 1) done /bin/gcc -g "${ARGV[@]}" ! chmod +x $_BUILD/gcc && cat >$_BUILD/c++ <<-\! && #!/bin/bash I=0 unset ARGV for ARG; do case "$ARG" in -O*) ARGV[$I]=-g ;; *) ARGV[$I]="$ARG" ;; esac I=$(expr $I + 1) done /bin/c++ -g "${ARGV[@]}" ! chmod +x $_BUILD/c++ && bash -x <<-\! OPTIONS= OPTIONS="$OPTIONS --enable-debugging" #OPTIONS="$OPTIONS --enable-malloc-debugging" export CC=$_BUILD/gcc export CXX=$_BUILD/c++ export CFLAGS=-g export CXXFLAGS=-g cd $_BUILD && bash ../src.temp/configure --prefix=$_INSTALL --srcdir=$_HERE/src.temp $OPTIONS i686-pc-cygwin && make && make install && true ! -- Joe Buehler -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/