package/libtool: Reduce target package to libltdl only
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
This will save 1700K on target filesystem (as tested on ARM, i686).
---
Changelog:
v2:
- rework target libtool instead of new package/libltdl
package/libtool/libtool.mk | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
package/libtool/libtool.mk +13 -3
@@ -7,12 +7,22 @@ LIBTOOL_VERSION = 2.4.6 LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.xz LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool + +LIBTOOL_SUBDIR = libltdl +HOST_LIBTOOL_SUBDIR = . + LIBTOOL_INSTALL_STAGING = YES -LIBTOOL_CONF_ENV = HELP2MAN=true + +LIBTOOL_CONF_OPTS = --enable-ltdl-install +HOST_LIBTOOL_CONF_OPTS = + LIBTOOL_DEPENDENCIES = host-m4 HOST_LIBTOOL_DEPENDENCIES = host-m4 -LIBTOOL_LICENSE = GPL-2.0+ -LIBTOOL_LICENSE_FILES = COPYING + +LIBTOOL_LICENSE = LGPLv2.1 +LIBTOOL_LICENSE_FILES = $(LIBTOOL_SUBDIR)/COPYING.LIB +HOST_LIBTOOL_LICENSE = GPL-2.0+ +HOST_LIBTOOL_LICENSE_FILES = COPYING HOST_LIBTOOL_CONF_ENV = MAKEINFO=true HOST_LIBTOOL_LIBTOOL_PATCH = NO
Signature · 1 line
2.19.1
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
Alexander, All,
Arnout, licensing question for you at the end.
On 2018-11-24 17:54 +0100, Alexander Sverdlin spake thusly:
Quoted 16 lines
This will save 1700K on target filesystem (as tested on ARM, i686).
Signed-off-by Alexander Sverdlin <[email protected]>---
Changelog:
v2:
- rework target libtool instead of new package/libltdlpackage/libtool/libtool.mk | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)package/libtool/libtool.mk +0
-0
package/libtool/libtool.mk line 11
Quoted 9 lines
package/libtool/libtool.mk +4
-1@@ -7,12 +7,22 @@ LIBTOOL_VERSION = 2.4.6 LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.xz LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool + +LIBTOOL_SUBDIR = libltdl +HOST_LIBTOOL_SUBDIR = . + LIBTOOL_INSTALL_STAGING = YES -LIBTOOL_CONF_ENV = HELP2MAN=true
I guess HELP2MAN is no longer needed because there is no doc to build in the libltdl subdir, right?
package/libtool/libtool.mk line 17
Quoted 2 lines
package/libtool/libtool.mk +2
-0+LIBTOOL_CONF_OPTS = --enable-ltdl-install +HOST_LIBTOOL_CONF_OPTS =
This host variable does inherit the value from the target variant, so you don't need to specify an empty HOST_LIBTOOL_CONF_OPTS.
package/libtool/libtool.mk line 25
Quoted 9 lines
package/libtool/libtool.mk +5
-2LIBTOOL_DEPENDENCIES = host-m4 HOST_LIBTOOL_DEPENDENCIES = host-m4 -LIBTOOL_LICENSE = GPL-2.0+ -LIBTOOL_LICENSE_FILES = COPYING + +LIBTOOL_LICENSE = LGPLv2.1 +LIBTOOL_LICENSE_FILES = $(LIBTOOL_SUBDIR)/COPYING.LIB +HOST_LIBTOOL_LICENSE = GPL-2.0+ +HOST_LIBTOOL_LICENSE_FILES = COPYING
So, the host presumably also builds libltdl, no? Thus, we should include its licensing information too;
HOST_LIBTOOL_LICENSE = GPL-2.0+, LGPLv2.1 (libltdl)
HOST_LIBTOOL_LICENSE_FILES = COPYING $(LIBTOOL_SUBDIR)/COPYING.LIBNot sure about that one, wait a bit for others to confirm before respinning the patch.
Regards,
Yann E. MORIN.
Quoted 5 lines
package/libtool/libtool.mk +0
-0HOST_LIBTOOL_CONF_ENV = MAKEINFO=true HOST_LIBTOOL_LIBTOOL_PATCH = NOSignature · 1 line
2.19.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
Hi!
Quoted 8 lines · On Sat, 24 Nov 2018 19:47:08 +0100 "Yann E. MORIN" <[email protected]>…
So, the host presumably also builds libltdl, no? Thus, we should include its licensing information too;
HOST_LIBTOOL_LICENSE = GPL-2.0+, LGPLv2.1 (libltdl) HOST_LIBTOOL_LICENSE_FILES = COPYING $(LIBTOOL_SUBDIR)/COPYING.LIBNot sure about that one, wait a bit for others to confirm before respinning the patch.
If others agree that there is a licensing issue, this would be totally unrelated to libltdl conversion, so I can do it in a separate patch.
Signature · 1 line
Alexander Sverdlin.
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
Hi!
Quoted 6 lines · On Sat, 24 Nov 2018 20:06:31 +0100 Alexander Sverdlin…
Quoted 6 lines
So, the host presumably also builds libltdl, no? Thus, we should include its licensing information too;
HOST_LIBTOOL_LICENSE = GPL-2.0+, LGPLv2.1 (libltdl) HOST_LIBTOOL_LICENSE_FILES = COPYING $(LIBTOOL_SUBDIR)/COPYING.LIB
Quoted 6 lines
Quoted 2 lines
Not sure about that one, wait a bit for others to confirm before respinning the patch.
If others agree that there is a licensing issue, this would be totally unrelated to libltdl conversion, so I can do it in a separate patch.
OK, tried to make a separate patch and understood that it was wrong idea...
Signature · 1 line
Alexander Sverdlin.
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
In reply to Yann E. MORINHello!
Quoted 4 lines · On Sat, 24 Nov 2018 19:47:08 +0100 "Yann E. MORIN" <[email protected]>…
Quoted 1 line
-LIBTOOL_CONF_ENV = HELP2MAN=true
I guess HELP2MAN is no longer needed because there is no doc to build in the libltdl subdir, right?
Correct.
Signature · 1 line
Alexander Sverdlin.
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
In reply to Yann E. MORINQuoted 16 lines · Yann E. MORIN
Alexander, All,
Arnout, licensing question for you at the end.
On 2018-11-24 17:54 +0100, Alexander Sverdlin spake thusly:
Quoted 11 lines
This will save 1700K on target filesystem (as tested on ARM, i686).
Signed-off-by Alexander Sverdlin <[email protected]>---
Changelog:
v2:
- rework target libtool instead of new package/libltdlpackage/libtool/libtool.mk | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
Quoted 11 lines
package/libtool/libtool.mk line 12
Quoted 11 lines
package/libtool/libtool.mk +3
-0@@ -7,12 +7,22 @@ LIBTOOL_VERSION = 2.4.6 LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.xz LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool + +LIBTOOL_SUBDIR = libltdl +HOST_LIBTOOL_SUBDIR = .
I guess the following doesn't work?
HOST_LIBTOOL_SUBDIR =
That is because we handle this case as follows:
ifndef $(2)_SUBDIR
ifdef $(3)_SUBDIR
$(2)_SUBDIR = $$($(3)_SUBDIR)
else
$(2)_SUBDIR ?=
endif
endif
The problem is that 'ifndef' doesn't check if it is not defined, it checks if it is not empty. I.e., 'ifndef' is exactly the same as 'ifeq ($(foo),)'. So if we define HOST_LIBTOOL_SUBDIR as empty, it will take its value from the target even if we override the host value.
Ideally, we should fix this in the infra so we can just useHOST_LIBTOOL_SUBDIR =
here.
I think the solution is to change the infra into
$(2)_SUBDIR ?= $$($(3)_SUBDIR)
... which is also shorter and easier to understand.
And ideally, all these inherit-from-target things should be changed into
something like:
$(2)_FOO ?= $$(or $$($(3)_FOO),<default>)
As usually, I haven't tested this :-)
[snip]
Quoted 5 lines
So, the host presumably also builds libltdl, no? Thus, we should include its licensing information too;
HOST_LIBTOOL_LICENSE = GPL-2.0+, LGPLv2.1 (libltdl)
LGPL-2.1 instead of LGPLv2.1. And I think it has the 'or later' clause
everywhere, doesn't it?
Quoted 4 lines
HOST_LIBTOOL_LICENSE_FILES = COPYING $(LIBTOOL_SUBDIR)/COPYING.LIBNot sure about that one, wait a bit for others to confirm before respinning the patch.
Well, the idea was that when you distribute both together, the whole
effectively becomes GPL-2.0+.
However, since the library may be used independently (if a host tool links
against libltdl), it does make sense to mention the libltdl separately.
Ideally, the GPL-2.0+ part should also mention to what it applies. Like
HOST_LIBTOOL_LICENSE = GPL-2.0+ (libtool), LGPLv2.1 (libltdl)
(because I think libtool is the only thing that gets installed in HOST_DIR, isn't it?)
Regards,
Arnout
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
Hi!
Quoted 5 lines · On Mon Nov 26 10:28:29 2018 Arnout Vandecappelle <[email protected]> wrote:
Quoted 1 line
Quoted 1 line
+HOST_LIBTOOL_SUBDIR = .
? I guess the following doesn't work?
HOST_LIBTOOL_SUBDIR=
But "." works (as it was working for glibc and gdb previously)...
Quoted 6 lines
? Ideally, the GPL-2.0+ part should also mention to what it applies. Like
HOST_LIBTOOL_LICENSE= GPL-2.0+ (libtool), LGPLv2.1 (libltdl)(because I think libtool is the only thing that gets installed in
HOST_DIR, isn't it?)
Last time I've checked libltdl was installed in HOST_DIR (I cannot tell if it's used or not right now).
--
Alex.
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
Quoted 10 lines · Alexander Sverdlin
Hi!
Quoted 5 lines · On Mon Nov 26 10:28:29 2018 Arnout Vandecappelle <[email protected]> wrote:
Quoted 1 line
Quoted 1 line
+HOST_LIBTOOL_SUBDIR = .
? I guess the following doesn't work?
HOST_LIBTOOL_SUBDIR=But "." works (as it was working for glibc and gdb previously)...
Indeed, but it's ugly.
BTW: glibc?
On second thought, maybe we should just remove the automatic inheritance for_SUBDIR entirely.
There are 15 host packages that set _SUBDIR.
Of these, 6 are host-only (e.g. gcc) so the automatic inheritance is pointless.
Of the remaining 9:
- 2 override only HOST_XXX_SUBDIR (asterisk, cxxtest).
- 1 has a different SUBDIR for host and target (gettext).
- 1 overrides HOST_XXX_SUBDIR back to its default (gdb).
- 1 defines both with the same value (icu).
- 4 actually use the inheritance (capnproto, libnspr, tcl, vim).
So it hardly seems worth to have the automatic inheritance, if only 1/3 of its
occurences are actually useful.
Quoted 8 lines
Quoted 6 lines
? Ideally, the GPL-2.0+ part should also mention to what it applies. Like
HOST_LIBTOOL_LICENSE= GPL-2.0+ (libtool), LGPLv2.1 (libltdl)(because I think libtool is the only thing that gets installed in
HOST_DIR, isn't it?)Last time I've checked libltdl was installed in
HOST_DIR(I cannot tell if it's used or not right now).
I meant: I think libtool is the only thing that gets installed in HOST_DIR and
is covered by GPL-2.0+.
Regards,
Arnout
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
Hello,
Quoted 14 lines · Arnout Vandecappelle
On second thought, maybe we should just remove the automatic inheritance for
_SUBDIRentirely.There are 15 host packages that set
_SUBDIR.Of these, 6 are host-only (e.g. gcc) so the automatic inheritance is pointless.
Of the remaining 9:
- 2 override onlyHOST_XXX_SUBDIR(asterisk, cxxtest).
- 1 has a different SUBDIR for host and target (gettext).
- 1 overridesHOST_XXX_SUBDIRback to its default (gdb).
- 1 defines both with the same value (icu).
- 4 actually use the inheritance (capnproto, libnspr, tcl, vim).
Quoted 2 lines
So it hardly seems worth to have the automatic inheritance, if only 1/3 of its
occurences are actually useful.
Dropping the automatic inheritance of _SUBDIR is fine with me.
However, while we are talking about _SUBDIR, what about making progress on the discussion we had related to
https://patchwork.ozlabs.org/project/buildroot/list/?series=70199 ? :-)
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/1 package/libtool: Reduce target package to libltdl only
In reply to Arnout VandecappelleQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Hi,
Quoted 20 lines
Quoted 1 line
But "." works (as it was working for glibc and gdb previously)...
Indeed, but it's ugly.
BTW: glibc?
On second thought, maybe we should just remove the automatic inheritance for
_SUBDIRentirely.There are 15 host packages that set
_SUBDIR.Of these, 6 are host-only (e.g. gcc) so the automatic inheritance is pointless.
Of the remaining 9:
- 2 override onlyHOST_XXX_SUBDIR(asterisk, cxxtest).
- 1 has a different SUBDIR for host and target (gettext).
- 1 overridesHOST_XXX_SUBDIRback to its default (gdb).
- 1 defines both with the same value (icu).
- 4 actually use the inheritance (capnproto, libnspr, tcl, vim).
Quoted 2 lines
So it hardly seems worth to have the automatic inheritance, if only 1/3 of its
occurences are actually useful.
Agreed. Lets only have "magic" rules in the infrastructure if it is commonly needed.
Signature · 1 line
Bye, Peter Korsgaard