Patchwork [XFSPROGS,3/3] mkfs: Link against libuuid after liblkid

login
register
mail settings
Submitter Theodore Ts'o
Date July 21, 2011, 11:50 p.m.
Message ID <1311292237-4155-3-git-send-email-tytso@mit.edu>
Download mbox | patch
Permalink /patch/106190/
State Not Applicable
Headers show

Comments

Theodore Ts'o - July 21, 2011, 11:50 p.m.
The order in which libraries are searched matters if you are using
static libraries.  Since libblkid uses some functions from libuuid, it
needs to come before libuuid in the link line.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 mkfs/Makefile |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
Christoph Hellwig - July 22, 2011, 2:29 p.m.
On Thu, Jul 21, 2011 at 07:50:37PM -0400, Theodore Ts'o wrote:
> The order in which libraries are searched matters if you are using
> static libraries.  Since libblkid uses some functions from libuuid, it
> needs to come before libuuid in the link line.

Thanks, applied.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/mkfs/Makefile b/mkfs/Makefile
index 8b61c2f..75da633 100644
--- a/mkfs/Makefile
+++ b/mkfs/Makefile
@@ -11,10 +11,6 @@  FSTYP = fstyp
 HFILES = xfs_mkfs.h
 CFILES = maxtrres.c proto.c xfs_mkfs.c
 
-LLDLIBS = $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
-LTDEPENDENCIES = $(LIBXFS)
-LLDFLAGS = -static
-
 ifeq ($(ENABLE_BLKID),yes)
 LLDLIBS += $(LIBBLKID)
 CFLAGS += -DENABLE_BLKID
@@ -23,6 +19,9 @@  LLDLIBS += $(LIBDISK)
 LTDEPENDENCIES += $(LIBDISK)
 endif
 
+LLDLIBS += $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
+LTDEPENDENCIES += $(LIBXFS)
+LLDFLAGS = -static
 
 LSRCFILES = $(FSTYP).c
 LDIRT = $(FSTYP)