From patchwork Thu Aug 30 20:30:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 964174 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.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="aipFcqvm"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 421Yzf6DsVz9s1x for ; Fri, 31 Aug 2018 06:31:10 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 46AA522E3F; Thu, 30 Aug 2018 20:31:06 +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 AAQnMf52xVTb; Thu, 30 Aug 2018 20:31:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 4F9C22107C; Thu, 30 Aug 2018 20:31:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C0E291C16AF for ; Thu, 30 Aug 2018 20:31:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BD88286774 for ; Thu, 30 Aug 2018 20:31:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e5ZrgYg50V-z for ; Thu, 30 Aug 2018 20:31:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id D31288411D for ; Thu, 30 Aug 2018 20:31:01 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id w11-v6so9219728wrc.5 for ; Thu, 30 Aug 2018 13:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GJ2lIF6GzZpp+vVU0NSSoMEb21qCTUJVfVdW23D56OI=; b=aipFcqvmjqGTkCV5GKe9uozq1MKj5voN2MHl+AaIo2zTU+Je+kIAxF1v3hpcn0SVvY oYbShv9t1DAah2KCHEWZ0LNpdRK8pPGn7401VGn309fc6yl1MLSZR/Rm7cmLq+N4TMMA iEQ3Hhj1MbyoLHO38AlaRYkBPV1uH99J0DGWgBTMrfEmwH/PwfC0/526iIa19z87styi K03EfU41fBDo1H57IdeErDDHm0zw+LkhYS8eHxinETKBdr/6RPYDwDmtpA36r9MCe52p M1b0FHPd7iHqJrzFXYd/8URH+Wpdtn3QD0xK6l6+TGl3xpyxRf2Z2Czz91O929DLxPTA Zmvg== 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; bh=GJ2lIF6GzZpp+vVU0NSSoMEb21qCTUJVfVdW23D56OI=; b=QKmrRDUTo4eaRecxyo2nXomxqF6BdS/OkNWyvkjUi04ucFPliHY9LdOKd2Ir2wk8eL buAas3E30LzpnuNkv9E0OW7x5cZvIavwTWil2pCuyLH1zQ1La/YFtnnDzGdJm7Zw2GU1 +nwdAa3l4NNFhMBIF99zsisx4Oq+9jHf1SViCpoSWKrLTgl4D/qcpD3SViTTRqovMznL YaHZ5B99wz6xroI/PiBs87g99gmFPgdAJSIb8LsdOHkdqJ4l3a7d4lMCc4/D23a3QDK9 Si2bbd9BiG3CcBgIFt/QBUR/9iTs5zyg9OoG1lxTgVNQsrUWWwBxlvd4JdP1Tinf+jSX GXXg== X-Gm-Message-State: APzg51ByO7eSW9AGhatz8oAn2wkgpuWmHa4a9Q0ShALmHE+qRUujU2ER CfmKvu4xUJLfMFOrf3NSGzWXmm7d X-Google-Smtp-Source: ANB0VdbrAZsU+PnVb4y3kmGgIROJt+8N8bW52IlRJPQyQXZ5ynFvdejeWrA0N0rTSbDkeye0laeh/g== X-Received: by 2002:adf:f687:: with SMTP id v7-v6mr8699036wrp.201.1535661059547; Thu, 30 Aug 2018 13:30:59 -0700 (PDT) Received: from adeos.home (2a01cb000577e4007362e7db4e8430b1.ipv6.abo.wanadoo.fr. [2a01:cb00:577:e400:7362:e7db:4e84:30b1]) by smtp.gmail.com with ESMTPSA id q135-v6sm4836222wmd.4.2018.08.30.13.30.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Aug 2018 13:30:58 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Thu, 30 Aug 2018 22:30:53 +0200 Message-Id: <20180830203054.7373-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.14.4 Subject: [Buildroot] [for-next: 1/2] package/make: add host variant X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add host variant for make package since glibc 2.28 now require GNU Make >= 4.0 [1]. We have to ceate gnumake and gmake symlinks to make generated by Buildroot for the host. Otherwise the one provided by the host system can be used instead. The glibc build system is looking for gnumake and gmake before make. [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html Signed-off-by: Romain Naour Cc: Baruch Siach Cc: Thomas Petazzoni --- package/make/make.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/make/make.mk b/package/make/make.mk index 01cd2eaa18..790391c76e 100644 --- a/package/make/make.mk +++ b/package/make/make.mk @@ -20,4 +20,18 @@ ifeq ($(BR2_STATIC_LIBS),y) MAKE_CONF_OPTS += --disable-load endif +HOST_MAKE_DEPENDENCIES = host-pkgconf +HOST_MAKE_CONF_OPTS = --without-guile + +# Some packages, like glibc, are looking for gnumake or gmake before +# make program. +# Create these symlink to use make binary generated by Buildroot for +# the host. +define HOST_MAKE_INSTALL_GNUMAKE + ln -fs make $(HOST_DIR)/bin/gnumake + ln -fs make $(HOST_DIR)/bin/gmake +endef +HOST_MAKE_POST_INSTALL_HOOKS += HOST_MAKE_INSTALL_GNUMAKE + $(eval $(autotools-package)) +$(eval $(host-autotools-package)) From patchwork Thu Aug 30 20:30:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 964173 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.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="Kgq1zIBd"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 421Yzd6fCdz9rvt for ; Fri, 31 Aug 2018 06:31:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6B5BA85D3A; Thu, 30 Aug 2018 20:31:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id leK2aJ5IxRgj; Thu, 30 Aug 2018 20:31:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 09B5185B0C; Thu, 30 Aug 2018 20:31:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 1AA1B1C16AF for ; Thu, 30 Aug 2018 20:31:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 182808763F for ; Thu, 30 Aug 2018 20:31:03 +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 SBEgC-b4TMuS for ; Thu, 30 Aug 2018 20:31:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1D621875C7 for ; Thu, 30 Aug 2018 20:31:02 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id 20-v6so9204756wrb.12 for ; Thu, 30 Aug 2018 13:31:02 -0700 (PDT) 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; bh=fyHuTdUbbLECmdxb1pqGFrdyTHuPAwpELBJ42DB/Kfw=; b=Kgq1zIBdbYKTJk3CySuuAQooIs8+qokgGZzxZFCU0Da997/njbhtALaFX6jBKvXcK1 uTKxZ6aW+flJtAvYf5Y/yWiw4AYyFfjb7XDq87OnddA4u3Vuh15YasrO12qW7vx9NW7b CDom9JdwtAq9uXfZZHrxWfYQO8DTY7mkQIRDU2dwQ+NaUALMvIRJPfV6pA4pqQ1wMIWS xNb1Y8gOKb6m1xw9m1gVuJtYNpMp4XleIOObt/5Ky4gsN8aF+7IcS5o9cRhS8tKt0NNa yfppFVIwhKUVl4HMjPHwMAbJE106LiiB4JP1sjnicOxPW81GR7qbLmK10Qoi7U9SJQ3P ND+A== 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; bh=fyHuTdUbbLECmdxb1pqGFrdyTHuPAwpELBJ42DB/Kfw=; b=AeoIBn9T0v2U1C5ZbLaOHRQP4eMl17HdzlHQsWaG+HPxGUATp7KqIoUuQGH+/0jorA b/EdV6yXjR18pkqyX2QXR61ZCA4sgH5eU9QEWHGnDGrp4YCfzFL8C52OIl3YWvwVkZfl beB6bO61IpdIeSlf0FCe7+IssnlaKv/GwDcbouohioWScA4hqe2XFmHGqvoQ/7AUU8P0 BfVsN0j20KIJz33IQl8jHkDIUtYZLwVBSLtfeS9vbMoxXwW5OmyOhzNUmlZL6MLOx5zx dVQ9Vw3o/9v5BK0Nyc+sXwAmsMNef/ysLl9vzcPhzBnf+AZKEIty32yHmJKKRtPH2Ycm ar3A== X-Gm-Message-State: APzg51AbffONnDnG9JQVxLkg8Jz9WqNf/o6pula5gQu/a20GDQIvPito rhTdqLjYtW4NJaq1Kw9wEh0ytbWT X-Google-Smtp-Source: ANB0VdaHu/yPkNU+Dk3oRJ3abFiaE5hjg6EHMoWt9zoa49t40nBDCEdl+ciOcldFbQGYlb/sXVflsA== X-Received: by 2002:adf:e910:: with SMTP id f16-v6mr8637285wrm.126.1535661060286; Thu, 30 Aug 2018 13:31:00 -0700 (PDT) Received: from adeos.home (2a01cb000577e4007362e7db4e8430b1.ipv6.abo.wanadoo.fr. [2a01:cb00:577:e400:7362:e7db:4e84:30b1]) by smtp.gmail.com with ESMTPSA id q135-v6sm4836222wmd.4.2018.08.30.13.30.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Aug 2018 13:30:59 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Thu, 30 Aug 2018 22:30:54 +0200 Message-Id: <20180830203054.7373-2-romain.naour@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180830203054.7373-1-romain.naour@gmail.com> References: <20180830203054.7373-1-romain.naour@gmail.com> Subject: [Buildroot] [for-next: 2/2] dependencies: host-make version check X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The host make program is already checked by dependencies.sh but we want to check the version number even if Buildroot is able to use GNU make >= 3.81 but some packages may require a more recent version. For example, since version 2.28 [1], glibc requires GNU Make >= 4.0. [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html Fixes: http://autobuild.buildroot.net/results/576/5760ea2635d9aecc9c789494a8b2cc73a1af1ceb http://autobuild.buildroot.net/results/583/58347b94884eee2db28740486eda280e8c08e22f http://autobuild.buildroot.net/results/dc7/dc7c8cd548409864ab0055e196c0280457a5fb5f Signed-off-by: Romain Naour Cc: Baruch Siach Cc: Thomas Petazzoni --- package/glibc/glibc.mk | 3 ++- support/dependencies/check-host-make.mk | 17 +++++++++++++ support/dependencies/check-host-make.sh | 42 +++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 support/dependencies/check-host-make.mk create mode 100755 support/dependencies/check-host-make.sh diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 399cf395ce..fd9e394f92 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -28,7 +28,8 @@ GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO # Before glibc is configured, we must have the first stage # cross-compiler and the kernel headers -GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-bison host-gawk +GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-bison host-gawk \ + $(BR2_MAKE_HOST_DEPENDENCY) GLIBC_SUBDIR = build diff --git a/support/dependencies/check-host-make.mk b/support/dependencies/check-host-make.mk new file mode 100644 index 0000000000..fa45fac8e0 --- /dev/null +++ b/support/dependencies/check-host-make.mk @@ -0,0 +1,17 @@ +# Since version 2.28, glibc requires GNU Make >= 4.0 +# https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html +# +# Set this to either 4.0 or higher, depending on the highest minimum +# version required by any of the packages bundled in Buildroot. If a +# package is bumped or a new one added, and it requires a higher +# version, our package infra will catch it and whine. +# +BR2_MAKE_VERSION_MIN = 4.0 + +BR2_MAKE ?= $(call suitable-host-package,make,\ + $(BR2_MAKE_VERSION_MIN) $(MAKE)) + +ifeq ($(BR2_MAKE),) +BR2_MAKE = $(HOST_DIR)/bin/make +BR2_MAKE_HOST_DEPENDENCY = host-make +endif diff --git a/support/dependencies/check-host-make.sh b/support/dependencies/check-host-make.sh new file mode 100755 index 0000000000..9c31f4a415 --- /dev/null +++ b/support/dependencies/check-host-make.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# prevent shift error +[ $# -lt 2 ] && exit 1 + +major_min="${1%.*}" +minor_min="${1#*.}" + +shift + +# The host make program is already checked by dependencies.sh but we +# want to check the version number even if Buildroot is able to use +# GNU make >= 3.81 but some packages may require a more recent version. +make="$1" + +# Output of 'make --version' examples: +# GNU Make 4.2.1 +# GNU Make 4.0 +# GNU Make 3.81 +version=`$make --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ +].*//g' -e '1q'` + +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` +bugfix=`echo "$version" | cut -d. -f3` + +if [ -z "${bugfix}" ] ; then + bugfix=0 +fi + +if [ $major -lt $major_min ]; then + # echo nothing: no suitable make found + exit 1 +fi + +if [ $major -eq $major_min -a $minor -lt $minor_min ]; then + # echo nothing: no suitable make found + exit 1 +fi + +# valid +echo $make