From abd75cd6be4f2d54d58bb89ed0296a6e37db1d2c Mon Sep 17 00:00:00 2001 From: Sohei Koyama Date: Mon, 9 Dec 2024 00:09:35 +0900 Subject: [PATCH] LU-18522 utils: fix -export-dynamic flag When compiled with clang it fails with `unknown argument: '-export-dynamic'`. '-export-dynamic' is supported by gcc but not by clang. Change to '-Wl,--export-dynamic' instead, which both supports. -Wl, specifies the flags to be passed to the linker. Signed-off-by: Sohei Koyama Change-Id: I35830c0fec5387d532252478a402735ba2ad2dbf Test-Parameters: trivial Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57334 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Timothy Day Reviewed-by: Patrick Farrell --- lustre/utils/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 3537756..21dbd1c 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -184,7 +184,7 @@ libmount_utils_zfs_a_CPPFLAGS := -DHAVE_IOCTL_IN_UNISTD_H $(ZFS_LIBZFS_INCLUDE) if PLUGINS lib_LTLIBRARIES += libmount_utils_zfs.la libmount_utils_zfs.la : libmount_utils_zfs.a - $(CC) $(LDFLAGS) $(MNTMODLDFLAGS) -shared -export-dynamic -pthread \ + $(CC) $(LDFLAGS) $(MNTMODLDFLAGS) -shared -Wl,--export-dynamic -pthread \ $(ZFS_LIBZFS_LDFLAGS) -o mount_osd_zfs.so \ `$(AR) -t libmount_utils_zfs.a` \ $(MNTMODLIBS) $(ZFS_LIBZFS_LIBS) @@ -204,7 +204,7 @@ libmount_utils_ldiskfs_a_CPPFLAGS := if PLUGINS lib_LTLIBRARIES += libmount_utils_ldiskfs.la libmount_utils_ldiskfs.la : libmount_utils_ldiskfs.a - $(CC) $(LDFLAGS) $(MNTMODLDFLAGS) -shared -export-dynamic \ + $(CC) $(LDFLAGS) $(MNTMODLDFLAGS) -shared -Wl,--export-dynamic \ -o mount_osd_ldiskfs.so \ `$(AR) -t libmount_utils_ldiskfs.a` \ $(MNTMODLIBS) -lext2fs -- 1.8.3.1