gptfdisk: fix static build

libuuid may need -lintl. Augment the existing Makefile patch to support adding
link dependencies at build time.

Fixes:
http://autobuild.buildroot.net/results/24b/24b3f707424e2dcf0158ffe93d728be98ff66701/
http://autobuild.buildroot.net/results/f33/f3359fab166cf3627f15e59fa44cff36ee213102/
http://autobuild.buildroot.net/results/ef7/ef783e3776f25c28ea0de0c082c93f7ab97db56d/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Baruch Siach 2014-11-25 13:57:06 +02:00 committed by Peter Korsgaard
parent ec3730cbf8
commit 73d7bc535e
2 changed files with 9 additions and 3 deletions

View File

@ -7,6 +7,8 @@ the UTF16 support or not.
Signed-off-by: Justin Maggard <jmaggard10@gmail.com> Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[baruch: add $(LDLIBS)]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
--- ---
Index: b/Makefile Index: b/Makefile
=================================================================== ===================================================================
@ -32,17 +34,17 @@ Index: b/Makefile
gdisk: $(LIB_OBJS) gdisk.o gpttext.o gdisk: $(LIB_OBJS) gdisk.o gpttext.o
-# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk -# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk - $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
+ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(UTF16_LIBS) -luuid -o gdisk + $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(UTF16_LIBS) -luuid $(LDLIBS) -o gdisk
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
-# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk -# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk
- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk - $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk
+ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lncurses -o cgdisk + $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lncurses $(LDLIBS) -o cgdisk
sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
-# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk -# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk - $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
+ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lpopt -o sgdisk + $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lpopt $(LDLIBS) -o sgdisk
fixparts: $(MBR_LIB_OBJS) fixparts.o fixparts: $(MBR_LIB_OBJS) fixparts.o
$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts

View File

@ -26,6 +26,10 @@ GPTFDISK_DEPENDENCIES += icu
GPTFDISK_MAKE_OPTS += USE_UTF16=y GPTFDISK_MAKE_OPTS += USE_UTF16=y
endif endif
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PREFER_STATIC_LIB),yy)
GPTFDISK_MAKE_OPTS += LDLIBS=-lintl
endif
define GPTFDISK_BUILD_CMDS define GPTFDISK_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
$(GPTFDISK_MAKE_OPTS) $(GPTFDISK_TARGETS_y) $(GPTFDISK_MAKE_OPTS) $(GPTFDISK_TARGETS_y)