[Buildroot] [PATCH v4] Extend the existing patch to also add -lstdc++ to the Libs field, fixing static linking issues with libicuuc.a.
Shubham Chakraborty
chakrabortyshubham66 at gmail.com
Fri Mar 27 09:43:47 UTC 2026
This combines the previous 0003 and 0004 changes into a
single patch, following review feedback from Andreas.
Signed-off-by: Shubham Chakraborty <chakrabortyshubham66 at gmail.com>---
---
Changes v3 -> v4:
- Clean up patch to remove deleted 0004 patch file
- Ensure only 0003 patch is modified; no extra files or deletions
- Remove any rebase or history artifacts that caused previous patch failures
---
.../0003-fix-static-linking-with-icu-uc.patch | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/package/icu/0003-fix-static-linking-with-icu-uc.patch b/package/icu/0003-fix-static-linking-with-icu-uc.patch
index 36a3d1f696..c58f2700ee 100644
--- a/package/icu/0003-fix-static-linking-with-icu-uc.patch
+++ b/package/icu/0003-fix-static-linking-with-icu-uc.patch
@@ -13,14 +13,26 @@ http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef52
Signed-off-by: Romain Naour <romain.naour at openwide.fr>
---
- source/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+This patch currently addresses linking against stdc++ for shared-library
+builds. Add -lstdc++ to the static build flags also, to fix 'undefined
+reference' errors when linking programs like xmlcatalog (libxml2)
+with musl static toolchains.
+
+Upstream: Inactive-Upstream [Buildroot specific]
+Signed-off-by: Shubham Chakraborty <chakrabortyshubham66 at gmail.com>
+---
+ source/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff -git icu.orig/source/Makefile.in icu/source/Makefile.in
--- icu.orig/source/Makefile.in 2025-03-13 19:31:23.000000000 +0100
+++ icu/source/Makefile.in 2025-09-22 08:56:36.791792784 +0200
-@@ -279,7 +279,7 @@
- @echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" '$${baselibs}' >> $@
+@@ -276,10 +276,10 @@ config/icu-uc.pc: config/icu.pc Makefile icudefs.mk
+ @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Common and Data libraries" >> $@
+ @echo "Name: $(PACKAGE)-uc" >> $@
+ ifeq ($(ENABLE_SHARED),)
+- @echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" '$${baselibs}' >> $@
++ @echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" '$${baselibs}' -lstdc++ >> $@
else
@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" >> $@
- @echo "Libs.private:" "${ICULIBS_DT}" '$${baselibs}' >> $@
--
2.53.0
More information about the buildroot
mailing list