Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091123rwb; Mon, 15 Aug 2022 17:54:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR4bNGb2hA8rm6jfg2z4q4dKXinY31UJQ979g8wj6z3m0fgcNBfHTbUJLyrI6W7pJ7PNcR3J X-Received: by 2002:a05:6402:292:b0:43c:ee5e:a5da with SMTP id l18-20020a056402029200b0043cee5ea5damr16696286edv.181.1660611282141; Mon, 15 Aug 2022 17:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611282; cv=none; d=google.com; s=arc-20160816; b=GR9T3oamxHhbRdThCK/j3tce7BIKaBVLvgbrKSnGuKy9u2zEOYdksIJmm0RCw3aNlX p50ldt4bM6zo7T9J+1KcU4Hbq0j9mG5TSJyUW6IW/f6bY7ERCBLKS8lh8cbe8KljpH0e ce0JBeOrlzxIgb6a6nq3Js0dUg5XwQ2KcLbp4R2l/h8PGu43mjNIrVq0RbFpP9r+5FUp u35UmJGimep2kS7eQjwfqnXpuYT+lFbWK1vQfGre2nXVvFskOkJyxeZeuFmc8uaunz3S NhT36DKoE92I8jsNKXPH6cRy8YUgYoBepq3bra9lgLOJbcyfnADsjz76AL7k8lVwgeN5 tK6g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q2GUdz3H0yCy+It+3FurkLSDwQx7yCaQzgCtnSiWJvk=; b=VvP710d6TJzQ6i1E8eM8/4OkJaPFn5i8f89PkAJ/Esw/W4Z0QLog7I/9jg556LsDCg +zKwQ41aW7839iSDHXiImnkiHyA3TEgg+eyqAodTOUEuWnVOBPEqdxGgVvQeNHHgOWOL ZL8zpRlofMy3IJkpQZBarWy3UAHKFJLu4aTm7cIHea7hGxxg4jhiKJEFt2j+vWEaqwoW 2WXxppHZBXRUMzvsEUzA99R7bUXh9dsy1fTy+KpiKN1nrKwFMZUSwpIf9P5N609yjwGd cjU6YPMfjqYW2hdW/KNOU0e2HJbOqCSnrkfkdNFKokL1N5+pdOUhyoqkk30qnU1mVMer SKNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Fyu9D/+Y"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a1709065d0300b007317274bb0dsi9530997ejt.979.2022.08.15.17.54.16; Mon, 15 Aug 2022 17:54:42 -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=@linuxfoundation.org header.s=korg header.b="Fyu9D/+Y"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345613AbiHOXdd (ORCPT + 99 others); Mon, 15 Aug 2022 19:33:33 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 for 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 $@ +# LLVM's ld.lld doesn't support all the architectures, so use it only on x86 +ifeq ($(SRCARCH),x86) +LLD := lld +else +LLD := ld +endif + # Filter out -static for liburandom_read.so and its dependent targets so that static builds # 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 $(call msg,LIB,,$@) $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $^ $(LDLIBS) \ - -fuse-ld=lld -Wl,-znoseparate-code -fPIC -shared -o $@ + -fuse-ld=$(LLD) -Wl,-znoseparate-code -fPIC -shared -o $@ $(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,$^) \ liburandom_read.so $(LDLIBS) \ - -fuse-ld=lld -Wl,-znoseparate-code \ + -fuse-ld=$(LLD) -Wl,-znoseparate-code \ -Wl,-rpath=. -Wl,--build-id=sha1 -o $@ $(OUTPUT)/bpf_testmod.ko: $(VMLINUX_BTF) $(wildcard bpf_testmod/Makefile bpf_testmod/*.[ch]) -- 2.35.1