]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: fix static builds creating conflicting targets
authorEli Schwartz <eschwartz@archlinux.org>
Thu, 14 Apr 2022 14:28:29 +0000 (10:28 -0400)
committerEli Schwartz <eschwartz@archlinux.org>
Thu, 14 Apr 2022 14:28:29 +0000 (10:28 -0400)
Meson has a global option -Ddefault_library which determines whether to
build all generic libraries as static, shared, or both. When creating a
library of the same name twice, once with library() and once with either
shared_library() or static_library(), some values for -Ddefault_library
will result in a fatal configuration error because multiple rules try to
create libXXX.a or libXXX.so

The reason for creating these additional copies of the library is in
order to optionally build some programs as both "prog" and "prog.static"
(and the latter is, of course, static). So depending on the
default_library value may not be desirable.

libfdisk/meson.build
libmount/meson.build

index 22cf66373885af8ddefdc3091c01e5a6f1414f7b..26c6f95fcc87570461df5b255f8732ab6ea7b89f 100644 (file)
@@ -57,7 +57,7 @@ lib__fdisk = static_library(
   dependencies : build_libfdisk ? [] : disabler())
 
 lib_fdisk_static = static_library(
-  'fdisk',
+  'fdisk_static',
   link_whole : lib__fdisk,
   link_with : [lib_common,
                lib_blkid.get_static_lib(),
index f5e2c344849489420f2a62c15194b511b36498fb..346d8054a631d3839f4c5beeb17ceffd64d1185f 100644 (file)
@@ -65,7 +65,7 @@ lib__mount = static_library(
                          dir_libblkid])
 
 lib_mount_static = static_library(
-  'mount',
+  'mount_static',
   link_whole : lib__mount,
   link_with : [lib_common,
                lib_blkid.get_static_lib()],