All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libselinux: add --undefined-version to LD_SONAME_FLAGS
@ 2026-06-11 13:03 Stephen Smalley
  2026-06-11 18:50 ` Christian Göttsche
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Smalley @ 2026-06-11 13:03 UTC (permalink / raw)
  To: selinux; +Cc: jwcart2, plautrba, omosnace, Stephen Smalley, Pepper Gray

commit 9395cc03226a0 ("Always build for LFS mode on 32-bit archs.")
introduced a matchpathcon_filespec_add64 symbol for certain 32-bit
configurations but added it to libselinux.map. This was benign under
GNU ld but breaks lld due to differing defaults for
--no-undefined-version. Add --undefined-version to LD_SONAME_FLAGS to
avoid breakage when building with lld.

Fix: #512
Fix: #513
Fixes: 9395cc03226a0 ("Always build for LFS mode on 32-bit archs.")
Reported-by: Pepper Gray <hello@peppergray.xyz>
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
---
 libselinux/src/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index 9982faad..35f36b87 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -91,7 +91,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi
 
 override CFLAGS += $(LFS_CFLAGS)
 
-LD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=libselinux.map,-z,defs,-z,relro
+LD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=libselinux.map,-z,defs,-z,relro,--undefined-version
 
 ifeq ($(OS), Darwin)
 override CFLAGS += -I/opt/local/include
-- 
2.54.0


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

end of thread, other threads:[~2026-06-15 16:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 13:03 [PATCH] libselinux: add --undefined-version to LD_SONAME_FLAGS Stephen Smalley
2026-06-11 18:50 ` Christian Göttsche
2026-06-11 19:34   ` Stephen Smalley
2026-06-15  8:58     ` Petr Lautrbach
2026-06-15 12:18       ` Stephen Smalley
2026-06-15 16:51         ` Petr Lautrbach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.