[MDEV-3784] LP:576468 - Problem building --with-debug Created: 2010-05-06 Updated: 2012-10-04 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Paul McCullagh (Inactive) | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
I configured MariaDB with --with-debug=full, but I still get it building with "-O2", for example: gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -g -g -O2 -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -MT strxmov.o -MD -MP -MF .deps/strxmov.Tpo -c -o strxmov.o strxmov.c It looks like AC_PROG_LIBTOOL sets: CFLAGS = -g -O2 This is the same with autoconf 2.63 on Mac and autoconf 2.59 on Linux. MySQL 5.1.46 configure has the same problem. Here is a quick patch which fixes the problem: === modified file 'configure.in'
AM_CONFIG_HEADER([include/config.h]) |
| Comments |
| Comment by Michael Widenius [ 2010-05-10 ] |
|
[Bug 576468] [NEW] Problem building --with-debug Hi! >>>>> "Paul" == Paul McCullagh <paul.mccullagh@primebase.org> writes: Paul> Public bug reported: Paul> gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -g -g Paul> It looks like AC_PROG_LIBTOOL sets: Paul> CFLAGS = -g -O2 Paul> This is the same with autoconf 2.63 on Mac and autoconf 2.59 on Linux. Paul> MySQL 5.1.46 configure has the same problem. Paul> Here is a quick patch which fixes the problem: I usually don't mind the -O2 (except sometimes in the debugger) as What I do when I don't want the -O2 is : CFLAGS="" CXXFLAGS="" ./configure --with-debug=full I tested this and with this I didn't get -O2 in my Makefiles Regards, |
| Comment by Paul McCullagh (Inactive) [ 2010-05-10 ] |
|
Re: Problem building --with-debug But I guess I am now missing a configuration option that specifically turns optimizations off. The problem is (as you mentioned) when working in the debugger. With -O2 local variables are often not available in the debugger. So it may be convenient to have an option like, for example, --without-optimization. Default will be enabled, of course. |
| Comment by Paul McCullagh (Inactive) [ 2010-05-10 ] |
|
Re: Problem building --with-debug |
| Comment by Rasmus Johansson (Inactive) [ 2010-05-10 ] |
|
Launchpad bug id: 576468 |