Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/ncurses: Enable stripping of progs
@ 2026-08-16  1:27 Charlie Jenkins
  2026-08-16  4:20 ` Baruch Siach via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Charlie Jenkins @ 2026-08-16  1:27 UTC (permalink / raw)
  To: buildroot; +Cc: Charlie Jenkins

Commit 2ab611c40ff08bd4a7922456fed22af6953af3b1("ncurses: fix build
failure with ncurses 6.1") added --disable-stripping to the ncurses
build because ncurses started stripping by default but using the host
strip instead of the cross strip.

Enable stripping and change the strip program to $(TARGET_CROSS)strip.
This shrinks the binary sizes of the programs generated by
BR2_PACKAGE_NCURSES_TARGET_PROGS on aarch64 by:

clear:		18k -> 10k
infocmp:	76k -> 62k
tabs:		27k -> 18k
tic:		103k -> 87k
toe:		27k -> 18k
tput:		33k -> 22k
tset:		33k -> 22k

Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com>
---
 package/ncurses/ncurses.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
index 5e2077500a..e017bacf6e 100644
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -31,7 +31,7 @@ NCURSES_CONF_OPTS = \
 	--enable-const \
 	--enable-overwrite \
 	--enable-pc-files \
-	--disable-stripping \
+	--with-strip-program=$(TARGET_CROSS)strip \
 	--with-pkg-config-libdir="/usr/lib/pkgconfig" \
 	$(if $(BR2_PACKAGE_NCURSES_TARGET_PROGS),,--without-progs) \
 	--without-manpages

---
base-commit: e389f1b44c54660c7bb5512207a561e684b41595
change-id: 20260815-ncurses_strip-615a30afa120

Best regards,
--  
- Charlie

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/ncurses: Enable stripping of progs
  2026-08-16  1:27 [Buildroot] [PATCH] package/ncurses: Enable stripping of progs Charlie Jenkins
@ 2026-08-16  4:20 ` Baruch Siach via buildroot
  2026-08-16  4:46   ` Charlie Jenkins
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach via buildroot @ 2026-08-16  4:20 UTC (permalink / raw)
  To: Charlie Jenkins; +Cc: buildroot

Hi Charlie,

On Sat, Aug 15 2026, Charlie Jenkins wrote:
> Commit 2ab611c40ff08bd4a7922456fed22af6953af3b1("ncurses: fix build
> failure with ncurses 6.1") added --disable-stripping to the ncurses
> build because ncurses started stripping by default but using the host
> strip instead of the cross strip.
>
> Enable stripping and change the strip program to $(TARGET_CROSS)strip.
> This shrinks the binary sizes of the programs generated by
> BR2_PACKAGE_NCURSES_TARGET_PROGS on aarch64 by:
>
> clear:		18k -> 10k
> infocmp:	76k -> 62k
> tabs:		27k -> 18k
> tic:		103k -> 87k
> toe:		27k -> 18k
> tput:		33k -> 22k
> tset:		33k -> 22k

The 'target-finalize' target defined in top level Makefile should strip
all target binaries. Lookup STRIPCMD in top Makefile.

Doesn't that work for ncurses binaries?

baruch

>
> Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com>
> ---
>  package/ncurses/ncurses.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
> index 5e2077500a..e017bacf6e 100644
> --- a/package/ncurses/ncurses.mk
> +++ b/package/ncurses/ncurses.mk
> @@ -31,7 +31,7 @@ NCURSES_CONF_OPTS = \
>  	--enable-const \
>  	--enable-overwrite \
>  	--enable-pc-files \
> -	--disable-stripping \
> +	--with-strip-program=$(TARGET_CROSS)strip \
>  	--with-pkg-config-libdir="/usr/lib/pkgconfig" \
>  	$(if $(BR2_PACKAGE_NCURSES_TARGET_PROGS),,--without-progs) \
>  	--without-manpages
>
> ---
> base-commit: e389f1b44c54660c7bb5512207a561e684b41595
> change-id: 20260815-ncurses_strip-615a30afa120
>
> Best regards,

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/ncurses: Enable stripping of progs
  2026-08-16  4:20 ` Baruch Siach via buildroot
@ 2026-08-16  4:46   ` Charlie Jenkins
  0 siblings, 0 replies; 3+ messages in thread
From: Charlie Jenkins @ 2026-08-16  4:46 UTC (permalink / raw)
  To: Baruch Siach; +Cc: buildroot

On Sun, Aug 16, 2026 at 07:20:52AM +0300, Baruch Siach wrote:
> Hi Charlie,
> 
> On Sat, Aug 15 2026, Charlie Jenkins wrote:
> > Commit 2ab611c40ff08bd4a7922456fed22af6953af3b1("ncurses: fix build
> > failure with ncurses 6.1") added --disable-stripping to the ncurses
> > build because ncurses started stripping by default but using the host
> > strip instead of the cross strip.
> >
> > Enable stripping and change the strip program to $(TARGET_CROSS)strip.
> > This shrinks the binary sizes of the programs generated by
> > BR2_PACKAGE_NCURSES_TARGET_PROGS on aarch64 by:
> >
> > clear:		18k -> 10k
> > infocmp:	76k -> 62k
> > tabs:		27k -> 18k
> > tic:		103k -> 87k
> > toe:		27k -> 18k
> > tput:		33k -> 22k
> > tset:		33k -> 22k
> 
> The 'target-finalize' target defined in top level Makefile should strip
> all target binaries. Lookup STRIPCMD in top Makefile.
> 
> Doesn't that work for ncurses binaries?

That's a silly oversight on my part, thank you! I was looking at this
Makefile and the outputs but didn't look at the final outputs generated
by this step, oops.

- Charlie

> 
> baruch
> 
> >
> > Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com>
> > ---
> >  package/ncurses/ncurses.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
> > index 5e2077500a..e017bacf6e 100644
> > --- a/package/ncurses/ncurses.mk
> > +++ b/package/ncurses/ncurses.mk
> > @@ -31,7 +31,7 @@ NCURSES_CONF_OPTS = \
> >  	--enable-const \
> >  	--enable-overwrite \
> >  	--enable-pc-files \
> > -	--disable-stripping \
> > +	--with-strip-program=$(TARGET_CROSS)strip \
> >  	--with-pkg-config-libdir="/usr/lib/pkgconfig" \
> >  	$(if $(BR2_PACKAGE_NCURSES_TARGET_PROGS),,--without-progs) \
> >  	--without-manpages
> >
> > ---
> > base-commit: e389f1b44c54660c7bb5512207a561e684b41595
> > change-id: 20260815-ncurses_strip-615a30afa120
> >
> > Best regards,
> 
> -- 
>                                                      ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-08-16  4:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-16  1:27 [Buildroot] [PATCH] package/ncurses: Enable stripping of progs Charlie Jenkins
2026-08-16  4:20 ` Baruch Siach via buildroot
2026-08-16  4:46   ` Charlie Jenkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox