[Top][All Lists]

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

Re: [Qemu-devel] [RFC PATCH 2/4] configure: introduce --extra-libs

From: Alex Bennée
Subject: Re: [Qemu-devel] [RFC PATCH 2/4] configure: introduce --extra-libs
Date: Mon, 25 Jan 2016 17:25:48 +0000
User-agent: mu4e 0.9.17; emacs

Peter Maydell <address@hidden> writes:

> On 25 January 2016 at 16:49, Alex Bennée <address@hidden> wrote:
>> If for example you want to use the thread sanitizer you want to ensure all
>> binaries are linked with the library:
>>   ./configure ${TARGETS} --cc=gcc-5 --cxx=g++-5 \
>>     --extra-cflags="-fsanitize=thread" --extra-libs="-ltsan"
>> This is more explicit than just specifying --extra-ldflags which might
>> not get applied in the right place all the time.
> When would they differ? The commit message makes this sound like
> it's working around a bug in the code that uses LDFLAGS...

Well LDFLAGS doesn't get applied everywhere so with:

--cc=gcc-5 --cxx=g++-5 --extra-cflags="-fsanitize=thread"
  --extra-ldflags="-ltsan" --with-coroutine=gthread

You get compile failures in the ancillary binaries that are used during

  LINK  tests/qemu-iotests/socket_scm_helper
tests/qemu-iotests/socket_scm_helper.o: In function `main':
undefined reference to `__tsan_func_entry'
undefined reference to `__tsan_read8'
undefined reference to `__tsan_read8'

I think this stems from my confusion from exactly which binaries are
meant to be affected by which flags. QEMU_CFLAGS seems to imply it's
QEMU only, but we don't have a QEMU_LDFLAGS so should LDFLAGS be shared
with all binaries we build?

Alex Bennée

reply via email to

[Prev in Thread] Current Thread [Next in Thread]