[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#667341: optimisation tests



On Sat, 14 Jul 2012 20:12:45 +0200
Matthias Klose <doko@debian.org> wrote:

> On 14.07.2012 20:02, Neil Williams wrote:
> > On Sat, 14 Jul 2012 03:08:09 +0200 Matthias Klose <doko@debian.org> wrote:
> > 
> >> please could you find out, which object files (if there are more than
> >> one) do export this symbol for a -O1 build, and attach the preprocessed
> >> source and command line options for these file(s)?
> > 
> > shell script and gzip'd pre-processed cpp file attached. I've tested in a 
> > clean pbuilder chroot and the results for gcc-4.7 demonstrate the bug:
> [...]
> > objdump -C -t libqmfclient.so.1.0.0|grep deserialize
> 
> no, the dump/grep is needed for each .o file in libqmfclient.so.1.0.0. and the
> preprocessed source for each matching .o file.

There is only one .o file needed for this test, so the adapted script
is attached. The pre-processed cpp doesn't change with optimisation.

Output also attached.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

#!/bin/sh

# Debug support for #667341

set -e

run () {
LIBDIR=`dpkg-architecture -qDEB_HOST_MULTIARCH`
if [ -f qmailthreadsortkey.o ]; then
	rm qmailthreadsortkey.o
fi
if [ -f libqmfclient.so.1.0.0 ]; then
	rm libqmfclient.so.1.0.0
fi
# Checking pre-processed cpp file
echo "Checking pre-processed cpp file"
grep "QMailThreadSortKey::deserialize" qmailthreadsortkey.cpp
# Line for pre-processed cpp file
g++ -c -pipe ${OPTS} -Wall -W -fPIC -o qmailthreadsortkey.o qmailthreadsortkey.cpp
echo "Checking for deserialize symbol in object file:"
objdump -C -t qmailthreadsortkey.o|grep deserialize|c++filt

# original line which needs libqt4-dev installed
#g++ -c -pipe ${OPTS} -Wall -W -D_REENTRANT -fPIC -DQT_WEBKIT -DQT_BUILD_QCOP_LIB -DQMF_INTERNAL -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtSql -I/usr/include/qt4 -Isupport -I. -o qmailthreadsortkey.o qmailthreadsortkey.cpp

# Line for pre-processed cpp file
g++ -Wl,${OPTS} -shared -Wl,-soname,libqmfclient.so.1 -o libqmfclient.so.1.0.0 qmailthreadsortkey.o  -L/usr/lib/${LIBDIR} -lpthread

# original line (shortened) which needs libqt4-dev installed
#g++ -Wl,${OPTS} -shared -Wl,-soname,libqmfclient.so.1 -o libqmfclient.so.1.0.0 qmailthreadsortkey.o  -L/usr/lib/${LIBDIR} -lQtSql -lQtNetwork -lQtCore -lpthread

echo "Checking for deserialize symbol in library:"
objdump -C -t libqmfclient.so.1.0.0|grep deserialize|c++filt
}

echo "Starting with -O1"
OPTS="-O1"
run
echo "Changing to -O2"
OPTS="-O2"
run

Attachment: output
Description: Binary data

Attachment: pgpLEm7rmhvg3.pgp
Description: PGP signature


Reply to: