External toolchain builds absolutely require the --sysroot option to
be passed at link time.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
rm -f $@
$(MAKE) $(TARGET_CONFIGURE_OPTS) INCLUDE=$(STAGING_DIR)/usr/include \
CFLAGS="$(TARGET_CFLAGS)" \
- LDFLAGS+=-lgcrypt LDFLAGS+=-lgpg-error \
+ LDFLAGS+=-lgcrypt LDFLAGS+=-lgpg-error LDFLAGS+="$(TARGET_CFLAGS)" \
CC="$(TARGET_CC)" -C $(VPNC_DIR)
$(VPNC_TARGET_BINARY): $(VPNC_BINARY)
MANDIR=/usr/share/man \
VERSION=$(VPNC_VERSION) \
INCLUDE=$(STAGING_DIR)/usr/include \
- LDFLAGS="-lgcrypt -lgpg-error" \
+ LDFLAGS="-lgcrypt -lgpg-error $(TARGET_CFLAGS)" \
-C $(VPNC_DIR) install
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(VPNC_TARGET_BINARY)