Make qmake also use -ffunction-sections

This might lead to a smaller binary if we use --gc-sections too.

Change-Id: I7e17b956a85ecefc3e187054848393d2855152b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Thiago Macieira 2014-05-11 17:43:51 -07:00 committed by The Qt Project
parent 199b2594ff
commit e91e502ab6
2 changed files with 6 additions and 4 deletions

6
configure vendored
View File

@ -3662,8 +3662,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
echo "########################################################################" >> "$mkfile"
EXTRA_OBJS=
EXTRA_SRCS=
EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
EXTRA_CFLAGS="\$(QMAKE_CFLAGS) \$(QMAKE_CFLAGS_SPLIT_SECTIONS)"
EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS) \$(QMAKE_CXXFLAGS_SPLIT_SECTIONS)"
EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
@ -3674,7 +3674,9 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
setBootstrapVariable QMAKE_CFLAGS
setBootstrapVariable QMAKE_CFLAGS_SPLIT_SECTIONS
setBootstrapVariable QMAKE_CXXFLAGS
setBootstrapVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS
setBootstrapVariable QMAKE_LFLAGS
if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then

View File

@ -4039,8 +4039,8 @@ void Configure::buildQmake()
stream << "QT_VERSION = " << dictionary["VERSION"] << endl;
if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) {
stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\win32-g++" << endl
<< "EXTRA_CFLAGS = -DUNICODE" << endl
<< "EXTRA_CXXFLAGS = -DUNICODE" << endl
<< "EXTRA_CFLAGS = -DUNICODE -ffunction-sections" << endl
<< "EXTRA_CXXFLAGS = -DUNICODE -ffunction-sections" << endl
<< "QTOBJS = qfilesystemengine_win.o \\" << endl
<< " qfilesystemiterator_win.o \\" << endl
<< " qfsfileengine_win.o \\" << endl