Ticket #3589: updated_release_dbg.diff

File updated_release_dbg.diff, 2.7 KB (added by rd.mora@…, 14 years ago)

Sorry, attached the wrong file - this is the correct one.

  • settings.pro

     
    104104EXTRA_LIBS += $$CONFIG_OPENGL_LIBS
    105105
    106106LIRC_LIBS = $$CONFIG_LIRC_LIBS
     107
     108release-dbg: {
     109unix:QMAKE_CXXFLAGS += -g
     110unix:QMAKE_POST_LINK=objcopy --only-keep-debug $(TARGET) $(TARGET).dbg;
     111unix:QMAKE_POST_LINK+=objcopy --strip-debug $(TARGET);
     112unix:QMAKE_POST_LINK+=objcopy --remove-section=.gnu_debuglink $(TARGET);
     113unix:QMAKE_POST_LINK+=objcopy --add-gnu-debuglink=$(TARGET).dbg $(TARGET);
     114unix:QMAKE_POST_LINK+=chmod -x $(TARGET).dbg
     115}
  • configure

     
    5858  echo "  --help                   print this message"
    5959  #echo "  --log[=FILE|yes|no]      log tests and output to FILE [config.err]"
    6060  echo "  --previous               use previous configure parameters if possible"
    61   echo "  --compile-type=CTYPE     one of release, profile, debug [$compile_type]"
     61  echo "  --compile-type=CTYPE     one of release, release-dbg, profile, debug [$compile_type]"
    6262  echo "                           NOTE: profile is for sampling profilers"
    6363  echo "  --prefix=PREFIX          install in PREFIX [$PREFIX]"
    6464  echo "  --libdir-name=LIBNAME    search/install libraries in PREFIX/LIBNAME [$libdir_name]"
     
    16571657    expr $HAS_IT : "yes" > /dev/null
    16581658}
    16591659
     1660if test x$compile_type = x"release-dbg" ; then
     1661    BINUTILS_MAJOR=0
     1662    BINUTILS_MINOR=0
     1663    if test -e "$(which objcopy)"; then
     1664        BINUTILS_MAJOR=$(objcopy -V | awk '/GNU objcopy/ {print $3}' | awk -F'.' '{print $1}')
     1665        BINUTILS_MINOR=$(objcopy -V | awk '/GNU objcopy/ {print $3}' | awk -F'.' '{print $2}')
     1666    fi
     1667    if test $BINUTILS_MAJOR -lt 2 -o $BINUTILS_MAJOR -eq 2 -a $BINUTILS_MINOR -lt 15; then
     1668        echo 'WARNING: "release-dbg" requires binutils > 2.14 - reverting to compile-type "profile"'
     1669        compile_type="profile"
     1670    fi
     1671fi
    16601672CCONFIG="$CCONFIG $compile_type"
    16611673if test x$compile_type = x"profile" ; then
    16621674    PROFILEFLAGS="-g -DNDEBUG"
  • libs/libmythtv/filtermanager.cpp

     
    6969    QDir FiltDir(gContext->GetFiltersDir());
    7070    QString Path;
    7171
    72     FiltDir.setFilter(QDir::Files | QDir::Readable);
     72    // dbg files will crash the app if loaded
     73    FiltDir.setFilter(QDir::Files | QDir::Readable | QDir::Executable);
    7374    if (FiltDir.exists())
    7475    {
    7576        QStringList LibList = FiltDir.entryList();