All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: mttcg@greensocs.com, peter.maydell@linaro.org,
	mark.burton@greensocs.com, a.rigo@virtualopensystems.com,
	fred.konrad@greensocs.com
Subject: Re: [Qemu-devel] [RFC PATCH 2/4] configure: introduce --extra-libs
Date: Mon, 25 Jan 2016 18:58:54 +0100	[thread overview]
Message-ID: <56A6625E.7070408@redhat.com> (raw)
In-Reply-To: <1453740558-16303-3-git-send-email-alex.bennee@linaro.org>



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?
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
>  
> 

  parent reply	other threads:[~2016-01-25 17:59 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 [this message]
2016-01-25 18:15     ` Alex Bennée
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=56A6625E.7070408@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@greensocs.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 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.