From: Paolo Bonzini <pbonzini@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org,
mark.burton@greensocs.com, a.rigo@virtualopensystems.com,
stefanha@redhat.com, fred.konrad@greensocs.com
Subject: Re: [Qemu-devel] [PATCH v1 1/5] configure: introduce --extra-libs
Date: Thu, 28 Jan 2016 12:14:17 +0100 [thread overview]
Message-ID: <56A9F809.8000700@redhat.com> (raw)
In-Reply-To: <1453976119-24372-2-git-send-email-alex.bennee@linaro.org>
On 28/01/2016 11:15, 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"
>
> This is more explicit than just specifying --extra-ldflags which does
> not get applied at the end of the linker string.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Did you find out why you need -ltsan?
Paolo
> ---
> v1
> - rebase
> - also ensure it is applied to test builds
> ---
> configure | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 44ac9ab..bd29ba7 100755
> --- a/configure
> +++ b/configure
> @@ -113,7 +113,7 @@ compile_object() {
> compile_prog() {
> local_cflags="$1"
> local_ldflags="$2"
> - do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
> + do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags $EXTRA_LIBS
> }
>
> do_libtool() {
> @@ -366,6 +366,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"
> @@ -786,6 +788,8 @@ for opt do
> ;;
> --extra-ldflags=*)
> ;;
> + --extra-libs=*)
> + ;;
> --enable-debug-info)
> ;;
> --disable-debug-info)
> @@ -1282,6 +1286,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]
> @@ -4715,6 +4720,11 @@ fi
> QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS"
> libs_softmmu="$pixman_libs $libs_softmmu"
>
> +# 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`"
> @@ -4885,6 +4895,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
>
>
next prev parent reply other threads:[~2016-01-28 11:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 10:15 [Qemu-devel] [PATCH v1 0/5] ThreadSanitizer support Alex Bennée
2016-01-28 10:15 ` [Qemu-devel] [PATCH v1 1/5] configure: introduce --extra-libs Alex Bennée
2016-01-28 11:14 ` Paolo Bonzini [this message]
2016-01-28 11:38 ` Alex Bennée
2016-01-28 10:15 ` [Qemu-devel] [PATCH v1 2/5] configure: ensure ldflags propagated to config_host Alex Bennée
2016-01-28 11:10 ` Paolo Bonzini
2016-01-28 11:13 ` Paolo Bonzini
2016-01-29 15:26 ` Alex Bennée
2016-01-28 10:15 ` [Qemu-devel] [PATCH v1 3/5] include/qemu/atomic.h: default to __atomic functions Alex Bennée
2016-01-28 11:00 ` Paolo Bonzini
2016-01-29 16:06 ` Alex Bennée
2016-02-04 12:40 ` Paolo Bonzini
2016-02-04 13:00 ` Peter Maydell
2016-04-01 14:30 ` James Hogan
2016-04-01 14:51 ` Peter Maydell
2016-04-01 16:06 ` Alex Bennée
2016-04-01 20:35 ` Pranith Kumar
2016-04-04 8:14 ` Paolo Bonzini
2016-04-04 16:26 ` Pranith Kumar
2016-04-04 17:03 ` Paolo Bonzini
2016-04-04 20:15 ` Paolo Bonzini
2016-04-05 3:35 ` Pranith Kumar
2016-04-05 12:47 ` Paolo Bonzini
2016-01-28 10:15 ` [Qemu-devel] [PATCH v1 4/5] async.c: various atomic fixes for tsan Alex Bennée
2016-01-28 10:45 ` Paolo Bonzini
2016-01-28 10:15 ` [Qemu-devel] [PATCH v1 5/5] thread-pool: atomic fixes from tsan Alex Bennée
2016-01-28 10:44 ` 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=56A9F809.8000700@redhat.com \
--to=pbonzini@redhat.com \
--cc=a.rigo@virtualopensystems.com \
--cc=alex.bennee@linaro.org \
--cc=fred.konrad@greensocs.com \
--cc=mark.burton@greensocs.com \
--cc=mttcg@listserver.greensocs.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.