From nobody Mon Sep 29 21:07:52 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90CDDC00140 for ; Mon, 15 Aug 2022 23:33:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345634AbiHOXdh (ORCPT ); Mon, 15 Aug 2022 19:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345952AbiHOX06 (ORCPT ); Mon, 15 Aug 2022 19:26:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D2D280F7F; Mon, 15 Aug 2022 13:07:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5B7DCB80EA9; Mon, 15 Aug 2022 20:07:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFD1EC433C1; Mon, 15 Aug 2022 20:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594021; bh=nZwBQrpKOrrBiHTXHEbNM8S3yRqLyVRgRX0ppWUJZIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fyu9D/+Yly+m9qOASGpb7lm262zeRAZzf2Pk5hUJofciCJ9xPjhcWz0W/cEZZAmAz 5vrtJVxnyoYRk9TEHofKSMO7XvDRYzgPTbiyUd9qKNhu5CXQfqKruUoYYRKGRUMygG JK/gWb90JgB57CFiw9SH+b2RqzYFysPsvycuCc0k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrii Nakryiko , Daniel Borkmann , Sasha Levin Subject: [PATCH 5.19 0363/1157] selftests/bpf: Dont force lld on non-x86 architectures Date: Mon, 15 Aug 2022 19:55:19 +0200 Message-Id: <20220815180454.244202893@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Andrii Nakryiko [ Upstream commit 08c79c9cd67fffd0d5538ddbd3a97b0a865b5eb5 ] LLVM's lld linker doesn't have a universal architecture support (e.g., it definitely doesn't work on s390x), so be safe and force lld for urandom_read and liburandom_read.so only on x86 architectures. This should fix s390x CI runs. Fixes: 3e6fe5ce4d48 ("libbpf: Fix internal USDT address translation logic f= or shared libraries") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20220617045512.1339795-1-andrii@kernel.org Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests= /bpf/Makefile index 19ad83d306e0..21be936dd1af 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -168,18 +168,25 @@ $(OUTPUT)/%:%.c $(call msg,BINARY,,$@) $(Q)$(LINK.c) $^ $(LDLIBS) -o $@ =20 +# LLVM's ld.lld doesn't support all the architectures, so use it only on x= 86 +ifeq ($(SRCARCH),x86) +LLD :=3D lld +else +LLD :=3D ld +endif + # Filter out -static for liburandom_read.so and its dependent targets so t= hat static builds # do not fail. Static builds leave urandom_read relying on system-wide sha= red libraries. $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c $(call msg,LIB,,$@) $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $^ $(LDLIBS) \ - -fuse-ld=3Dlld -Wl,-znoseparate-code -fPIC -shared -o $@ + -fuse-ld=3D$(LLD) -Wl,-znoseparate-code -fPIC -shared -o $@ =20 $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux.c $(OUTPUT)/libura= ndom_read.so $(call msg,BINARY,,$@) $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \ liburandom_read.so $(LDLIBS) \ - -fuse-ld=3Dlld -Wl,-znoseparate-code \ + -fuse-ld=3D$(LLD) -Wl,-znoseparate-code \ -Wl,-rpath=3D. -Wl,--build-id=3Dsha1 -o $@ =20 $(OUTPUT)/bpf_testmod.ko: $(VMLINUX_BTF) $(wildcard bpf_testmod/Makefile b= pf_testmod/*.[ch]) --=20 2.35.1