Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1614449ybl; Thu, 5 Dec 2019 04:22:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzlT57c5iS5Kztv6JEUt8I34Rp+jw2EmATNPBzpkqGW8sqkvRqNJtff8EFitRXxznppd6le X-Received: by 2002:aca:ad47:: with SMTP id w68mr6638171oie.63.1575548535429; Thu, 05 Dec 2019 04:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575548535; cv=none; d=google.com; s=arc-20160816; b=nPQd9sOkKbV1j7Su3IgNhEuBv0eOZt/ngVyD2IdykZEpkTTLEp6r42jamjkeGcq5BF bsRpjZYqdjLZDtiEh72jcSx3BnUUro52m35SzTa+Q34nd343taqB4n3xQ3FLMx9IB88y 9P7fKYqPn+ZhRcdNIvAzDalZNjArxp6jO3oIUxJTfM3YzpMZBPmyCYMPoyIQTlkx8AUt dRLjUZD9GrrHEIm5RZbyJX0wmWR+Lrb3k/Ykv3ZGAP1/jMKfa8qVjS0/HJr/ae1RC5d4 53NgbWE6KpHssDzecgOoVW4bA2J91Pk4gWtsb8ugARgxk7q+dTIADDuP74HsAo8gz4IM 7Ttg== 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=rRyZrXh3o5jOJ52plVc5hN0auKLm3OLZ0NdBLePxOiQ=; b=d+ZLRr0+7q2y+cBlXUaSi2wtDcheF7mf7YG5TQ8Mc905ksS4kO5V+AvzrUkHqlxu1s b7M1fy6yVstRMlTkiyD2Jhaqn+Gb/xCDv0IBq+u8DrMrkBGjkUndzjIEgFy01olaDl3G IVzyVlnvaXScz890mmPvB0UMR0plXLpHyunpjJzbU2nOWPMM80jLcOPREJLK/fPbl6eJ XWYllD6j5cUnpRGD/HZlPPJX05rpoZ7s1cTdj6LM4yEobE72HkkC3s/OBpJ5g4pUFGQ4 R3ASsU1ITXKesNpBeRN6UisHm0CTELwQvKbPkML3pr5NDvTaIBT53T2Ln2D+MN4yhNdX zceA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UN6nYKbF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si4842066oti.39.2019.12.05.04.22.03; Thu, 05 Dec 2019 04:22:15 -0800 (PST) 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=UN6nYKbF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729401AbfLEMVD (ORCPT + 99 others); Thu, 5 Dec 2019 07:21:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:37228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729074AbfLEMVC (ORCPT ); Thu, 5 Dec 2019 07:21:02 -0500 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 956EB24249; Thu, 5 Dec 2019 12:21:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575548461; bh=edquYFBHaofPMU3DDDEksKNwbLIT1/Uva327KZiKnv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UN6nYKbFRYTVks+DlN6AqIMri32etT5PbonNAOXosiwERnrxzF1krAtvzBBbofrpj pPfjnRG1NRuC6qbcpGm2Mo1w9PIo+HbLhOI7cSf69hmFTSVSfNHOAxT8XNgOyCPh5M U+EPq1v4+ubxg8ZMMeMGAD4i4BoN54lMyCPP3aVQ= From: Masami Hiramatsu To: Shuah Khan Cc: Micah Morton , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, jaswinder.singh@linaro.org Subject: [BUGFIX PATCH v2 1/3] selftests: safesetid: Move link library to LDLIBS Date: Thu, 5 Dec 2019 21:20:58 +0900 Message-Id: <157554845808.11018.11000592632669206853.stgit@devnote2> X-Mailer: git-send-email 2.20.1 In-Reply-To: <157554844882.11018.13436399905210284553.stgit@devnote2> References: <157554844882.11018.13436399905210284553.stgit@devnote2> User-Agent: StGit/0.17.1-dirty 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 Move -lcap to LDLIBS from CFLAGS because it is a library to be linked. Without this, safesetid failed to build with link error as below. ---- /usr/bin/ld: /tmp/ccL8rZHT.o: in function `drop_caps': safesetid-test.c:(.text+0xe7): undefined reference to `cap_get_proc' /usr/bin/ld: safesetid-test.c:(.text+0x107): undefined reference to `cap_set_flag' /usr/bin/ld: safesetid-test.c:(.text+0x10f): undefined reference to `cap_set_proc' /usr/bin/ld: safesetid-test.c:(.text+0x117): undefined reference to `cap_free' /usr/bin/ld: safesetid-test.c:(.text+0x136): undefined reference to `cap_clear' collect2: error: ld returned 1 exit status ---- Fixes: c67e8ec03f3f ("LSM: SafeSetID: add selftest") Signed-off-by: Masami Hiramatsu --- tools/testing/selftests/safesetid/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/safesetid/Makefile b/tools/testing/selftests/safesetid/Makefile index 98da7a504737..cac42cd36a1b 100644 --- a/tools/testing/selftests/safesetid/Makefile +++ b/tools/testing/selftests/safesetid/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for mount selftests. -CFLAGS = -Wall -lcap -O2 +CFLAGS = -Wall -O2 +LDLIBS = -lcap TEST_PROGS := run_tests.sh TEST_GEN_FILES := safesetid-test