[{"id":1764860,"web_url":"http://patchwork.ozlabs.org/comment/1764860/","msgid":"<58759972-657f-ae54-d3bb-ff84963e4f7e@amsat.org>","list_archive_url":null,"date":"2017-09-07T17:46:24","subject":"Re: [Qemu-devel] [PATCH 7/9] buildsys: Move libcacard cflags/libs\n\tto per object","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"content":"On 09/07/2017 05:29 AM, Fam Zheng wrote:\n> Signed-off-by: Fam Zheng <famz@redhat.com>\n> ---\n>   configure            | 4 ++--\n>   hw/usb/Makefile.objs | 6 ++++--\n>   2 files changed, 6 insertions(+), 4 deletions(-)\n> \n> diff --git a/configure b/configure\n> index b1320b1994..85fef3d16f 100755\n> --- a/configure\n> +++ b/configure\n> @@ -4237,8 +4237,6 @@ if test \"$smartcard\" != \"no\"; then\n>       if $pkg_config libcacard; then\n>           libcacard_cflags=$($pkg_config --cflags libcacard)\n>           libcacard_libs=$($pkg_config --libs libcacard)\n> -        QEMU_CFLAGS=\"$QEMU_CFLAGS $libcacard_cflags\"\n> -        libs_softmmu=\"$libs_softmmu $libcacard_libs\"\n>           smartcard=\"yes\"\n>       else\n>           if test \"$smartcard\" = \"yes\"; then\n> @@ -5831,6 +5829,8 @@ fi\n>   \n>   if test \"$smartcard\" = \"yes\" ; then\n>     echo \"CONFIG_SMARTCARD=y\" >> $config_host_mak\n> +  echo \"SMARTCARD_CFLAGS=$libcacard_cflags\" >> $config_host_mak\n> +  echo \"SMARTCARD_LIBS=$libcacard_libs\" >> $config_host_mak\n>   fi\n>   \n>   if test \"$libusb\" = \"yes\" ; then\n> diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs\n> index 97f1c4561a..795ff25a5e 100644\n> --- a/hw/usb/Makefile.objs\n> +++ b/hw/usb/Makefile.objs\n> @@ -26,8 +26,10 @@ common-obj-$(CONFIG_USB_BLUETOOTH)    += dev-bluetooth.o\n>   \n>   ifeq ($(CONFIG_USB_SMARTCARD),y)\n>   common-obj-y                          += dev-smartcard-reader.o\n> -common-obj-$(CONFIG_SMARTCARD)        += ccid-card-passthru.o\n> -common-obj-$(CONFIG_SMARTCARD)        += ccid-card-emulated.o\n> +common-obj-$(CONFIG_SMARTCARD)        += smartcard.mo\n> +smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o\n> +smartcard.mo-cflags := $(SMARTCARD_CFLAGS)\n> +smartcard.mo-libs := $(SMARTCARD_LIBS)\n\nthis line here looks more natural to me:\n\ncommon-obj-$(CONFIG_SMARTCARD)        += smartcard.mo\n\n>   endif\n>   \n>   ifeq ($(CONFIG_POSIX),y)\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"YskTD7FA\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xp7F11TX4z9t2M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 03:47:01 +1000 (AEST)","from localhost ([::1]:41535 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dq0tH-0003kU-Bs\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 13:46:59 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:55921)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dq0sq-0003fa-GT\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 13:46:37 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dq0sl-00059a-HH\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 13:46:32 -0400","from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:34229)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dq0sl-00058n-Cu\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 13:46:27 -0400","by mail-qt0-x242.google.com with SMTP id q8so246206qtb.1\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 10:46:27 -0700 (PDT)","from [192.168.1.10] ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tn50sm164563qtc.6.2017.09.07.10.46.24\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 07 Sep 2017 10:46:25 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=yRGOzoqXbiayTx7fFgeQwQBv7Kl8mn4G0IJ9gTsNzrM=;\n\tb=YskTD7FARNB9MqH8VWZOlbvY11MLd/9bJ3lLgGKXJgbHuxKFGhfDVgo5NPCs46qunA\n\tTz0CU5VamaG33Kq7M+ENZ2C3x4PuXBkeEGZZ2ESdOM53Yl3Y4sRSXJv0GhWJm57+l+aS\n\thHQteWH5VteFjs0+PD+nT7tbZ3s1djPncI2EoIfzYDXTYtt61KgenxqiR3zFq7gtF22+\n\tZhgLlr6nMwIPwN7AGTYeh9Ly1F6OkAb1zotcGI0VmG8kShehr27FETErBD+VuioPzxI1\n\tn+RIonNq8U65veW4L2LSTlf7unVYDgM4UaKoscnc9SzrHfozzYggNpmAKRWoBzreyDQf\n\tPbOA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=yRGOzoqXbiayTx7fFgeQwQBv7Kl8mn4G0IJ9gTsNzrM=;\n\tb=hMwS/oG2crQnatelG3pvSpCy/5iI/ExkWkpoGXeSCZtvhktMaunN/A2p1vzdhdFkFi\n\tJLUV54P4X+vZUTWjLuI/oM8HJc4z/CocNju4wqk5ZSepNKh652mnKCdo3CD2NSUqYBdD\n\trBkNl3S+emRugZDPdO1YmJA4IA8QQ1LtQTYJ6H9pQnVeSfBPexSoAewoUMkzWKvgcc4Q\n\tno85wdrsdNrbE8FNV39/wu5NgOyaELRYTo0kEhoIzG6csb0mN5eMo6Z23xwJQC7+6yU7\n\tO9bV/q4dFsHDx1qwydl5WQVim01smIb+k0aGIgvmO19PH/N4KH7XtDLvc1mvKzU5TMXf\n\tuIqw==","X-Gm-Message-State":"AHPjjUhkvj2ICoAcP2anBwsUjm5a+rkUW8WQB/af7BF/VbRQLFjhQd7I\n\tPql/8B7H/UUGLQ==","X-Google-Smtp-Source":"AOwi7QArdOTg8IgDJslSsPCbOAHTGrGFfDIxK3DJ0kKO7RlVsJQYoF4bMYwLk07HoE9nBkqMKylGCw==","X-Received":"by 10.200.52.60 with SMTP id u57mr187866qtb.107.1504806386731;\n\tThu, 07 Sep 2017 10:46:26 -0700 (PDT)","To":"Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org","References":"<20170907082918.7299-1-famz@redhat.com>\n\t<20170907082918.7299-8-famz@redhat.com>","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","Message-ID":"<58759972-657f-ae54-d3bb-ff84963e4f7e@amsat.org>","Date":"Thu, 7 Sep 2017 14:46:24 -0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170907082918.7299-8-famz@redhat.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c0d::242","Subject":"Re: [Qemu-devel] [PATCH 7/9] buildsys: Move libcacard cflags/libs\n\tto per object","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Gerd Hoffmann <kraxel@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1765099,"web_url":"http://patchwork.ozlabs.org/comment/1765099/","msgid":"<20170908061217.GC4511@lemon>","list_archive_url":null,"date":"2017-09-08T06:12:17","subject":"Re: [Qemu-devel] [PATCH 7/9] buildsys: Move libcacard cflags/libs\n\tto per object","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Thu, 09/07 14:46, Philippe Mathieu-Daudé wrote:\n> \n> \n> On 09/07/2017 05:29 AM, Fam Zheng wrote:\n> > Signed-off-by: Fam Zheng <famz@redhat.com>\n> > ---\n> >   configure            | 4 ++--\n> >   hw/usb/Makefile.objs | 6 ++++--\n> >   2 files changed, 6 insertions(+), 4 deletions(-)\n> > \n> > diff --git a/configure b/configure\n> > index b1320b1994..85fef3d16f 100755\n> > --- a/configure\n> > +++ b/configure\n> > @@ -4237,8 +4237,6 @@ if test \"$smartcard\" != \"no\"; then\n> >       if $pkg_config libcacard; then\n> >           libcacard_cflags=$($pkg_config --cflags libcacard)\n> >           libcacard_libs=$($pkg_config --libs libcacard)\n> > -        QEMU_CFLAGS=\"$QEMU_CFLAGS $libcacard_cflags\"\n> > -        libs_softmmu=\"$libs_softmmu $libcacard_libs\"\n> >           smartcard=\"yes\"\n> >       else\n> >           if test \"$smartcard\" = \"yes\"; then\n> > @@ -5831,6 +5829,8 @@ fi\n> >   if test \"$smartcard\" = \"yes\" ; then\n> >     echo \"CONFIG_SMARTCARD=y\" >> $config_host_mak\n> > +  echo \"SMARTCARD_CFLAGS=$libcacard_cflags\" >> $config_host_mak\n> > +  echo \"SMARTCARD_LIBS=$libcacard_libs\" >> $config_host_mak\n> >   fi\n> >   if test \"$libusb\" = \"yes\" ; then\n> > diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs\n> > index 97f1c4561a..795ff25a5e 100644\n> > --- a/hw/usb/Makefile.objs\n> > +++ b/hw/usb/Makefile.objs\n> > @@ -26,8 +26,10 @@ common-obj-$(CONFIG_USB_BLUETOOTH)    += dev-bluetooth.o\n> >   ifeq ($(CONFIG_USB_SMARTCARD),y)\n> >   common-obj-y                          += dev-smartcard-reader.o\n> > -common-obj-$(CONFIG_SMARTCARD)        += ccid-card-passthru.o\n> > -common-obj-$(CONFIG_SMARTCARD)        += ccid-card-emulated.o\n> > +common-obj-$(CONFIG_SMARTCARD)        += smartcard.mo\n> > +smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o\n> > +smartcard.mo-cflags := $(SMARTCARD_CFLAGS)\n> > +smartcard.mo-libs := $(SMARTCARD_LIBS)\n> \n> this line here looks more natural to me:\n> \n> common-obj-$(CONFIG_SMARTCARD)        += smartcard.mo\n\nDo you mean to move this line *after* the .mo variables? I personally find the\ncurrent (top-down) order easier to understand, and it more common.\n\nFam\n\n> \n> >   endif\n> >   ifeq ($(CONFIG_POSIX),y)\n> > \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpRnZ721Sz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 16:12:50 +1000 (AEST)","from localhost ([::1]:43455 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqCX3-0004H5-39\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 02:12:49 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33350)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqCWg-0004Gg-Qb\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 02:12:31 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqCWc-0004vV-3c\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 02:12:26 -0400","from mx1.redhat.com ([209.132.183.28]:51632)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1dqCWb-0004uU-U2\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 02:12:22 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 0703B81DEF;\n\tFri,  8 Sep 2017 06:12:21 +0000 (UTC)","from localhost (ovpn-12-98.pek2.redhat.com [10.72.12.98])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 933E55D6A3;\n\tFri,  8 Sep 2017 06:12:18 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 0703B81DEF","Date":"Fri, 8 Sep 2017 14:12:17 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Philippe =?iso-8859-1?q?Mathieu-Daud=E9?= <f4bug@amsat.org>","Message-ID":"<20170908061217.GC4511@lemon>","References":"<20170907082918.7299-1-famz@redhat.com>\n\t<20170907082918.7299-8-famz@redhat.com>\n\t<58759972-657f-ae54-d3bb-ff84963e4f7e@amsat.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","In-Reply-To":"<58759972-657f-ae54-d3bb-ff84963e4f7e@amsat.org>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tFri, 08 Sep 2017 06:12:21 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH 7/9] buildsys: Move libcacard cflags/libs\n\tto per object","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]