Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2256525ybg; Sun, 27 Oct 2019 14:31:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlkU2gqfePn7UqJwp9vxVBzPOqP7hmZ6uv1x2zhFPJDf9R7wfUQZuiN/7916ui7kRdSe+T X-Received: by 2002:a17:906:1cd8:: with SMTP id i24mr13787307ejh.149.1572211915951; Sun, 27 Oct 2019 14:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572211915; cv=none; d=google.com; s=arc-20160816; b=j2wW2PhP94x91VOsSv6i+P6AyBUrwu62gCzDiLi+wWYq4Tf4SRaEkVdVhdy4jVcwow WB2hpfv1RViB7aQi6A2yEvjCbY4oOxqDtiifiQ+rAIH2EO5+xf3sdnsL51CpTnDKkg7g 65zZbFHTIpBYAblhOSJznx+dEDc3KXiC92CqFxKHMn3dXXNr5wQ4QtYbl5c16Hc1Ty2h BAxwQxehWOoUUmM9pvcRtcE7n7GQGibRBlDAAdx1zAqvfZzGJqcJwfCnknSdNRtOsxFN 8grpTXk9Stl5Ku4pMdYcQHiehHefMkb1U+RFV/LQuyJPwl6Npli/tpzm5JmhJBkda5Of +jUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+2h5T+r1k5w+BonZAoYieExl2uuyNOLFrbU7bks0jyQ=; b=SQtIECdM6GDXKhUVJpWAIQLxcAkp41vG1vZkqKbVNcBKVbg7v47p7HxsezzEpPyPop fJaZ8S0gN1eaMQiO9469V5P1Rm8o7c+Ra19uVlfSuIsvL/Md9VAFwwK7pwyUmDFSWgGc zGZUmDHSApsQM4OwSCiBOxpwxT2DKRrWr6/VL2+TjgpzfP1KybbFMirwx37ojSJP2eAa KKWTfHlgyg2jPt7lK5MHZX2j5RMCh5Kc6dKucvpjTUWW+Jjifz1unvSTOqmIYNxfBUGI UP2TgtjsnSY7XMMZAo/9fvSLk9GSHcObX2lK0qbmhRBGT0l2PkQgVR5Pn9v2U7dEdf9O FHYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BrJCkwmQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z35si6229366edz.260.2019.10.27.14.31.32; Sun, 27 Oct 2019 14:31:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BrJCkwmQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731429AbfJ0VTO (ORCPT + 99 others); Sun, 27 Oct 2019 17:19:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:39490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731405AbfJ0VTK (ORCPT ); Sun, 27 Oct 2019 17:19:10 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B574B214E0; Sun, 27 Oct 2019 21:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211149; bh=/z6edR+ar5qJn0sKLgrkE9Pv/uynN4goHo7mQYZ8Wyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BrJCkwmQ8bwCNoMaQW6Mn+nVdY7qdqB+Ur8dS2T5WD+g39kWaC1V+4qSM5gWKI0uJ Uxc006iLfT4E94jh3tY67fEE6vJdLme2lvMwxqtRROTUoPw2N7Ie2imhb20WnNOxJT T4ZVwtjpglLCVORiFlwdqvJPuuqZDId2cn3C3soo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shuah Khan , Paolo Bonzini , Sasha Levin Subject: [PATCH 5.3 050/197] selftests: kvm: Fix libkvm build error Date: Sun, 27 Oct 2019 21:59:28 +0100 Message-Id: <20191027203354.391657340@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203351.684916567@linuxfoundation.org> References: <20191027203351.684916567@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuah Khan [ Upstream commit 6e06983dde969c15eb4fdab77f0eda8b18ea28e6 ] Fix the following build error from "make TARGETS=kvm kselftest": libkvm.a(assert.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC This error is seen when build is done from the main Makefile using kselftest target. In this case KBUILD_CPPFLAGS and CC_OPTION_CFLAGS are defined. When build is invoked using: "make -C tools/testing/selftests/kvm" KBUILD_CPPFLAGS and CC_OPTION_CFLAGS aren't defined. There is no need to pass in KBUILD_CPPFLAGS and CC_OPTION_CFLAGS for the check to determine if --no-pie is necessary, which is the case when these two aren't defined when "make -C tools/testing/selftests/kvm" runs. Fix it by simplifying the no-pie-option logic. With this change, both build variations work. "make TARGETS=kvm kselftest" "make -C tools/testing/selftests/kvm" Signed-off-by: Shuah Khan Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index ba78497519894..fc8aeb224c032 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -46,7 +46,7 @@ CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ -I$(LINUX_HDR_PATH) -Iinclude -I$(