From 31e122443c41eaeb706bcc90d43de8937075b278 Mon Sep 17 00:00:00 2001 From: Daniel Pineda Date: Thu, 20 Apr 2023 10:44:34 -0600 Subject: [PATCH 1/2] modules/bash: Remove debug info from binary Add -g0 to CFLAGS Add -s to LDFLAGS Signed-off-by: Daniel Pineda --- modules/bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bash b/modules/bash index 8ada1577..327b5dd5 100644 --- a/modules/bash +++ b/modules/bash @@ -7,7 +7,7 @@ bash_tar := bash-$(bash_version).tar.gz bash_url := https://ftpmirror.gnu.org/bash/$(bash_tar) bash_hash := 5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558 -bash_configure := CFLAGS=-Os ./configure \ +bash_configure := CFLAGS="-g0 -Os" LDFLAGS="-s" ./configure \ $(CROSS_TOOLS) \ --host $(target) \ --prefix="/usr" \ From 1aa216773adcddcd39e51d72442366e82f42cbaf Mon Sep 17 00:00:00 2001 From: Daniel Pineda Date: Tue, 25 Apr 2023 14:32:25 -0600 Subject: [PATCH 2/2] patches/bash-5.1.16.patch: Do not increment build number Bash uses .build to keep count of the build number, which conflicts with heads build system usage of .build to keep track of built modules. If .build already exists when bash/configure is run it will increment by 1 the build number. This is configurable on the call to the support script support/mkversion.sh, which is called from the bash/Makefile. Patching the Makefile template used during bash configuration allows disabling the build number increment. Signed-off-by: Daniel Pineda --- patches/bash-5.1.16.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/bash-5.1.16.patch diff --git a/patches/bash-5.1.16.patch b/patches/bash-5.1.16.patch new file mode 100644 index 00000000..ef59ceaa --- /dev/null +++ b/patches/bash-5.1.16.patch @@ -0,0 +1,11 @@ +--- clean/bash-5.1.16/Makefile.in 2020-12-16 16:13:10.000000000 -0600 ++++ bash-5.1.16/Makefile.in 2023-04-25 14:16:38.849618679 -0600 +@@ -626,7 +626,7 @@ + @${MAKE} ${MFLAGS} tests TESTSCRIPT=run-gprof + + version.h: $(SOURCES) config.h Makefile patchlevel.h +- $(SHELL) $(SUPPORT_SRC)mkversion.sh -b -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \ ++ $(SHELL) $(SUPPORT_SRC)mkversion.sh -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \ + && mv newversion.h version.h + + bashversion$(EXEEXT): buildversion.o $(SUPPORT_SRC)bashversion.c