All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] package/make: add host variant
@ 2018-09-03 19:19 Romain Naour
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 2/3] dependencies: host-make version check Romain Naour
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Romain Naour @ 2018-09-03 19:19 UTC (permalink / raw)
  To: 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 GNU make generated by
Buildroot for the host. Otherwise the one provided by the host system
can be used instead.

For example, the glibc build system is looking for gnumake and gmake
before make. See [2].

[1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
[2] http://lists.busybox.net/pipermail/buildroot/2018-September/229654.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 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))
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 2/3] dependencies: host-make version check
  2018-09-03 19:19 [Buildroot] [PATCH v2 1/3] package/make: add host variant Romain Naour
@ 2018-09-03 19:19 ` Romain Naour
  2018-09-04  0:10   ` Cam Hutchison
                     ` (2 more replies)
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make Romain Naour
                   ` (3 subsequent siblings)
  4 siblings, 3 replies; 14+ messages in thread
From: Romain Naour @ 2018-09-03 19:19 UTC (permalink / raw)
  To: 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.

For packages requiring make >= 4.0, the package makefile must use:
<PKG>_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY) ...
<PKG>_MAKE = $(BR2_MAKE)

BR2_MAKE1 is also available if needed.

[1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 support/dependencies/check-host-make.mk | 21 +++++++++++++++++
 support/dependencies/check-host-make.sh | 42 +++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 support/dependencies/check-host-make.mk
 create mode 100755 support/dependencies/check-host-make.sh

diff --git a/support/dependencies/check-host-make.mk b/support/dependencies/check-host-make.mk
new file mode 100644
index 0000000000..4235a393fd
--- /dev/null
+++ b/support/dependencies/check-host-make.mk
@@ -0,0 +1,21 @@
+# 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 -j$(PARALLEL_JOBS)
+BR2_MAKE1 = $(HOST_DIR)/bin/make -j1
+BR2_MAKE_HOST_DEPENDENCY = host-make
+else
+BR2_MAKE = $(MAKE)
+BR2_MAKE1 = $(MAKE1)
+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
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make
  2018-09-03 19:19 [Buildroot] [PATCH v2 1/3] package/make: add host variant Romain Naour
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 2/3] dependencies: host-make version check Romain Naour
@ 2018-09-03 19:19 ` Romain Naour
  2018-09-05  1:40   ` Matthew Weber
  2018-09-08 21:38   ` Thomas Petazzoni
  2018-09-03 19:55 ` [Buildroot] [PATCH v2 1/3] package/make: add host variant Matthew Weber
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Romain Naour @ 2018-09-03 19:19 UTC (permalink / raw)
  To: buildroot

Use host-make package if GNU make from the host machine is too old.

Use the newly introduced BR2_MAKE_HOST_DEPENDENCY and BR2_MAKE to
provide respectively, host-make dependency and the path to the GNU
make binary to use for building glibc.

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 <romain.naour@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/glibc/glibc.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index 399cf395ce..a2eb8714b1 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -28,7 +28,12 @@ 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 requires make >= 4.0 since 2.28 release.
+# https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
+GLIBC_MAKE = $(BR2_MAKE)
 
 GLIBC_SUBDIR = build
 
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/make: add host variant
  2018-09-03 19:19 [Buildroot] [PATCH v2 1/3] package/make: add host variant Romain Naour
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 2/3] dependencies: host-make version check Romain Naour
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make Romain Naour
@ 2018-09-03 19:55 ` Matthew Weber
  2018-09-03 21:35   ` Arnout Vandecappelle
  2018-09-04  8:27   ` Thomas Petazzoni
  2018-09-05  1:39 ` Matthew Weber
  2018-09-08 21:37 ` Thomas Petazzoni
  4 siblings, 2 replies; 14+ messages in thread
From: Matthew Weber @ 2018-09-03 19:55 UTC (permalink / raw)
  To: buildroot

Romain,
On Mon, Sep 3, 2018 at 2:19 PM Romain Naour <romain.naour@gmail.com> wrote:
>
> 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 GNU make generated by
> Buildroot for the host. Otherwise the one provided by the host system
> can be used instead.
>
> For example, the glibc build system is looking for gnumake and gmake
> before make. See [2].
>
> [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
> [2] http://lists.busybox.net/pipermail/buildroot/2018-September/229654.html
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  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))
> --

I plan to give this a test tomorrow.  We have been close to sending
something similar because of a Make 3 vs 4 issue across vintages of
builds we've been supporting.  I wonder if there is any interest
picking this one back into the LTS?

Matt

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/make: add host variant
  2018-09-03 19:55 ` [Buildroot] [PATCH v2 1/3] package/make: add host variant Matthew Weber
@ 2018-09-03 21:35   ` Arnout Vandecappelle
  2018-09-04  8:27   ` Thomas Petazzoni
  1 sibling, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2018-09-03 21:35 UTC (permalink / raw)
  To: buildroot



On 03/09/2018 21:55, Matthew Weber wrote:
> Romain,
> On Mon, Sep 3, 2018 at 2:19 PM Romain Naour <romain.naour@gmail.com> wrote:
>>
>> 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 GNU make generated by
>> Buildroot for the host. Otherwise the one provided by the host system
>> can be used instead.
>>
>> For example, the glibc build system is looking for gnumake and gmake
>> before make. See [2].
>>
>> [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
>> [2] http://lists.busybox.net/pipermail/buildroot/2018-September/229654.html
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Baruch Siach <baruch@tkos.co.il>
>> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[snip]

> 
> I plan to give this a test tomorrow.  We have been close to sending
> something similar because of a Make 3 vs 4 issue across vintages of
> builds we've been supporting.  I wonder if there is any interest
> picking this one back into the LTS?

 Is it needed for anything else than glibc 2.28 then?

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 2/3] dependencies: host-make version check
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 2/3] dependencies: host-make version check Romain Naour
@ 2018-09-04  0:10   ` Cam Hutchison
  2018-09-05  1:39   ` Matthew Weber
  2018-09-08 21:37   ` Thomas Petazzoni
  2 siblings, 0 replies; 14+ messages in thread
From: Cam Hutchison @ 2018-09-04  0:10 UTC (permalink / raw)
  To: buildroot

On 4 September 2018 at 05:19, Romain Naour <romain.naour@gmail.com> wrote:

[snip]

> 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

Rather than parsing version strings, I've had good success with using sort -V:

if [ "$(printf '%s\n' "${minver}" "${makever}" | sort -V | head -n 1)"
!= "${minver}" ]; then
  exit 1
fi

sort -V was added to GNU sort in coreutils 7.0 released 2008-10-05

> +
> +# valid
> +echo $make
> --
> 2.14.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/make: add host variant
  2018-09-03 19:55 ` [Buildroot] [PATCH v2 1/3] package/make: add host variant Matthew Weber
  2018-09-03 21:35   ` Arnout Vandecappelle
@ 2018-09-04  8:27   ` Thomas Petazzoni
  2018-09-04 13:44     ` Matthew Weber
  1 sibling, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2018-09-04  8:27 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 3 Sep 2018 14:55:11 -0500, Matthew Weber wrote:

> I plan to give this a test tomorrow.  We have been close to sending
> something similar because of a Make 3 vs 4 issue across vintages of
> builds we've been supporting.  I wonder if there is any interest
> picking this one back into the LTS?

If you're talking about the issue that Sam Voss was discussing on IRC,
then it's different. Your issue was that your host machine is using
make >= 4.0, but some of your funky packages don't like that and would
need make < 4.0 to build.

This is not handled by Romain's series@all, which handles the
opposite situation: packages that need make >= 4.0, but the host has
make < 4.0.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/make: add host variant
  2018-09-04  8:27   ` Thomas Petazzoni
@ 2018-09-04 13:44     ` Matthew Weber
  0 siblings, 0 replies; 14+ messages in thread
From: Matthew Weber @ 2018-09-04 13:44 UTC (permalink / raw)
  To: buildroot

Thomas,

On Tue, Sep 4, 2018 at 3:28 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Mon, 3 Sep 2018 14:55:11 -0500, Matthew Weber wrote:
>
> > I plan to give this a test tomorrow.  We have been close to sending
> > something similar because of a Make 3 vs 4 issue across vintages of
> > builds we've been supporting.  I wonder if there is any interest
> > picking this one back into the LTS?
>
> If you're talking about the issue that Sam Voss was discussing on IRC,
> then it's different. Your issue was that your host machine is using
> make >= 4.0, but some of your funky packages don't like that and would
> need make < 4.0 to build.
>
> This is not handled by Romain's series at all, which handles the
> opposite situation: packages that need make >= 4.0, but the host has
> make < 4.0.
>

Yep, Sam was discussing handling older kernel / buildroot versions vs
versions of Make.

Romain's series covers compatibility on some of our older build
machines until we get them refreshed.

Matt

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/make: add host variant
  2018-09-03 19:19 [Buildroot] [PATCH v2 1/3] package/make: add host variant Romain Naour
                   ` (2 preceding siblings ...)
  2018-09-03 19:55 ` [Buildroot] [PATCH v2 1/3] package/make: add host variant Matthew Weber
@ 2018-09-05  1:39 ` Matthew Weber
  2018-09-08 21:37 ` Thomas Petazzoni
  4 siblings, 0 replies; 14+ messages in thread
From: Matthew Weber @ 2018-09-05  1:39 UTC (permalink / raw)
  To: buildroot

Romain,


On Mon, Sep 3, 2018 at 2:19 PM Romain Naour <romain.naour@gmail.com> wrote:
>
> 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 GNU make generated by
> Buildroot for the host. Otherwise the one provided by the host system
> can be used instead.
>
> For example, the glibc build system is looking for gnumake and gmake
> before make. See [2].
>
> [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
> [2] http://lists.busybox.net/pipermail/buildroot/2018-September/229654.html
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Tested-by: Matt Weber <matthew.weber@rockwellcollins.com>

> ---
>  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))
> --
> 2.14.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 
Matthew L Weber / Pr Software Engineer
Airborne Information Systems / RC Linux Secure Platforms
MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
www.rockwellcollins.com

Note: Any Export License Required Information and License Restricted
Third Party Intellectual Property (TPIP) content must be encrypted and
sent to matthew.weber at corp.rockwellcollins.com.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 2/3] dependencies: host-make version check
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 2/3] dependencies: host-make version check Romain Naour
  2018-09-04  0:10   ` Cam Hutchison
@ 2018-09-05  1:39   ` Matthew Weber
  2018-09-08 21:37   ` Thomas Petazzoni
  2 siblings, 0 replies; 14+ messages in thread
From: Matthew Weber @ 2018-09-05  1:39 UTC (permalink / raw)
  To: buildroot

Romain,

On Mon, Sep 3, 2018 at 2:19 PM Romain Naour <romain.naour@gmail.com> wrote:
>
> 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.
>
> For packages requiring make >= 4.0, the package makefile must use:
> <PKG>_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY) ...
> <PKG>_MAKE = $(BR2_MAKE)
>
> BR2_MAKE1 is also available if needed.
>
> [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Tested-by: Matt Weber <matthew.weber@rockwellcollins.com>

> ---
>  support/dependencies/check-host-make.mk | 21 +++++++++++++++++
>  support/dependencies/check-host-make.sh | 42 +++++++++++++++++++++++++++++++++
>  2 files changed, 63 insertions(+)
>  create mode 100644 support/dependencies/check-host-make.mk
>  create mode 100755 support/dependencies/check-host-make.sh
>
> diff --git a/support/dependencies/check-host-make.mk b/support/dependencies/check-host-make.mk
> new file mode 100644
> index 0000000000..4235a393fd
> --- /dev/null
> +++ b/support/dependencies/check-host-make.mk
> @@ -0,0 +1,21 @@
> +# 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 -j$(PARALLEL_JOBS)
> +BR2_MAKE1 = $(HOST_DIR)/bin/make -j1
> +BR2_MAKE_HOST_DEPENDENCY = host-make
> +else
> +BR2_MAKE = $(MAKE)
> +BR2_MAKE1 = $(MAKE1)
> +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
> --
> 2.14.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 
Matthew L Weber / Pr Software Engineer
Airborne Information Systems / RC Linux Secure Platforms
MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
www.rockwellcollins.com

Note: Any Export License Required Information and License Restricted
Third Party Intellectual Property (TPIP) content must be encrypted and
sent to matthew.weber at corp.rockwellcollins.com.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make Romain Naour
@ 2018-09-05  1:40   ` Matthew Weber
  2018-09-08 21:38   ` Thomas Petazzoni
  1 sibling, 0 replies; 14+ messages in thread
From: Matthew Weber @ 2018-09-05  1:40 UTC (permalink / raw)
  To: buildroot

Romain,

On Mon, Sep 3, 2018 at 2:19 PM Romain Naour <romain.naour@gmail.com> wrote:
>
> Use host-make package if GNU make from the host machine is too old.
>
> Use the newly introduced BR2_MAKE_HOST_DEPENDENCY and BR2_MAKE to
> provide respectively, host-make dependency and the path to the GNU
> make binary to use for building glibc.
>
> 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 <romain.naour@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Tested-by: Matt Weber <matthew.weber@rockwellcollins.com>

> ---
>  package/glibc/glibc.mk | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
> index 399cf395ce..a2eb8714b1 100644
> --- a/package/glibc/glibc.mk
> +++ b/package/glibc/glibc.mk
> @@ -28,7 +28,12 @@ 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 requires make >= 4.0 since 2.28 release.
> +# https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
> +GLIBC_MAKE = $(BR2_MAKE)
>
>  GLIBC_SUBDIR = build
>
> --
> 2.14.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 
Matthew L Weber / Pr Software Engineer
Airborne Information Systems / RC Linux Secure Platforms
MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
www.rockwellcollins.com

Note: Any Export License Required Information and License Restricted
Third Party Intellectual Property (TPIP) content must be encrypted and
sent to matthew.weber at corp.rockwellcollins.com.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/make: add host variant
  2018-09-03 19:19 [Buildroot] [PATCH v2 1/3] package/make: add host variant Romain Naour
                   ` (3 preceding siblings ...)
  2018-09-05  1:39 ` Matthew Weber
@ 2018-09-08 21:37 ` Thomas Petazzoni
  4 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  3 Sep 2018 21:19:31 +0200, Romain Naour wrote:
> 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 GNU make generated by
> Buildroot for the host. Otherwise the one provided by the host system
> can be used instead.
> 
> For example, the glibc build system is looking for gnumake and gmake
> before make. See [2].
> 
> [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
> [2] http://lists.busybox.net/pipermail/buildroot/2018-September/229654.html
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/make/make.mk | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 2/3] dependencies: host-make version check
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 2/3] dependencies: host-make version check Romain Naour
  2018-09-04  0:10   ` Cam Hutchison
  2018-09-05  1:39   ` Matthew Weber
@ 2018-09-08 21:37   ` Thomas Petazzoni
  2 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  3 Sep 2018 21:19:32 +0200, Romain Naour wrote:

> +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

bugfix is not used anywhere, so I dropped this variable, and applied
the patch to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make
  2018-09-03 19:19 ` [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make Romain Naour
  2018-09-05  1:40   ` Matthew Weber
@ 2018-09-08 21:38   ` Thomas Petazzoni
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:38 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  3 Sep 2018 21:19:33 +0200, Romain Naour wrote:
> Use host-make package if GNU make from the host machine is too old.
> 
> Use the newly introduced BR2_MAKE_HOST_DEPENDENCY and BR2_MAKE to
> provide respectively, host-make dependency and the path to the GNU
> make binary to use for building glibc.
> 
> 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 <romain.naour@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/glibc/glibc.mk | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-09-08 21:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 19:19 [Buildroot] [PATCH v2 1/3] package/make: add host variant Romain Naour
2018-09-03 19:19 ` [Buildroot] [PATCH v2 2/3] dependencies: host-make version check Romain Naour
2018-09-04  0:10   ` Cam Hutchison
2018-09-05  1:39   ` Matthew Weber
2018-09-08 21:37   ` Thomas Petazzoni
2018-09-03 19:19 ` [Buildroot] [PATCH v2 3/3] package/glibc: allow to specify host-make Romain Naour
2018-09-05  1:40   ` Matthew Weber
2018-09-08 21:38   ` Thomas Petazzoni
2018-09-03 19:55 ` [Buildroot] [PATCH v2 1/3] package/make: add host variant Matthew Weber
2018-09-03 21:35   ` Arnout Vandecappelle
2018-09-04  8:27   ` Thomas Petazzoni
2018-09-04 13:44     ` Matthew Weber
2018-09-05  1:39 ` Matthew Weber
2018-09-08 21:37 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.