From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNlPw-0007Xn-5X for qemu-devel@nongnu.org; Mon, 25 Jan 2016 12:59:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNlPr-00052V-9o for qemu-devel@nongnu.org; Mon, 25 Jan 2016 12:59:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNlPr-00052R-3k for qemu-devel@nongnu.org; Mon, 25 Jan 2016 12:59:03 -0500 References: <1453740558-16303-1-git-send-email-alex.bennee@linaro.org> <1453740558-16303-3-git-send-email-alex.bennee@linaro.org> From: Paolo Bonzini Message-ID: <56A6625E.7070408@redhat.com> Date: Mon, 25 Jan 2016 18:58:54 +0100 MIME-Version: 1.0 In-Reply-To: <1453740558-16303-3-git-send-email-alex.bennee@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 2/4] configure: introduce --extra-libs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org Cc: mttcg@greensocs.com, peter.maydell@linaro.org, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, fred.konrad@greensocs.com On 25/01/2016 17:49, Alex Benn=C3=A9e wrote: > If for example you want to use the thread sanitizer you want to ensure = all > binaries are linked with the library: >=20 > ./configure ${TARGETS} --cc=3Dgcc-5 --cxx=3Dg++-5 \ > --extra-cflags=3D"-fsanitize=3Dthread" --extra-libs=3D"-ltsan" Shouldn't -fsanitize=3Dthread 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. >=20 > Signed-off-by: Alex Benn=C3=A9e > --- > configure | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/configure b/configure > index 7d23c6c..194bae9 100755 > --- a/configure > +++ b/configure > @@ -365,6 +365,8 @@ for opt do > --extra-ldflags=3D*) LDFLAGS=3D"$LDFLAGS $optarg" > EXTRA_LDFLAGS=3D"$optarg" > ;; > + --extra-libs=3D*) EXTRA_LIBS=3D"$optarg" > + ;; > --enable-debug-info) debug_info=3D"yes" > ;; > --disable-debug-info) debug_info=3D"no" > @@ -785,6 +787,8 @@ for opt do > ;; > --extra-ldflags=3D*) > ;; > + --extra-libs=3D*) > + ;; > --enable-debug-info) > ;; > --disable-debug-info) > @@ -1281,6 +1285,7 @@ Advanced options (experts only): > --objcc=3DOBJCC use Objective-C compiler OBJCC [$objcc] > --extra-cflags=3DCFLAGS append extra C compiler flags QEMU_CFLAGS > --extra-ldflags=3DLDFLAGS append extra linker flags LDFLAGS > + --extra-libs=3DLIBS append extra libraries when linking > --make=3DMAKE use specified make [$make] > --install=3DINSTALL use specified install [$install] > --python=3DPYTHON use specified python [$python] > @@ -4718,6 +4723,11 @@ libs_softmmu=3D"$pixman_libs $libs_softmmu" > CFLAGS=3D"$CFLAGS $EXTRA_CFLAGS" > QEMU_CFLAGS=3D"$QEMU_CFLAGS $EXTRA_CFLAGS" > =20 > +# extra-libs > +LIBS=3D"$LIBS $EXTRA_LIBS" > +libs_softmmu=3D"$libs_softmmu $EXTRA_LIBS" > +libs_qga=3D"$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=3D$libexecdir" >> $config_host_mak > echo "extra_cflags=3D$EXTRA_CFLAGS" >> $config_host_mak > echo "extra_ldflags=3D$EXTRA_LDFLAGS" >> $config_host_mak > +echo "extra_libs=3D$EXTRA_LIBS" >> $config_host_mak > echo "qemu_localedir=3D$qemu_localedir" >> $config_host_mak > echo "libs_softmmu=3D$libs_softmmu" >> $config_host_mak > =20 >=20