From patchwork Tue Jul 19 08:41:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 12922245 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 17924C433EF for ; Tue, 19 Jul 2022 08:41:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237002AbiGSIl4 (ORCPT ); Tue, 19 Jul 2022 04:41:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbiGSIlz (ORCPT ); Tue, 19 Jul 2022 04:41:55 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46628205C1; Tue, 19 Jul 2022 01:41:54 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id C8BE034A06; Tue, 19 Jul 2022 08:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1658220112; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4IwtKgVrBQfJjnt1jdw4py3dKEs3tHhhDUJgnRuAiI=; b=dbYienbZamQI5KxKNpQOngqwP+yH2Up281vDCGa4ya6dJE8M8mJF5/ePX1PePs57SatNzV v72wgTxehxZ6Ijsoa0XDGeVXAm6WEHlE4F+Nw2qJK7K7eCma36W88WkeUsMxTmNlExEboL eOmidB/DR2CAbuOsDoJcoUwnKVQ4bYE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1658220112; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4IwtKgVrBQfJjnt1jdw4py3dKEs3tHhhDUJgnRuAiI=; b=xbw/6FcBWjJgdDAkIa6WLOzenYEEyRAMQsYdap9tx63d4ypOvnl5kuj+uUMfub3dyIzTkI 1fx4wJoqIqXfDnCw== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 812192C141; Tue, 19 Jul 2022 08:41:52 +0000 (UTC) From: Jiri Slaby To: masahiroy@kernel.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Sedat Dilek , Michal Marek , Nick Desaulniers , "Signed-off-by : Martin Liska" Subject: [PATCH v2 1/2] kbuild: pass jobserver to cmd_ld_vmlinux.o Date: Tue, 19 Jul 2022 10:41:48 +0200 Message-Id: <20220719084149.29950-1-jslaby@suse.cz> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Until the link-vmlinux.sh split (cf. the commit below), the linker was run with jobserver set in MAKEFLAGS. After the split, the command in Makefile.vmlinux_o is not prefixed by "+" anymore, so this information is lost. Restore it as linkers working in parallel (esp. the LTO ones) make a use of it. In this case, it is gcc producing this warning otherwise: lto-wrapper: warning: jobserver is not available: ‘--jobserver-auth=’ is not present in ‘MAKEFLAGS’ Cc: Sedat Dilek Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers Cc: Signed-off-by: Martin Liska Fixes: 5d45950dfbb1 (kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o) Signed-off-by: Jiri Slaby --- Notes: [v2] only commit message updated scripts/Makefile.vmlinux_o | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index 84019814f33f..886db0659d9c 100644 --- a/scripts/Makefile.vmlinux_o +++ b/scripts/Makefile.vmlinux_o @@ -65,7 +65,7 @@ define rule_ld_vmlinux.o endef vmlinux.o: $(initcalls-lds) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) FORCE - $(call if_changed_rule,ld_vmlinux.o) + +$(call if_changed_rule,ld_vmlinux.o) targets += vmlinux.o From patchwork Tue Jul 19 08:41:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 12922246 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 527B8C43334 for ; Tue, 19 Jul 2022 08:41:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236994AbiGSIl5 (ORCPT ); Tue, 19 Jul 2022 04:41:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236993AbiGSIlz (ORCPT ); Tue, 19 Jul 2022 04:41:55 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67D4626113; Tue, 19 Jul 2022 01:41:54 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2407034A08; Tue, 19 Jul 2022 08:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1658220113; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UHhgnDp/HgaJaRlr8G3hSxYK+naf6eaZxyqXJNunF5E=; b=kC39Ol9R9JHw0JjgY+twMpxZCFtYfyaT7MQxbvmTh5/LM8cXPIB/UI1mq68PRHY9/sbqv3 LHcElqhyOCFpc9iC9X8mdPJooQ+Gf29lTuXoRvd97u/OQHfiE4a961ZtOwhRRlzMWms1LU /aRTYL74mmLD60fLtwctIBvVxbToQ94= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1658220113; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UHhgnDp/HgaJaRlr8G3hSxYK+naf6eaZxyqXJNunF5E=; b=kbevgYW4DplY+FsNkY2xMbeXANmfqEhQ7AZk5+ujVXxCGhx2UUs3iLpogkwAwqGhPuaz5g qQPN6P3hR1zaf5DA== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id D5D432C142; Tue, 19 Jul 2022 08:41:52 +0000 (UTC) From: Jiri Slaby To: masahiroy@kernel.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Liska , Sedat Dilek , Michal Marek , Nick Desaulniers , Jiri Slaby Subject: [PATCH v2 2/2] kbuild: lto: preserve MAKEFLAGS for module linking Date: Tue, 19 Jul 2022 10:41:49 +0200 Message-Id: <20220719084149.29950-2-jslaby@suse.cz> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719084149.29950-1-jslaby@suse.cz> References: <20220719084149.29950-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Martin Liska Prefix command in makefile run in order to preserve access to jobserver. This is needed for gcc at least. Fixes this warning: lto-wrapper: warning: jobserver is not available: ‘--jobserver-auth=’ is not present in ‘MAKEFLAGS’ Cc: Sedat Dilek Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers Fixes: 5d45950dfbb1 (kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o) Signed-off-by: Martin Liska Signed-off-by: Jiri Slaby --- Notes: [v2] this is new in v2 scripts/Makefile.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index bb63374fb055..493f3c4e8461 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -247,8 +247,8 @@ endef # Built-in and composite module parts $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE - $(call if_changed_rule,cc_o_c) - $(call cmd,force_checksrc) + +$(call if_changed_rule,cc_o_c) + +$(call cmd,force_checksrc) # To make this rule robust against "Argument list too long" error, # ensure to add $(obj)/ prefix by a shell command. @@ -457,7 +457,7 @@ endef $(multi-obj-m): objtool-enabled := $(delay-objtool) $(multi-obj-m): part-of-module := y $(multi-obj-m): %.o: %.mod FORCE - $(call if_changed_rule,ld_multi_m) + +$(call if_changed_rule,ld_multi_m) $(call multi_depend, $(multi-obj-m), .o, -objs -y -m) targets := $(filter-out $(PHONY), $(targets))