Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3784

LP:576468 - Problem building --with-debug

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • None
    • None

    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
      CXXFLAGS = -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'
      — configure.in 2010-04-29 07:29:04 +0000
      +++ configure.in 2010-05-06 15:41:15 +0000
      @@ -15,6 +15,12 @@

      1. first part and a 100 character second part.
        AM_INIT_AUTOMAKE([1.9 tar-ustar])
        AC_PROG_LIBTOOL
        +if test "$CFLAGS" = "-g -O2" ; then
        + CFLAGS=""
        +fi
        +if test "$CXXFLAGS" = "-g -O2" ; then
        + CXXFLAGS=""
        +fi

      AM_CONFIG_HEADER([include/config.h])

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulmccullagh Paul McCullagh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.