diff mbox series

[1/2] triggerhappy: use target pkg-config

Message ID d94eeb035e53af51d450c8e49b03e01cce0dfa1a.1528741488.git.baruch@tkos.co.il
State Accepted
Commit b4a7145b0b98fb37ee649e293a6a81785df67837
Headers show
Series [1/2] triggerhappy: use target pkg-config | expand

Commit Message

Baruch Siach June 11, 2018, 6:24 p.m. UTC
triggerhappy uses pkg-config to detect the systemd library. Make sure it
uses the target pkg-config, not the host one.

Fixes build failure when the host has systemd pkg-config files:

.../host/bin/arm-linux-gcc -static  th-cmd.o cmdsocket.o  -lsystemd -o th-cmd
.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lsystemd

Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/triggerhappy/triggerhappy.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Peter Korsgaard June 11, 2018, 7:39 p.m. UTC | #1
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > triggerhappy uses pkg-config to detect the systemd library. Make sure it
 > uses the target pkg-config, not the host one.

 > Fixes build failure when the host has systemd pkg-config files:

 > .../host/bin/arm-linux-gcc -static  th-cmd.o cmdsocket.o  -lsystemd -o th-cmd
 > .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
 > cannot find -lsystemd

 > Cc: Peter Korsgaard <peter@korsgaard.com>
 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Committed, thanks.
Peter Korsgaard June 17, 2018, 3:53 p.m. UTC | #2
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > triggerhappy uses pkg-config to detect the systemd library. Make sure it
 > uses the target pkg-config, not the host one.

 > Fixes build failure when the host has systemd pkg-config files:

> .../host/bin/arm-linux-gcc -static  th-cmd.o cmdsocket.o  -lsystemd -o th-cmd
 > .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
 > cannot find -lsystemd

 > Cc: Peter Korsgaard <peter@korsgaard.com>
 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Committed to 2018.02.x, thanks.
Peter Korsgaard July 17, 2018, 7:26 a.m. UTC | #3
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > triggerhappy uses pkg-config to detect the systemd library. Make sure it
 > uses the target pkg-config, not the host one.

 > Fixes build failure when the host has systemd pkg-config files:

 > .../host/bin/arm-linux-gcc -static  th-cmd.o cmdsocket.o  -lsystemd -o th-cmd
 > .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
 > cannot find -lsystemd

 > Cc: Peter Korsgaard <peter@korsgaard.com>
 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Committed to 2018.05.x, thanks.
diff mbox series

Patch

diff --git a/package/triggerhappy/triggerhappy.mk b/package/triggerhappy/triggerhappy.mk
index 9f74c486f10e..4c39ab5e5d4e 100644
--- a/package/triggerhappy/triggerhappy.mk
+++ b/package/triggerhappy/triggerhappy.mk
@@ -8,9 +8,11 @@  TRIGGERHAPPY_VERSION = b822888066129350e51ad79f1cf307fa38dae4f7
 TRIGGERHAPPY_SITE = $(call github,wertarbyte,triggerhappy,$(TRIGGERHAPPY_VERSION))
 TRIGGERHAPPY_LICENSE = GPL-3.0+
 TRIGGERHAPPY_LICENSE_FILES = COPYING
+TRIGGERHAPPY_DEPENDENCIES = host-pkgconf
 
 define TRIGGERHAPPY_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) thd th-cmd
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+		-C $(@D) thd th-cmd
 endef
 
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)