Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp589900rwb; Fri, 13 Jan 2023 01:29:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXv/EtptrMzf+w3X/Hzw9sd03Fos0dFjx1y9SVGP52k/D1TxJn/EsTcqz9AwIdY5JJs9sbNN X-Received: by 2002:a17:906:8c3:b0:84d:2078:1fd6 with SMTP id o3-20020a17090608c300b0084d20781fd6mr2470587eje.34.1673602192582; Fri, 13 Jan 2023 01:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673602192; cv=none; d=google.com; s=arc-20160816; b=pAEYAY3INxD2mj0N6irY2qFil2XRzJ5X5KNF/ylG1xv4/YuD0HxoUNqKVaKRabzzHT 2zl7iC4NNHuE6My8yOSloxnu+hLet/dL5Meu5+GC/3Aq9Wk7jm0/6ZiG9zdO659/5JOL ab8m2EiV6fUUYDul38+vfwJ9RuGz1FbkMMs3cPP1vWX1d76T+cpRB8G6xaQgggkSBg6b 2HsxxAj2TNmT7zMJjaMzgLQZRHmK0abwFAP/aSOGch0GaIJDbw317WeM8hpBvBkJJRQV N3C1Ld8HnJsEc3ImFp5vDrXR5RJoKCY0EItsTcAaqBZrcCeYQy/tuRMppLvHKOAs74AK H3QA== 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=RNKQ8lij9GJnJFwIqDvh0GiiDKlQ9djpTpCO2RWvjlI=; b=S69iDtZBpProfYX19HNyxXPBk+q7T5pTbb4hp8KAvhlW98CvUgokTCUOOm1C+MBsE9 YvrSi6SUX9Ecln4mZVV+l/PTvIaF8LYxLJCO27dDx+9ksasgzfYjGYKhu668YXpp1B96 onyuAWWBoWT8kMEreTWGn5KQU68T0F2UIKfg+S8Jskunybo4mHdTo5qgnBQG5V+cdPkC qNu9qX9HuzymVx9mB9Bz3azK/zIv+EuiHKaMtFOObmrXBGAenqhZoeTpFtLvGnUAqsni ZW1XTox0g+pxasTjzN6Wf4bxvL/9AQqErO37BUmwO3PJC+is7L8oqeLXpOEonooItLr/ t7cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="S/BtqWDO"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020aa7df12000000b00499b2c0c921si14812784edy.163.2023.01.13.01.29.40; Fri, 13 Jan 2023 01:29:52 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b="S/BtqWDO"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240331AbjAMJMh (ORCPT + 51 others); Fri, 13 Jan 2023 04:12:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240194AbjAMJMI (ORCPT ); Fri, 13 Jan 2023 04:12:08 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C9297665 for ; Fri, 13 Jan 2023 01:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673600990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RNKQ8lij9GJnJFwIqDvh0GiiDKlQ9djpTpCO2RWvjlI=; b=S/BtqWDOxxfubyXSZb0OPCpZgSjzTf8qZ7QUonW7LogLRpCav4stL91DxqL/zKNq2H3t7z zixc0i+VHUesauWb54ARn0UFDP4JJxWIbRdaHS/ZkuChixhoxSwrYx7aVXepsb3EFWHioy tb+tDu9sX1siU+9qXQ9GS9QXcTogXKQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-623-0FU3mqukMnCQOpQBZwO4bQ-1; Fri, 13 Jan 2023 04:09:45 -0500 X-MC-Unique: 0FU3mqukMnCQOpQBZwO4bQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B322F1C051A8; Fri, 13 Jan 2023 09:09:44 +0000 (UTC) Received: from plouf.redhat.com (ovpn-193-50.brq.redhat.com [10.40.193.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 836801121314; Fri, 13 Jan 2023 09:09:42 +0000 (UTC) From: Benjamin Tissoires To: Greg KH , Jiri Kosina , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Dmitry Torokhov Cc: Tero Kristo , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Benjamin Tissoires Subject: [PATCH HID for-next v2 2/9] selftests: hid: allow to compile hid_bpf with LLVM Date: Fri, 13 Jan 2023 10:09:28 +0100 Message-Id: <20230113090935.1763477-3-benjamin.tissoires@redhat.com> In-Reply-To: <20230113090935.1763477-1-benjamin.tissoires@redhat.com> References: <20230113090935.1763477-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 clang doesn't like to compile a source to the final binary directly: clang-14: error: cannot specify -o when generating multiple output files So split the final rule in 2, and ensure we compile all dependencies before. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests/hid/Makefile index f6fc5cfff770..83e8f87d643a 100644 --- a/tools/testing/selftests/hid/Makefile +++ b/tools/testing/selftests/hid/Makefile @@ -91,10 +91,6 @@ $(MAKE_DIRS): $(call msg,MKDIR,,$@) $(Q)mkdir -p $@ -$(OUTPUT)/%.o: %.c - $(call msg,CC,,$@) - $(Q)$(CC) $(CFLAGS) -c $(filter %.c,$^) $(LDLIBS) -o $@ - # LLVM's ld.lld doesn't support all the architectures, so use it only on x86 ifeq ($(SRCARCH),x86) LLD := lld @@ -223,7 +219,11 @@ $(BPF_SKELS): %.skel.h: %.bpf.o $(BPFTOOL) | $(OUTPUT) $(Q)$(BPFTOOL) gen object $(<:.o=.linked1.o) $< $(Q)$(BPFTOOL) gen skeleton $(<:.o=.linked1.o) name $(notdir $(<:.bpf.o=)) > $@ -$(OUTPUT)/%:%.c $(BPF_SKELS) $(KHDR_INCLUDES)/linux/hid.h +$(OUTPUT)/%.o: %.c $(BPF_SKELS) $(KHDR_INCLUDES)/linux/hid.h + $(call msg,CC,,$@) + $(Q)$(CC) $(CFLAGS) -c $(filter %.c,$^) $(LDLIBS) -o $@ + +$(OUTPUT)/%: $(OUTPUT)/%.o $(call msg,BINARY,,$@) $(Q)$(LINK.c) $^ $(LDLIBS) -o $@ -- 2.38.1