From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: mttcg@greensocs.com, peter.maydell@linaro.org,
mark.burton@greensocs.com, a.rigo@virtualopensystems.com,
qemu-devel@nongnu.org, fred.konrad@greensocs.com
Subject: Re: [Qemu-devel] [RFC PATCH 2/4] configure: introduce --extra-libs
Date: Mon, 25 Jan 2016 18:15:21 +0000 [thread overview]
Message-ID: <87vb6ho79i.fsf@linaro.org> (raw)
In-Reply-To: <56A6625E.7070408@redhat.com>
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 25/01/2016 17:49, Alex Bennée 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"
>
> Shouldn't -fsanitize=thread work as a linker command line flag too?
No, the sanitizers are compile time options as they instrument the
generated code. It's just in the case of the ThreadSanitizer you also
need the support library.
> Perhaps if that works there's a better place to put -fsanitizer flags.
>
> Paolo
>
>> This is more explicit than just specifying --extra-ldflags which might
>> not get applied in the right place all the time.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> configure | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/configure b/configure
>> index 7d23c6c..194bae9 100755
>> --- a/configure
>> +++ b/configure
>> @@ -365,6 +365,8 @@ for opt do
>> --extra-ldflags=*) LDFLAGS="$LDFLAGS $optarg"
>> EXTRA_LDFLAGS="$optarg"
>> ;;
>> + --extra-libs=*) EXTRA_LIBS="$optarg"
>> + ;;
>> --enable-debug-info) debug_info="yes"
>> ;;
>> --disable-debug-info) debug_info="no"
>> @@ -785,6 +787,8 @@ for opt do
>> ;;
>> --extra-ldflags=*)
>> ;;
>> + --extra-libs=*)
>> + ;;
>> --enable-debug-info)
>> ;;
>> --disable-debug-info)
>> @@ -1281,6 +1285,7 @@ Advanced options (experts only):
>> --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
>> --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS
>> --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
>> + --extra-libs=LIBS append extra libraries when linking
>> --make=MAKE use specified make [$make]
>> --install=INSTALL use specified install [$install]
>> --python=PYTHON use specified python [$python]
>> @@ -4718,6 +4723,11 @@ libs_softmmu="$pixman_libs $libs_softmmu"
>> CFLAGS="$CFLAGS $EXTRA_CFLAGS"
>> QEMU_CFLAGS="$QEMU_CFLAGS $EXTRA_CFLAGS"
>>
>> +# extra-libs
>> +LIBS="$LIBS $EXTRA_LIBS"
>> +libs_softmmu="$libs_softmmu $EXTRA_LIBS"
>> +libs_qga="$libs_qga $EXTRA_LIBS"
>> +
>> echo "Install prefix $prefix"
>> echo "BIOS directory `eval echo $qemu_datadir`"
>> echo "binary directory `eval echo $bindir`"
>> @@ -4888,6 +4898,7 @@ fi
>> echo "qemu_helperdir=$libexecdir" >> $config_host_mak
>> echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak
>> echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
>> +echo "extra_libs=$EXTRA_LIBS" >> $config_host_mak
>> echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
>> echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
>>
>>
--
Alex Bennée
next prev parent reply other threads:[~2016-01-25 18:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 16:49 [Qemu-devel] [RFC PATCH 0/4] ThreadSanitizer support Alex Bennée
2016-01-25 16:49 ` [Qemu-devel] [RFC PATCH 1/4] configure: move EXTRA_CFLAGS append to the end Alex Bennée
2016-01-25 17:04 ` Peter Maydell
2016-01-25 17:37 ` Peter Maydell
2016-01-25 16:49 ` [Qemu-devel] [RFC PATCH 2/4] configure: introduce --extra-libs Alex Bennée
2016-01-25 17:08 ` Peter Maydell
2016-01-25 17:25 ` Alex Bennée
2016-01-25 17:36 ` Peter Maydell
2016-01-25 17:58 ` Paolo Bonzini
2016-01-25 18:15 ` Alex Bennée [this message]
2016-01-25 22:10 ` Paolo Bonzini
2016-01-26 8:43 ` Alex Bennée
2016-01-25 16:49 ` [Qemu-devel] [RFC PATCH 3/4] include/qemu/atomic.h: default to __atomic functions Alex Bennée
2016-01-25 18:04 ` Paolo Bonzini
2016-01-25 18:23 ` Alex Bennée
2016-01-25 22:02 ` Paolo Bonzini
2016-01-25 16:49 ` [Qemu-devel] [RFC PATCH 4/4] tsan: various fixes for make check Alex Bennée
2016-01-25 18:09 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vb6ho79i.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=a.rigo@virtualopensystems.com \
--cc=fred.konrad@greensocs.com \
--cc=mark.burton@greensocs.com \
--cc=mttcg@greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).