From patchwork Mon Jun 11 11:03:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 927617 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4149BH5D17z9s01 for ; Mon, 11 Jun 2018 21:04:05 +1000 (AEST) Received: from localhost ([::1]:47724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSKcD-0002dR-H9 for incoming@patchwork.ozlabs.org; Mon, 11 Jun 2018 07:04:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSKbr-0002d6-Hj for qemu-devel@nongnu.org; Mon, 11 Jun 2018 07:03:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSKbn-0001Ak-FL for qemu-devel@nongnu.org; Mon, 11 Jun 2018 07:03:39 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49172 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSKbn-00019g-8k for qemu-devel@nongnu.org; Mon, 11 Jun 2018 07:03:35 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D0084072CFB; Mon, 11 Jun 2018 11:03:34 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1E7B20357CA; Mon, 11 Jun 2018 11:03:33 +0000 (UTC) From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= To: qemu-devel@nongnu.org Date: Mon, 11 Jun 2018 12:03:27 +0100 Message-Id: <20180611110327.21218-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 11 Jun 2018 11:03:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 11 Jun 2018 11:03:34 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'berrange@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] DO NOT APPLY - demo broken unnest-vars with clashing .o filenames X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Fam Zheng , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" In a sub-directory source files may be conditionally built using a Makefile.objs line such as crypto-obj-$(CONFIG_CTHULHU) = foo.o It is also possible to add custom linker flags for when this foo.o is later linked into a binary foo.o-libs = -lcthulhu When the unqualfied 'foo.o' filename matches the name of an object in another directory, however, it appears the linker flags leak out and affect the linking of the foo.o from the other directory. This patch demos the bug by adding a crypto/piix.o file. It should have no effect because CONFIG_CTHULHU is not defined, however, the existence of hw/pci-host/piix.o and hw/ide/piix.o in fact causes '-lcthulhu' to be added to the link line twice, causing build failure: $ make LINK x86_64-softmmu/qemu-system-x86_64 /usr/bin/ld: cannot find -lcthuhlu /usr/bin/ld: cannot find -lcthuhlu collect2: error: ld returned 1 exit status make[1]: *** [Makefile:193: qemu-system-x86_64] Error 1 make: *** [Makefile:482: subdir-x86_64-softmmu] Error 2 Signed-off-by: Daniel P. Berrangé --- crypto/Makefile.objs | 4 ++++ crypto/piix.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 crypto/piix.c diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs index 2b99e08062..73b4548f12 100644 --- a/crypto/Makefile.objs +++ b/crypto/Makefile.objs @@ -38,3 +38,7 @@ crypto-obj-y += block-luks.o crypto-aes-obj-y = aes.o stub-obj-y += pbkdf-stub.o + + +crypto-obj-$(CONFIG_CTHUHLU) += piix.o +piix.o-libs = -lcthuhlu diff --git a/crypto/piix.c b/crypto/piix.c new file mode 100644 index 0000000000..367683f7bb --- /dev/null +++ b/crypto/piix.c @@ -0,0 +1,2 @@ + +random garbage as this ".c" file will never be built