Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2567847rdb; Wed, 4 Oct 2023 05:27:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYeIwYx7Q5vyR6YpVO0rS47plPHlPGykXa4f+moh3XScDnobZJvtwymliyl9bhUcqrwZZ/ X-Received: by 2002:a17:903:22d1:b0:1c6:2b5e:824e with SMTP id y17-20020a17090322d100b001c62b5e824emr2316466plg.28.1696422458994; Wed, 04 Oct 2023 05:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696422458; cv=none; d=google.com; s=arc-20160816; b=Bs8HQuQySXkNttLejbraQTlxfdmiwv12K70o+KvYyNY4UKlkbDwSYS+jBo1V9u9FoM 4poHuwyDdzkHImy9NXGFkWmo2kCx7/VDdced1ShvZtO9CuTjSirRP+EEj/EZkl26Mkga 1Wzb/meqoDhde/rX8MWluNC7EbVkuEII4NpglosLWPDWaAdA57Tt5AiXIG0D1OBzZ6sX dO6t5F+Tv2O1QoTOdVQczA3zbuz1A/U6RjnLKcmiVzlRZ+xOCZAMcQblV4uBlDcjnR8D CstMto/C49QAkixq9iCTE4lCFp0b9hLPfUAzBvmDswSHml50NeLntHCCwfe98MCdSaj+ 1NuQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SnBgmGvO90jahemMaw/3LJl5yzAtjL2H1csFfKzfqFw=; fh=devRr2ayWiPTB0gjJgy2L6/96GVnVwM3vD0yQzhTQkU=; b=h6CE4ruSErmAr4+b5ekF/nihF35zsknhMfxur5/xP9rWcA3csjmxil3p1xFIhvXMPq 8lmFbKl/bYtTzSA+oTotnMLJkchlwotg8mJ17TisujUzuvA8Eupc9BYWCdF2cl9eIzP9 l4ffv7lWwX6V121o3C8cBrGydTTRATykYiY4mbA1YEijiylTU8ef7QUB0OcNo/4q2rmS PYKTw0Am6VRc/ZEaVbap1NEcCvxOueRN3HEJ+73mrjp6M6v46M32BX3SOMzUtaP6JKPM 4Y397Mh527chenObf6aGue5grIQrlrzFfT647GST57zJdpWpsdjBswbuNUf4NqAEB0r6 Jj1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ImQPHdN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id n6-20020a170902d2c600b001b8a4954be1si3814660plc.595.2023.10.04.05.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 05:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ImQPHdN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BB7ED801B65B; Wed, 4 Oct 2023 05:27:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242347AbjJDM1e (ORCPT + 99 others); Wed, 4 Oct 2023 08:27:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233216AbjJDM1c (ORCPT ); Wed, 4 Oct 2023 08:27:32 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6666093; Wed, 4 Oct 2023 05:27:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0494AC433C7; Wed, 4 Oct 2023 12:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696422449; bh=vZdeekHmX6PRJrot+PinxMvY1FiWo7fqDKl0jsBzl+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ImQPHdN5Vej8ZQgiOvsRoxKhp/zQ4Hl2xHXEjV4iyS98p1zFUHKHL50ytHlMRK484 9hzk0/ouyrOenAmjzEdDDnUHYfH6QmpzDmo1bL4rmj8feQ7JTPlFiv8OU0V9caUc61 IC3WjJiR2dah3NRJhNL5VcKtF0magsuCqJAVTnNZmhxEysDJC+p0Rfvb2uT2R9h1s1 ns7MX2dQ183fjYtbfCOPvPfvlf0BA4j9YQr/LxGTtCjjYa3UicdOf3eqrUunR1dZh9 QL5CYN/+QLMn8L1zku2UjN0HmQ/AjQeLhR9bQK0bMQArhxh3LGzK95NdheiCoQbN12 z4jEO4wgv/U8g== From: =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Mykola Lysenko , bpf@vger.kernel.org, netdev@vger.kernel.org Cc: =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH bpf-next 1/3] selftests/bpf: Add cross-build support for urandom_read et al Date: Wed, 4 Oct 2023 14:27:19 +0200 Message-Id: <20231004122721.54525-2-bjorn@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004122721.54525-1-bjorn@kernel.org> References: <20231004122721.54525-1-bjorn@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 05:27:38 -0700 (PDT) From: Björn Töpel Some userland programs in the BPF test suite, e.g. urandom_read, is missing cross-build support. Add cross-build support for these programs Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 47365161b6fc..a9cbb85fa180 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -198,7 +198,7 @@ endif # do not fail. Static builds leave urandom_read relying on system-wide shared libraries. $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c liburandom_read.map $(call msg,LIB,,$@) - $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) \ + $(Q)$(CLANG) $(CLANG_TARGET_ARCH) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) \ $(filter %.c,$^) $(filter-out -static,$(LDLIBS)) \ -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \ -Wl,--version-script=liburandom_read.map \ @@ -206,7 +206,7 @@ $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c liburandom $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux.c $(OUTPUT)/liburandom_read.so $(call msg,BINARY,,$@) - $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \ + $(Q)$(CLANG) $(CLANG_TARGET_ARCH) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \ -lurandom_read $(filter-out -static,$(LDLIBS)) -L$(OUTPUT) \ -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \ -Wl,-rpath=. -o $@ -- 2.39.2