Is there any way to disable compiler optimization and enable debug? - Mailing list pgsql-hackers

From clover white
Subject Is there any way to disable compiler optimization and enable debug?
Date
Msg-id CAEwsEE5L_ajmnseR30pMT2=M1KH_DG8erwvAFGV9Kj=FCPdLjw@mail.gmail.com
Whole thread Raw
Responses Re: Is there any way to disable compiler optimization and enable debug?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
HI,<br />  I would like to debug PG because I have a problem when I run initdb, and I have question about the configure
file.<br/><br />when I used the command below to config PG, it was only built with debugging symbols (-g) and O2
compileroptimization which would lead to execute order not match the source code order.<br /> ./configure
--enable-debug--enable-depend --enable-cassert --prefix=/home/pgsql/pgsql<br /><br />then I export CFLAGS=O0, but it
stillcouldn't work. <br />I read  a little about confiqure file and find out that CFLAGS is unset in confiqure.<br />
andCFLAGS is also control by global variable: ac_env_CFLAGS_set and ac_env_CFLAGS_value.<br /><br />but i do not know
howi could pass ac_env_CFLAGS_set and ac_env_CFLAGS_value to the configure file.<br /><br />by now, I replace all the
O2flag to O0 in  configure file to resolve the debug source code order problem temporary.<br /><br />Is there any other
wayto disable compiler optimization and enable debug?<br /><br />Thank you for help.<br /> 

pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: ECPG FETCH readahead
Next
From: Andrew Dunstan
Date:
Subject: Re: Is there any way to disable compiler optimization and enable debug?