This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DEBUG build of cygwin


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[ at ]}"
!
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[ at ]}"
!
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]