Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1661525rwi; Wed, 19 Oct 2022 13:40:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ShzsfsJ/ewUzj8YkbUJm0e9aHTbES5LbxHNs53xPmUUyG9hsSAnaXkN4S3HN3EIdXw/tA X-Received: by 2002:a05:6a00:acb:b0:555:ac02:433e with SMTP id c11-20020a056a000acb00b00555ac02433emr10513194pfl.3.1666212054922; Wed, 19 Oct 2022 13:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666212054; cv=none; d=google.com; s=arc-20160816; b=Y1LED4PEqIqzOI1yupTMVWf3FzGX4tGzvloRGDbC6c7mxm+TEHJHeCD8pmWrJaalkB frj6XT2U/iRzz1wkfT/Fg1azZ7rE3Hr8AuFxI8c3nVbAtAPcMtm3xssMx9uvN5QfrE0I OXsTrddXUHMmrgLnPtOPt7xU7uvckDPV4d7tYX3PVlaAnq5AJWdtdud8xjsU5dymr4vr SmsdVv21hm5hybvBja/i6kN30YhuPCGwYi/APVB7cwqpN5elRn+AFIvGHcg+UE26+IV1 23OEwIMI8X5/D9Fd8UT0blz+F/EP+ST7BlUjiXdPMeF8w3GP0JLVXGWQe1Nrq2eoxSdi KybA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=iFd7v0LZnK8woem0M1bTu4M67TvDhAPYCJ56JTjRS8E=; b=n8BYQGj74HBOYJo0sdjJarnLiFlwa1JsjYSXGYdraJCBflwoih4YMLWi3M62uTFxkQ 2cPkQJotKbi5fwECzNCGKUNkYu+PfhE+nDRZwVnfGZ9DeVWDDzZtvpepa1pLuPylxApN kFMcyKg156exKOvZPDsvFhM97hb3+me7ef1jjly4osyckfXjnf7RKI+qpLOM9WA9mm1y PjZfchbRTAPFoxpZoOO0a1cpwYgdjLBP1aturKdewJIwaAXUWnJOGklDj39eX4v3sMOa LfQaTUMFr2RmcoiGJhbkvl0BxJUuK090qxO5X+8JJezlOIOj/vOKRk+FpwdQPqNDcV8h y6Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=AoGSdmPF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a17090a300200b00209b6044d31si944651pjb.51.2022.10.19.13.40.27; Wed, 19 Oct 2022 13:40:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=AoGSdmPF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbiJSUGB (ORCPT + 99 others); Wed, 19 Oct 2022 16:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbiJSUF6 (ORCPT ); Wed, 19 Oct 2022 16:05:58 -0400 Received: from smtp-bc0e.mail.infomaniak.ch (smtp-bc0e.mail.infomaniak.ch [IPv6:2001:1600:4:17::bc0e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07EFC18BE20 for ; Wed, 19 Oct 2022 13:05:55 -0700 (PDT) Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4Mt1v13XXkzMq4cH; Wed, 19 Oct 2022 22:05:49 +0200 (CEST) Received: from localhost (unknown [23.97.221.149]) by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4Mt1v06dk9zxH; Wed, 19 Oct 2022 22:05:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1666209949; bh=dLhBf8o1kXqp6sscAfSz5LKvdc7yEb7Q8TYdJPkHjFU=; h=From:To:Cc:Subject:Date:From; b=AoGSdmPF2lFsibBkqhvB5eYH60CouLgJ8QYefj+ta77rUi4JMemlGJVAt8EPpPaCk P+tS6NSCCXlNSCOxMpSJa4uhMtesUp5+kVEmXqiUFqIhu0KYl9/3fEoekhY7JwKyEr r1uI/wobcxe+Eb9kYM0tZ2vS3YpOOh+RzjhTgB6U= From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Shuah Khan Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Anders Roxell , Guillaume Tucker , Mark Brown , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-security-module@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v1] selftests/landlock: Build without static libraries Date: Wed, 19 Oct 2022 22:05:36 +0200 Message-Id: <20221019200536.2771316-1-mic@digikod.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only (forced) static test binary doesn't depend on libcap. Because using -lcap on systems that don't have such static library would fail (e.g. on Arch Linux), let's be more specific and require only dynamic libcap linking. Fixes: a52540522c95 ("selftests/landlock: Fix out-of-tree builds") Cc: Anders Roxell Cc: Guillaume Tucker Cc: Mark Brown Cc: Shuah Khan Cc: stable@vger.kernel.org Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20221019200536.2771316-1-mic@digikod.net --- tools/testing/selftests/landlock/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/landlock/Makefile b/tools/testing/selftests/landlock/Makefile index 6632bfff486b..348e2dbdb4e0 100644 --- a/tools/testing/selftests/landlock/Makefile +++ b/tools/testing/selftests/landlock/Makefile @@ -3,7 +3,6 @@ # First run: make -C ../../../.. headers_install CFLAGS += -Wall -O2 $(KHDR_INCLUDES) -LDLIBS += -lcap LOCAL_HDRS += common.h @@ -13,10 +12,12 @@ TEST_GEN_PROGS := $(src_test:.c=) TEST_GEN_PROGS_EXTENDED := true -# Static linking for short targets: +# Short targets: +$(TEST_GEN_PROGS): LDLIBS += -lcap $(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static include ../lib.mk -# Static linking for targets with $(OUTPUT)/ prefix: +# Targets with $(OUTPUT)/ prefix: +$(TEST_GEN_PROGS): LDLIBS += -lcap $(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780 -- 2.37.2