Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3823155ybi; Mon, 29 Jul 2019 13:19:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQtoqN4LR/68Wb+4hB84tMcbOq5X9Z7dGs3mbCukT30C+aDhObq7uthMJYHpYF7lppzFuy X-Received: by 2002:a17:902:8689:: with SMTP id g9mr104245077plo.252.1564431551867; Mon, 29 Jul 2019 13:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431551; cv=none; d=google.com; s=arc-20160816; b=hqmTLr9dHZPPSJ6U8Ds4vPItKZpoeeRaiuN2BsG5LkFgHksGSAtbRp5kfSunid/AGb R9x8OMoDv2e/dMkqa1bg+DAbynyQO27NToygv2PO5PUzGePYvgfAySCuYGtovTN1jmMN 0ABe62ard0Lh41mCJktd7d2rwDj3KPlySes9wpgkrHE6vZQzl0cfCAE3xfk869vgqXU9 MPZ0iLPiAC6XQ1kL+QMe7/wlE2zg/z/3QVfyfC127rSwVIUPfZG6jzuUvGbTQYa2dRGS q+1dyw2lYEHCgXjxnfg8W/I7DsvAelZWcihqgVrbWid/qjbrk0vEpiq+hjZLdXtjJs5U cuLQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=01xR7j/3ijtE/jcVLfvOaC9w3UvYSDJdCtnY9W2Jvzo=; b=D+YMHSYIgASPmOmGV+j18hCT5DNcXqv8GSAwBfF4o8vJTcXGKTSh1U7NKPpIimcuSu 0pSCkmpLQu7HBgmI2GwJo88DWLUlW+sLW1iupIW18mMlWMGJcXs75LAsEU/LK+vTZFkA 7QBnUXDbD+vZtwq4FKAEXsfxjWOAMMpOAvBT4mQvF9kYr/XMeBWeReA8YHZyIrKxyZOy Qz+jTSvTNyK/5A82Qml1t+7uP7nvvmF8fB4j1x7IzTaHwXYNLbYsrkctLQUrEp9PF8DP 0fmXcKjD+yetCeWk0jnduobCf8n8ImhtoPr0dqkBu/KGLlxoBvN36RcnCznyj9ze3pyN C6Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EezLEkHF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si23011350pgn.149.2019.07.29.13.18.56; Mon, 29 Jul 2019 13:19:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EezLEkHF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729461AbfG2TYN (ORCPT + 99 others); Mon, 29 Jul 2019 15:24:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:36330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729438AbfG2TYH (ORCPT ); Mon, 29 Jul 2019 15:24:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1D3F21655; Mon, 29 Jul 2019 19:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428246; bh=VFAIIZL5hvOD4KbeAdybXfZWSYRbtUQGaVq/WFD0yK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EezLEkHFT47MYbqAphKaa4RlEs2P17kJMEaKL8kY2U9/baaHhl6jxS9qX7aVA2f8q d3iw0BvYQ0hzg46KoG+87+caqRVC2AGxAX+dzw4TfrmqvsuffXKEpQFQo/OM+iJ7x9 WFoZYM7T/q1qnZ52tLFCLZwPtn9mZaqBCkhm+YtU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jo-Philipp Wich , =?UTF-8?q?Petr=20=C5=A0tetiar?= , Kevin Darbyshire-Bryant , Paul Burton , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH 4.14 002/293] MIPS: fix build on non-linux hosts Date: Mon, 29 Jul 2019 21:18:13 +0200 Message-Id: <20190729190820.539632976@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 1196364f21ffe5d1e6d83cafd6a2edb89404a3ae ] calc_vmlinuz_load_addr.c requires SZ_64K to be defined for alignment purposes. It included "../../../../include/linux/sizes.h" to define that size, however "sizes.h" tries to include which assumes linux system headers. These may not exist eg. the following error was encountered when building Linux for OpenWrt under macOS: In file included from arch/mips/boot/compressed/calc_vmlinuz_load_addr.c:16: arch/mips/boot/compressed/../../../../include/linux/sizes.h:11:10: fatal error: 'linux/const.h' file not found ^~~~~~~~~~ Change makefile to force building on local linux headers instead of system headers. Also change eye-watering relative reference in include file spec. Thanks to Jo-Philip Wich & Petr Štetiar for assistance in tracking this down & fixing. Suggested-by: Jo-Philipp Wich Signed-off-by: Petr Štetiar Signed-off-by: Kevin Darbyshire-Bryant Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Signed-off-by: Sasha Levin --- arch/mips/boot/compressed/Makefile | 2 ++ arch/mips/boot/compressed/calc_vmlinuz_load_addr.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index adce180f3ee4..331b9e0a8072 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -75,6 +75,8 @@ OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE $(call if_changed,objcopy) +HOSTCFLAGS_calc_vmlinuz_load_addr.o += $(LINUXINCLUDE) + # Calculate the load address of the compressed kernel image hostprogs-y := calc_vmlinuz_load_addr diff --git a/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c b/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c index 542c3ede9722..d14f75ec8273 100644 --- a/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c +++ b/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c @@ -13,7 +13,7 @@ #include #include #include -#include "../../../../include/linux/sizes.h" +#include int main(int argc, char *argv[]) { -- 2.20.1