From patchwork Sun Nov 3 15:12:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1188569 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kTNsSUgJ"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 475fZQ5xDYz9sP3 for ; Mon, 4 Nov 2019 02:13:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 30E888AB9F; Sun, 3 Nov 2019 15:13:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lvk6sRWNnDVz; Sun, 3 Nov 2019 15:13:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 468FD8A98D; Sun, 3 Nov 2019 15:13:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3AA4A1BF962 for ; Sun, 3 Nov 2019 15:13:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1B81C21509 for ; Sun, 3 Nov 2019 15:13:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6-UAwbX83IpM for ; Sun, 3 Nov 2019 15:13:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by silver.osuosl.org (Postfix) with ESMTPS id 3827B214E6 for ; Sun, 3 Nov 2019 15:13:09 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id y39so20096064qty.0 for ; Sun, 03 Nov 2019 07:13:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=msyHzAqYImn4MscDFWUA7ELXu2kRcOEcROcp8Y+J/LE=; b=kTNsSUgJSRS7wal1n22wDKf/5c2oR65067YcarpHu5GNW37IdDD2WlBoGtquHWTEyX Yv8Ud0AL5D9xrOdIAPVNbDmSYdPZ0TuULK5ZM3w6kP5GiKqCk03BzorXJhm1iSkS/hEb efMdHuuQeB3aGZzIouB40uDYVelBeJcSJDLxG+mrWg9+gLCYhoZIISfOwK8m1yOPSK1D ZsI7gQ8o+Hk4VJPDflNiExfBHxGmIeh56M7/UNbDVM4tH36gdXOfhFp/AC/3VLsiBaC8 bWKuBOQTNHuA7mOzrHjGOUqXdkB24sYRCnxcijaejcI8MPrWm/Q8D7+z9YS+Osut2fwB 0J8A== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=msyHzAqYImn4MscDFWUA7ELXu2kRcOEcROcp8Y+J/LE=; b=FIYi4H+MYNxs63cMvikCSUIjkEeK8UjiAmp4LFJ0fln2lwMRMEKhLhqF5BFW1RXywO TrJ7wlNnUIpLBWtjkGDjMTf8u8c57vmV6DsMKwyyju9AKwa0ACdh2tmiO+SUs7n+lt2w nCVxpQPJucx26RpRAt1HKPmnDApp+PDEXiI/KT8ClF7Jb2KvDjtX36ZCQVbC2vgAF68E 1X2RQKrRx5DoFe6F7AZUxPq+U/sHD2qBWKPaBNltIMtDNfaRO/n6cqX6MA1A3EePKkjO 0RzKxJQeyaSoqryxEgxx4ETeerju/c8H1UbslNvn5kowDNYLN3Zyn7/dWDyte0TgYqAb FHYg== X-Gm-Message-State: APjAAAUWyLrKLA7vGxRg+JLoDCrURXs7se0H474JMyXF32nY9vxLbySn 6yKk0ymNpIH/OTT+CzTaiUUl30lFbQk= X-Google-Smtp-Source: APXvYqz879MDSYWehCfiPpH/0F4pnqkdrObkakenZog7yOQUvRMLKnHO/9FGEjd5/VDumY7DcBSOdQ== X-Received: by 2002:aed:33c2:: with SMTP id v60mr5421822qtd.168.1572793987961; Sun, 03 Nov 2019 07:13:07 -0800 (PST) Received: from casantos.casantos.org (179.187.68.169.dynamic.adsl.gvt.net.br. [179.187.68.169]) by smtp.gmail.com with ESMTPSA id i41sm9053426qti.42.2019.11.03.07.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2019 07:13:07 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 3 Nov 2019 12:12:57 -0300 Message-Id: <20191103151258.11047-2-unixmania@gmail.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20191103151258.11047-1-unixmania@gmail.com> References: <20191103151258.11047-1-unixmania@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH RFC 1/2] package/dtc: install host libfdt headers in a subdirectory X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Installing the libfdt headers at $(HOST_DIR)/include interferes with the build of the kernel, as in beaglebone: 2019-11-01T22:23:16 /usr/bin/make -f ./scripts/Makefile.build obj=scripts 2019-11-01T22:23:16 /usr/bin/make -f ./scripts/Makefile.build obj=scripts/dtc need-builtin= 2019-11-01T22:23:16 (cat /dev/null; ) > scripts/dtc/modules.order 2019-11-01T22:23:16 /usr/bin/gcc -O2 -I/work/beaglebone/host/include -L/work/beaglebone/host/lib -Wl,-rpath,/work/beaglebone/host/lib -Wp,-MD,scripts/dtc/libfdt/.fdt_ro.o.d -Wall -Wmissing-prototypes -Wstrict-p> 2019-11-01T22:23:16 scripts/dtc/libfdt/fdt_ro.c:92:10: error: redefinition of ‘fdt_get_max_phandle’ 2019-11-01T22:23:16 uint32_t fdt_get_max_phandle(const void *fdt) 2019-11-01T22:23:16 ^~~~~~~~~~~~~~~~~~~ 2019-11-01T22:23:16 In file included from scripts/dtc/libfdt/fdt_ro.c:54: 2019-11-01T22:23:16 /work/beaglebone/host/include/libfdt.h:384:24: note: previous definition of ‘fdt_get_max_phandle’ was here 2019-11-01T22:23:16 static inline uint32_t fdt_get_max_phandle(const void *fdt) 2019-11-01T22:23:16 ^~~~~~~~~~~~~~~~~~~ 2019-11-01T22:23:16 make[4]: *** [scripts/Makefile.host:107: scripts/dtc/libfdt/fdt_ro.o] Error 1 2019-11-01T22:23:16 make[3]: *** [scripts/Makefile.build:544: scripts/dtc] Error 2 2019-11-01T22:23:16 make[2]: *** [Makefile:1066: scripts] Error 2 2019-11-01T22:23:16 make[1]: *** [package/pkg-generic.mk:241: /work/beaglebone/build/linux-4dae378bbe721277b08699d1d88ffae12acc9b09/.stamp_built] Error 2 We cannot simply disable dtc support and patching the kernel makefiles is risky and error-prone, so let's just install the host-dtc headers at $(HOST_DIR)/include/libfdt to circumvent the problem. Packages that depend on those headers (e.g. host-qemu) must be updated to user the correct path but this is small change. Signed-off-by: Carlos Santos --- package/dtc/dtc.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk index 7fde0dc968..5265640f65 100644 --- a/package/dtc/dtc.mk +++ b/package/dtc/dtc.mk @@ -20,6 +20,7 @@ DTC_MAKE_OPTS = \ HOST_DTC_MAKE_OPTS = \ PREFIX=$(HOST_DIR) \ + INCLUDEDIR=$(HOST_DIR)/include/libfdt \ NO_PYTHON=1 \ NO_VALGRIND=1 \ NO_YAML=1