* [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped
@ 2023-11-07 13:23 Oleg Lyovin via buildroot
2023-11-08 22:26 ` Thomas Petazzoni via buildroot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Oleg Lyovin via buildroot @ 2023-11-07 13:23 UTC (permalink / raw)
To: buildroot; +Cc: John Stile, olegartys, Oleg Lyovin
By default dhcpcd installed with 555 permissions as it is
configured in its Makefile.inc. Since 'w' bit is missing,
strip fails and dhcpcd binary installed non-stripped.
On ARM GCC 12 glibc configuration strip saves over 1MB of disk space.
Signed-off-by: Oleg Lyovin <ovlevin@salutedevices.com>
---
package/dhcpcd/dhcpcd.mk | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/package/dhcpcd/dhcpcd.mk b/package/dhcpcd/dhcpcd.mk
index a194bce323..ba1481e83d 100644
--- a/package/dhcpcd/dhcpcd.mk
+++ b/package/dhcpcd/dhcpcd.mk
@@ -17,6 +17,9 @@ DHCPCD_CONFIG_OPTS = \
--os=linux \
--privsepuser=dhcpcd
+DHCPCD_MAKE_OPTS = \
+ BINMODE=755
+
ifeq ($(BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP),y)
DHCPCD_CONFIG_OPTS += --enable-privsep
else
@@ -43,11 +46,11 @@ define DHCPCD_CONFIGURE_CMDS
endef
define DHCPCD_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(DHCPCD_MAKE_OPTS) all
endef
define DHCPCD_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(DHCPCD_MAKE_OPTS) install DESTDIR=$(TARGET_DIR)
endef
# When network-manager is enabled together with dhcpcd, it will use
--
2.42.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped
2023-11-07 13:23 [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped Oleg Lyovin via buildroot
@ 2023-11-08 22:26 ` Thomas Petazzoni via buildroot
2023-11-09 8:05 ` Oleg Lyovin via buildroot
2023-11-11 13:42 ` Peter Korsgaard
2023-11-13 13:00 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-08 22:26 UTC (permalink / raw)
To: Oleg Lyovin via buildroot; +Cc: John Stile, olegartys, Oleg Lyovin
Hello Oleg,
On Tue, 7 Nov 2023 16:23:23 +0300
Oleg Lyovin via buildroot <buildroot@buildroot.org> wrote:
> By default dhcpcd installed with 555 permissions as it is
> configured in its Makefile.inc. Since 'w' bit is missing,
> strip fails and dhcpcd binary installed non-stripped.
Wow, very good finding!
> On ARM GCC 12 glibc configuration strip saves over 1MB of disk space.
Could you clarify in which configuration you found that over 1 MB of
disk space gets saved?
Here, my dhcpcd binary, unstripped looks like this:
-r-xr-xr-x. 1 thomas thomas 327K 8 nov. 23:22 dhcpcd
So, 327 KB. How can 1 MB be saved?
(Note: of course this doesn't remove anything to the relevance of your
patch, but I'm curious how you got that number).
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped
2023-11-08 22:26 ` Thomas Petazzoni via buildroot
@ 2023-11-09 8:05 ` Oleg Lyovin via buildroot
0 siblings, 0 replies; 5+ messages in thread
From: Oleg Lyovin via buildroot @ 2023-11-09 8:05 UTC (permalink / raw)
To: Thomas Petazzoni, buildroot; +Cc: John Stile, olegartys
Hello Thomas,
On 09.11.2023 01:26, Thomas Petazzoni wrote:
> Hello Oleg,
>
> On Tue, 7 Nov 2023 16:23:23 +0300
> Oleg Lyovin via buildroot <buildroot@buildroot.org> wrote:
>
>> By default dhcpcd installed with 555 permissions as it is
>> configured in its Makefile.inc. Since 'w' bit is missing,
>> strip fails and dhcpcd binary installed non-stripped.
>
> Wow, very good finding!
>
>> On ARM GCC 12 glibc configuration strip saves over 1MB of disk space.
>
> Could you clarify in which configuration you found that over 1 MB of
> disk space gets saved?
>
> Here, my dhcpcd binary, unstripped looks like this:
>
> -r-xr-xr-x. 1 thomas thomas 327K 8 nov. 23:22 dhcpcd
>
> So, 327 KB. How can 1 MB be saved?
>
> (Note: of course this doesn't remove anything to the relevance of your
> patch, but I'm curious how you got that number).
>
> Thanks!
>
> Thomas
Thanks a lot for your review!
About the 1 MB note: on my local configuration "TARGET_CFLAGS += -gdwarf-4" was set,
which obviously lead to great size increase.
With this option disabled, I got this for unstripped binary:
-rwxr-xr-x 1 olegartys olegartys 240K Nov 9 07:27 dhcpcd
I use the following configuration (highlighted only the important options):
BR2_arm=y
BR2_ARM_CPU_ARMV8A=y
BR2_GCC_TARGET_CPU="cortex-a35"
BR2_GCC_TARGET_FPU="fp-armv8"
BR2_GCC_TARGET_FLOAT_ABI="hard"
BR2_GCC_TARGET_MODE="thumb"
BR2_TOOLCHAIN_EXTERNAL_GCC_12=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
Sorry for the misleading comment about great size saving. If it's not too much trouble,
can you please remove it from commit-msg if you decide to apply the patch?
Thanks!
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped
2023-11-07 13:23 [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped Oleg Lyovin via buildroot
2023-11-08 22:26 ` Thomas Petazzoni via buildroot
@ 2023-11-11 13:42 ` Peter Korsgaard
2023-11-13 13:00 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2023-11-11 13:42 UTC (permalink / raw)
To: Oleg Lyovin via buildroot; +Cc: John Stile, olegartys, Oleg Lyovin
>>>>> "Oleg" == Oleg Lyovin via buildroot <buildroot@buildroot.org> writes:
> By default dhcpcd installed with 555 permissions as it is
> configured in its Makefile.inc. Since 'w' bit is missing,
> strip fails and dhcpcd binary installed non-stripped.
> On ARM GCC 12 glibc configuration strip saves over 1MB of disk space.
> Signed-off-by: Oleg Lyovin <ovlevin@salutedevices.com>
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped
2023-11-07 13:23 [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped Oleg Lyovin via buildroot
2023-11-08 22:26 ` Thomas Petazzoni via buildroot
2023-11-11 13:42 ` Peter Korsgaard
@ 2023-11-13 13:00 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2023-11-13 13:00 UTC (permalink / raw)
To: Oleg Lyovin via buildroot; +Cc: John Stile, olegartys, Oleg Lyovin
>>>>> "Oleg" == Oleg Lyovin via buildroot <buildroot@buildroot.org> writes:
> By default dhcpcd installed with 555 permissions as it is
> configured in its Makefile.inc. Since 'w' bit is missing,
> strip fails and dhcpcd binary installed non-stripped.
> On ARM GCC 12 glibc configuration strip saves over 1MB of disk space.
> Signed-off-by: Oleg Lyovin <ovlevin@salutedevices.com>
Committed to 2023.02.x and 2023.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-13 13:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07 13:23 [Buildroot] [PATCH 1/1] package: dhcpcd: fix dhcpcd binary not stripped Oleg Lyovin via buildroot
2023-11-08 22:26 ` Thomas Petazzoni via buildroot
2023-11-09 8:05 ` Oleg Lyovin via buildroot
2023-11-11 13:42 ` Peter Korsgaard
2023-11-13 13:00 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox