diff mbox series

[v2,1/3] package/make: add host variant

Message ID 20180903191933.26080-1-romain.naour@gmail.com
State Accepted
Headers show
Series [v2,1/3] package/make: add host variant | expand

Commit Message

Romain Naour Sept. 3, 2018, 7:19 p.m. UTC
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(+)

Comments

Arnout Vandecappelle Sept. 3, 2018, 9:35 p.m. UTC | #1
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
Thomas Petazzoni Sept. 4, 2018, 8:27 a.m. UTC | #2
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.

Best regards,

Thomas
Matt Weber Sept. 4, 2018, 1:44 p.m. UTC | #3
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
Matt Weber Sept. 5, 2018, 1:39 a.m. UTC | #4
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@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni Sept. 8, 2018, 9:37 p.m. UTC | #5
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
diff mbox series

Patch

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