Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin@cygwin.com
From: Joe Buehler <jbuehler@hekimian.com>
Subject: Re: DEBUG build of cygwin
Date: Fri, 21 Mar 2003 16:13:14 -0500
Organization: Spirent Communications, Inc.
Lines: 62
Message-ID: <b5fv92$ohd$1@main.gmane.org>
References: <F19APcDvk7eOdU8uudg00002c43@hotmail.com>
Reply-To: jbuehler@hekimian.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@main.gmane.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: <F19APcDvk7eOdU8uudg00002c43@hotmail.com>
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/

