* [Buildroot] [git commit branch/next] glibc: install glibc utils to target
@ 2019-11-23 10:53 Yann E. MORIN
2019-11-23 11:17 ` Carlos Santos
0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2019-11-23 10:53 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=c6cd512fe2e954b2ccc0412717c1c3380bc5f69b
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next
With this patch we introduce an option for glibc, which
installs getconf, ldconfig and ldd utilities on target, that
may be useful in debugging. By default these utilities are
built, but not installed to the target.
ldd is a bash script, so it has bash dependency.
Signed-off-by: Nikita Sobolev <Nikita.Sobolev@synopsys.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
package/glibc/Config.in | 10 ++++++++++
package/glibc/glibc.mk | 7 +++++++
2 files changed, 17 insertions(+)
diff --git a/package/glibc/Config.in b/package/glibc/Config.in
index 7821251087..323767fc8a 100644
--- a/package/glibc/Config.in
+++ b/package/glibc/Config.in
@@ -8,3 +8,13 @@ config BR2_PACKAGE_GLIBC
help
https://www.gnu.org/software/libc/
endif
+
+config BR2_PACKAGE_GLIBC_UTILS
+ bool "Install glibc utilities"
+ depends on BR2_PACKAGE_BASH
+ help
+ Enabling this option will compile and install the getconf,
+ ldconfig and ldd glibc utilities for the target.
+
+comment "glibc utilities need bash"
+ depends on !BR2_PACKAGE_BASH
diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index c6acc43ff5..5cb19aabb9 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -143,10 +143,17 @@ ifeq ($(BR2_PACKAGE_GDB),y)
GLIBC_LIBS_LIB += libthread_db.so.*
endif
+ifeq ($(BR2_PACKAGE_GLIBC_UTILS),y)
+GLIBC_TARGET_UTILS_BIN = posix/getconf elf/ldconfig elf/ldd
+endif
+
define GLIBC_INSTALL_TARGET_CMDS
for libpattern in $(GLIBC_LIBS_LIB); do \
$(call copy_toolchain_lib_root,$$libpattern) ; \
done
+ $(foreach util,$(GLIBC_TARGET_UTILS_BIN), \
+ $(INSTALL) -D -m 0755 $(@D)/build/$(util) $(TARGET_DIR)/bin/$(notdir $(util))
+ )
endef
$(eval $(autotools-package))
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [git commit branch/next] glibc: install glibc utils to target
2019-11-23 10:53 [Buildroot] [git commit branch/next] glibc: install glibc utils to target Yann E. MORIN
@ 2019-11-23 11:17 ` Carlos Santos
2019-11-23 12:40 ` Yann E. MORIN
2019-11-23 12:42 ` Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Carlos Santos @ 2019-11-23 11:17 UTC (permalink / raw)
To: buildroot
On Sat, Nov 23, 2019 at 7:53 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> commit: https://git.buildroot.net/buildroot/commit/?id=c6cd512fe2e954b2ccc0412717c1c3380bc5f69b
> branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next
>
> With this patch we introduce an option for glibc, which
> installs getconf, ldconfig and ldd utilities on target, that
> may be useful in debugging. By default these utilities are
> built, but not installed to the target.
> ldd is a bash script, so it has bash dependency.
>
> Signed-off-by: Nikita Sobolev <Nikita.Sobolev@synopsys.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
> package/glibc/Config.in | 10 ++++++++++
> package/glibc/glibc.mk | 7 +++++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/package/glibc/Config.in b/package/glibc/Config.in
> index 7821251087..323767fc8a 100644
> --- a/package/glibc/Config.in
> +++ b/package/glibc/Config.in
> @@ -8,3 +8,13 @@ config BR2_PACKAGE_GLIBC
> help
> https://www.gnu.org/software/libc/
> endif
> +
> +config BR2_PACKAGE_GLIBC_UTILS
> + bool "Install glibc utilities"
> + depends on BR2_PACKAGE_BASH
> + help
> + Enabling this option will compile and install the getconf,
> + ldconfig and ldd glibc utilities for the target.
> +
> +comment "glibc utilities need bash"
> + depends on !BR2_PACKAGE_BASH
> diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
> index c6acc43ff5..5cb19aabb9 100644
> --- a/package/glibc/glibc.mk
> +++ b/package/glibc/glibc.mk
> @@ -143,10 +143,17 @@ ifeq ($(BR2_PACKAGE_GDB),y)
> GLIBC_LIBS_LIB += libthread_db.so.*
> endif
>
> +ifeq ($(BR2_PACKAGE_GLIBC_UTILS),y)
> +GLIBC_TARGET_UTILS_BIN = posix/getconf elf/ldconfig elf/ldd
> +endif
> +
> define GLIBC_INSTALL_TARGET_CMDS
> for libpattern in $(GLIBC_LIBS_LIB); do \
> $(call copy_toolchain_lib_root,$$libpattern) ; \
> done
> + $(foreach util,$(GLIBC_TARGET_UTILS_BIN), \
> + $(INSTALL) -D -m 0755 $(@D)/build/$(util) $(TARGET_DIR)/bin/$(notdir $(util))
The usual path of these utilities on non-merged-usr systems (e.g. RHEL-6) is:
[root at rhel-6-1 ~]# which getconf ldconfig ldd
/usr/bin/getconf
/sbin/ldconfig
/usr/bin/ldd
> + )
> endef
>
> $(eval $(autotools-package))
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Carlos Santos <unixmania@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [git commit branch/next] glibc: install glibc utils to target
2019-11-23 11:17 ` Carlos Santos
@ 2019-11-23 12:40 ` Yann E. MORIN
2019-11-23 12:49 ` Yann E. MORIN
2019-11-23 12:42 ` Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2019-11-23 12:40 UTC (permalink / raw)
To: buildroot
Carlos, All,
On 2019-11-23 08:17 -0300, Carlos Santos spake thusly:
> On Sat, Nov 23, 2019 at 7:53 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > commit: https://git.buildroot.net/buildroot/commit/?id=c6cd512fe2e954b2ccc0412717c1c3380bc5f69b
> > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next
> >
> > With this patch we introduce an option for glibc, which
> > installs getconf, ldconfig and ldd utilities on target, that
[--SNIP--]
> > + $(foreach util,$(GLIBC_TARGET_UTILS_BIN), \
> > + $(INSTALL) -D -m 0755 $(@D)/build/$(util) $(TARGET_DIR)/bin/$(notdir $(util))
>
> The usual path of these utilities on non-merged-usr systems (e.g. RHEL-6) is:
>
> [root at rhel-6-1 ~]# which getconf ldconfig ldd
> /usr/bin/getconf
> /sbin/ldconfig
> /usr/bin/ldd
I also considered this before applying, and the locations on Ubuntu
(Debian) are the same as you report on RHEL.
But in the end, I considered it was a minor issue, for a few reasons:
1. it not very important where a program lies, as long as it can be
found in the PATH
2. we mostly only care when there are two or more packages providing
those programs, and we want them all to install those in the same
location (so that we don't have two, say, ls in the PATH). But when
there is a single package that install programs, it is not so
important where it is installed (see 1.)
3. the code snippet was suggested by Thomas in v1 of the patchset, so
that is authoritative too ;-)
So I applied.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [git commit branch/next] glibc: install glibc utils to target
2019-11-23 11:17 ` Carlos Santos
2019-11-23 12:40 ` Yann E. MORIN
@ 2019-11-23 12:42 ` Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2019-11-23 12:42 UTC (permalink / raw)
To: buildroot
>>>>> "Carlos" == Carlos Santos <unixmania@gmail.com> writes:
> On Sat, Nov 23, 2019 at 7:53 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>>
>> commit: https://git.buildroot.net/buildroot/commit/?id=c6cd512fe2e954b2ccc0412717c1c3380bc5f69b
>> branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next
>>
>> With this patch we introduce an option for glibc, which
>> installs getconf, ldconfig and ldd utilities on target, that
>> may be useful in debugging. By default these utilities are
>> built, but not installed to the target.
>> ldd is a bash script, so it has bash dependency.
>>
>> Signed-off-by: Nikita Sobolev <Nikita.Sobolev@synopsys.com>
>> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
>> ---
>> package/glibc/Config.in | 10 ++++++++++
>> package/glibc/glibc.mk | 7 +++++++
>> 2 files changed, 17 insertions(+)
>>
>> diff --git a/package/glibc/Config.in b/package/glibc/Config.in
>> index 7821251087..323767fc8a 100644
>> --- a/package/glibc/Config.in
>> +++ b/package/glibc/Config.in
>> @@ -8,3 +8,13 @@ config BR2_PACKAGE_GLIBC
>> help
>> https://www.gnu.org/software/libc/
>> endif
>> +
>> +config BR2_PACKAGE_GLIBC_UTILS
>> + bool "Install glibc utilities"
>> + depends on BR2_PACKAGE_BASH
>> + help
>> + Enabling this option will compile and install the getconf,
>> + ldconfig and ldd glibc utilities for the target.
>> +
>> +comment "glibc utilities need bash"
>> + depends on !BR2_PACKAGE_BASH
>> diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
>> index c6acc43ff5..5cb19aabb9 100644
>> --- a/package/glibc/glibc.mk
>> +++ b/package/glibc/glibc.mk
>> @@ -143,10 +143,17 @@ ifeq ($(BR2_PACKAGE_GDB),y)
>> GLIBC_LIBS_LIB += libthread_db.so.*
>> endif
>>
>> +ifeq ($(BR2_PACKAGE_GLIBC_UTILS),y)
>> +GLIBC_TARGET_UTILS_BIN = posix/getconf elf/ldconfig elf/ldd
>> +endif
>> +
>> define GLIBC_INSTALL_TARGET_CMDS
>> for libpattern in $(GLIBC_LIBS_LIB); do \
>> $(call copy_toolchain_lib_root,$$libpattern) ; \
>> done
>> + $(foreach util,$(GLIBC_TARGET_UTILS_BIN), \
>> + $(INSTALL) -D -m 0755 $(@D)/build/$(util) $(TARGET_DIR)/bin/$(notdir $(util))
> The usual path of these utilities on non-merged-usr systems (e.g. RHEL-6) is:
> [root at rhel-6-1 ~]# which getconf ldconfig ldd
> /usr/bin/getconf
> /sbin/ldconfig
> /usr/bin/ldd
Yes, I noticed that as well. I've pushed a commit which fixes this -
Thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [git commit branch/next] glibc: install glibc utils to target
2019-11-23 12:40 ` Yann E. MORIN
@ 2019-11-23 12:49 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2019-11-23 12:49 UTC (permalink / raw)
To: buildroot
Re,
On 2019-11-23 13:40 +0100, Yann E. MORIN spake thusly:
> On 2019-11-23 08:17 -0300, Carlos Santos spake thusly:
> > On Sat, Nov 23, 2019 at 7:53 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
[--SNIP--]
> > The usual path of these utilities on non-merged-usr systems (e.g. RHEL-6) is:
> >
> > [root at rhel-6-1 ~]# which getconf ldconfig ldd
> > /usr/bin/getconf
> > /sbin/ldconfig
> > /usr/bin/ldd
>
> I also considered this before applying, and the locations on Ubuntu
> (Debian) are the same as you report on RHEL.
Actually, ldconfig is in /usr/sbin/ldconfig here, so the locations do
not seem to be that traditional either.
But that's been "fixed" now, so all is good I guess...
Regards,
Yann E. MORIN.
> But in the end, I considered it was a minor issue, for a few reasons:
>
> 1. it not very important where a program lies, as long as it can be
> found in the PATH
>
> 2. we mostly only care when there are two or more packages providing
> those programs, and we want them all to install those in the same
> location (so that we don't have two, say, ls in the PATH). But when
> there is a single package that install programs, it is not so
> important where it is installed (see 1.)
>
> 3. the code snippet was suggested by Thomas in v1 of the patchset, so
> that is authoritative too ;-)
>
> So I applied.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-23 12:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-23 10:53 [Buildroot] [git commit branch/next] glibc: install glibc utils to target Yann E. MORIN
2019-11-23 11:17 ` Carlos Santos
2019-11-23 12:40 ` Yann E. MORIN
2019-11-23 12:49 ` Yann E. MORIN
2019-11-23 12:42 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox