public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/icu: fix static linking with icu-uc for musl static toolchains
@ 2026-03-03 16:28 Shubham Chakraborty
  2026-03-03 18:21 ` [Buildroot] [PATCH v2] " Shubham Chakraborty
  0 siblings, 1 reply; 10+ messages in thread
From: Shubham Chakraborty @ 2026-03-03 16:28 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Maxime Hadjinlian, Romain Naour,
	Shubham Chakraborty

During static linking with a C application and libicuuc.a,
-lstdc++ is required. The previous patch (0003) only addressed the
shared library case (Libs.private). This patch adds -lstdc++
to the main Libs line for the static case 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@gmail.com>
---
 ...atic-linking-with-icu-uc-static-musl.patch | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch

diff --git a/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch b/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
new file mode 100644
index 0000000000..40d3aa21a2
--- /dev/null
+++ b/package/icu/0004-fix-static-linking-with-icu-uc-static-musl.patch
@@ -0,0 +1,30 @@
+From 2107f9dfb39eeb6559fb4271c7af8b39aef521ca Mon Sep 17 00:00:00 2001
+From: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
+Date: Tue, 3 Mar 2026 10:00:00 +0000
+Subject: [PATCH] fix static linking with icu-uc (static case)
+
+During static linking with a C application and libicuuc.a,
+-lstdc++ is required. The previous patch (0003) only addressed the
+shared library case (Libs.private). This patch adds -lstdc++ to the
+main Libs line for the static case to fix undefined reference
+errors when linking programs like xmlcatalog (libxml2) with
+musl toolchains.
+
+Upstream: Inactive-Upstream [Buildroot specific]
+Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
+---
+ source/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff -git icu.orig/source/Makefile.in icu/source/Makefile.in
+--- icu.orig/source/Makefile.in
++++ icu/source/Makefile.in
+@@ -278,7 +278,7 @@ 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}' -lstdc++ >> $@
-- 
2.53.0

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

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

end of thread, other threads:[~2026-03-29  6:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 16:28 [Buildroot] [PATCH] package/icu: fix static linking with icu-uc for musl static toolchains Shubham Chakraborty
2026-03-03 18:21 ` [Buildroot] [PATCH v2] " Shubham Chakraborty
2026-03-26 11:36   ` [Buildroot] [PATCH v3] package/icu: fix static linking with icu-uc Shubham Chakraborty
2026-03-27  4:27     ` Andreas Ziegler
2026-03-27  9:50       ` Shubham Chakraborty
2026-03-27  9:43     ` [Buildroot] [PATCH v4] Extend the existing patch to also add -lstdc++ to the Libs field, fixing static linking issues with libicuuc.a Shubham Chakraborty
2026-03-28  5:30       ` Andreas Ziegler
2026-03-28  8:16         ` Shubham Chakraborty
2026-03-28  7:47       ` [Buildroot] [PATCH v5] icu: fix static linking by adding -lstdc++ to pkg-config Shubham Chakraborty
2026-03-29  6:33         ` Andreas Ziegler

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