From: shibata.hiroshi@... Date: 2014-01-30T06:16:37+00:00 Subject: [ruby-core:60268] [ruby-trunk - Bug #6360] Debug information build even without requesting it Issue #6360 has been updated by Hiroshi SHIBATA. Target version changed from 2.1.0 to current: 2.2.0 ---------------------------------------- Bug #6360: Debug information build even without requesting it https://bugs.ruby-lang.org/issues/6360#change-44744 * Author: Luis Lavena * Status: Assigned * Priority: High * Assignee: Nobuyoshi Nakada * Category: build * Target version: current: 2.2.0 * ruby -v: 2.0.0 i386-mingw32 r35473 * Backport: ---------------------------------------- Hello, While working on latest RubyInstaller release for 1.9.3-p194 our team detected a bigger shared library and import library being generated. After further inspection, we found this commit: https://github.com/ruby/ruby/commit/ffdaca1d748804f2b5ca2de612f17cf6c78d351b Backported r34840 into ruby_1_9_3 branch The above change added -ggdb to CFLAGS even when was not provided by debugflags configure option. The following is the comparison of "make" summary with and without the change: Current trunk:
C:\Users\Luis\Projects\oss\ruby\build32>make
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared
        CFLAGS = -O3 -fno-omit-frame-pointer -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
        CPPFLAGS = -DFD_SETSIZE=32767 -D_WIN32_WINNT=0x0501   -I. -I.ext/include/i386-mingw32 -I../include -I..
        DLDFLAGS = -Wl,--enable-auto-image-base,--enable-auto-import -Wl,--out-implib=libmsvcrt-ruby200.dll.a msvcrt-ruby200.def -Wl,--stack,0x00200000,--enable-auto-import
        SOLIBS = msvcrt-ruby200.res.o -lshell32 -lws2_32 -limagehlp
Reverting r34840:
C:\Users\Luis\Projects\oss\ruby\build32>make
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared -s
        CFLAGS = -O3 -fno-omit-frame-pointer -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
        CPPFLAGS = -DFD_SETSIZE=32767 -D_WIN32_WINNT=0x0501   -I. -I.ext/include/i386-mingw32 -I../include -I..
        DLDFLAGS = -Wl,--enable-auto-image-base,--enable-auto-import -Wl,--out-implib=libmsvcrt-ruby200.dll.a msvcrt-ruby200.def -Wl,--stack,0x00200000,--enable-auto-import
        SOLIBS = msvcrt-ruby200.res.o -lshell32 -lws2_32 -limagehlp
Notice that -g changed into -ggdb instead. I think debug symbols shouldn't be compiled unless requested and this is a regression. -- http://bugs.ruby-lang.org/