Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp152089ybh; Tue, 14 Jul 2020 21:14:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5Wv3Ai1fGtVt9xD0mO0ke7e+qRP2YnK/8IQCTXXVq5DJd1kEAMILf0baKOK74aDw3vMiO X-Received: by 2002:a17:906:f53:: with SMTP id h19mr7223247ejj.491.1594786442411; Tue, 14 Jul 2020 21:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594786442; cv=none; d=google.com; s=arc-20160816; b=vvqC21gcFMqNb8xsIUJKkjUsxIiaH7m/hvsTuywXiKBQAPwlPmVqjJMbWEgMjMuUGL XTnTQ33Riv+VT39yFQ9FIHlTl0Z6Vn3uvwfaqp28/xAlP9wOAKWaXnvPbKV2zEbIcLHm 7sMMU6NEdbst+ty9gGTw1fNjDjB2HcEw+OJu+qOPb4T1dPNfSpFEh7yMsMq+KakYrCKz zTZ+SHN1nefNij8KylfVoeUdOWGwrHkcqxObyneNOmJgsFcgmnpaEthzTPWOLG3uamK/ BUlZoA+V6dVFLTKFJ2B7ZvUoVGz3rJNTjCn9SGkm7knKhJIJCztOzf3AiiUA2+8cTA8I Migg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=x02PSZ/ln73kH7sNoYBWCtnZv6JMMSwwMLMAhMgzHFw=; b=s0LxxuPNiZKVfGpN9xjOHAv4lBxz95vLuAjXvIAWvufxpo8Ja44gtwbh+73hjG+o+X MEF4lmIaIejSdusery46hukkT9DWcLLb2cE+KPAkdWZt1fgJvCe2ym+AQU4wQ1uI+uyb cQu3mdVI/bEZUsG3g71pbQ3NKbnGZ97awonZwFxZiFvrQWDPgud1DmANUdk4ei472Efl YHlIwQ7xKjzOFBwleLdDulVmm7KLk9G/Y1oVZo3VhGen5PUG7TOmvz/p7y+I4rQ2fNN6 rGXrFG8mE64iA2yaLhVx+/y9wIxT3MkHKGboLtlvqX8SD3YpQovanwQ6NOca5+pfeW/V aBKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si580997edq.133.2020.07.14.21.13.39; Tue, 14 Jul 2020 21:14:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728471AbgGOD0f (ORCPT + 99 others); Tue, 14 Jul 2020 23:26:35 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:44981 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbgGOD0e (ORCPT ); Tue, 14 Jul 2020 23:26:34 -0400 Received: by mail-qk1-f194.google.com with SMTP id b4so542243qkn.11; Tue, 14 Jul 2020 20:26:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=x02PSZ/ln73kH7sNoYBWCtnZv6JMMSwwMLMAhMgzHFw=; b=oB5fTh1Ruv4+IXDIiB/4KddIc+Bw45HUoNf3HKjt9ZHX4nLhes40WA/paDwK8P27At Bl+H4zzAv6N1TQJZwkvFRSUnkke0my5Qyjag7bG1UXuMgsn2YmLzC/0GJEqERlTqXw4v TGNQNYV4dJQKXr3pgbLYtNVCL07K1W0Ua+d2CwhDKiWzk1WhozKImARepvAfh/S9xhDI CJB4W1Zt58M2RHI8lCG+B1R2satc0Fl7fE+QADJh3fZ4OrD4FJeDmJS0omB1yJGhcgtd Keh+VMr4wcerOXPeHNBxWdiDtMPd0MWEgQebte0kytVQDDM0OMN1KjozOLtky95ZWRPV Edwg== X-Gm-Message-State: AOAM5331ssa5Q3lZ7AIyeNVTw513I4e0PVdqnhGMtrJwvwig3BrkQ07m CDNZTNDEiY3ucSme4E5H+QE= X-Received: by 2002:a37:27c2:: with SMTP id n185mr7301100qkn.459.1594783593197; Tue, 14 Jul 2020 20:26:33 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id f15sm838709qka.120.2020.07.14.20.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 20:26:32 -0700 (PDT) From: Arvind Sankar To: x86@kernel.org, Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] arch/x86/boot: Don't add the EFI stub to targets Date: Tue, 14 Jul 2020 23:26:31 -0400 Message-Id: <20200715032631.1562882-1-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vmlinux-objs-y is added to targets, which currently means that the EFI stub gets added to the targets as well. It shouldn't be added since it is built elsewhere. This confuses Makefile.build which interprets the EFI stub as a target $(obj)/$(objtree)/drivers/firmware/efi/libstub/lib.a and will create drivers/firmware/efi/libstub/ underneath arch/x86/boot/compressed, to hold this supposed target, if building out-of-tree. [0] Fix this by pulling the stub out of vmlinux-objs-y into efi-obj-y. [0] See scripts/Makefile.build near the end: # Create directories for object files if they do not exist Signed-off-by: Arvind Sankar --- arch/x86/boot/compressed/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 7619742f91c9..5a828fde7a42 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -90,8 +90,8 @@ endif vmlinux-objs-$(CONFIG_ACPI) += $(obj)/acpi.o -vmlinux-objs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o +efi-obj-$(CONFIG_EFI_STUB) = $(objtree)/drivers/firmware/efi/libstub/lib.a # The compressed kernel is built with -fPIC/-fPIE so that a boot loader # can place it anywhere in memory and it will still run. However, since @@ -115,7 +115,7 @@ endef quiet_cmd_check-and-link-vmlinux = LD $@ cmd_check-and-link-vmlinux = $(cmd_check_data_rel); $(cmd_ld) -$(obj)/vmlinux: $(vmlinux-objs-y) FORCE +$(obj)/vmlinux: $(vmlinux-objs-y) $(efi-obj-y) FORCE $(call if_changed,check-and-link-vmlinux) OBJCOPYFLAGS_vmlinux.bin := -R .comment -S -- 2.26.2