DEBUG build of cygwin
Joe Buehler
jbuehler@hekimian.com
Fri Mar 21 21:40:00 GMT 2003
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/
More information about the Cygwin
mailing list