vpnc: pass CFLAGS at link time
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 15 May 2010 18:06:27 +0000 (20:06 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 20 May 2010 20:34:30 +0000 (22:34 +0200)
External toolchain builds absolutely require the --sysroot option to
be passed at link time.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/vpnc/vpnc.mk

index 5d0f87abd1f900d51b3c5f3f26f2d15651769482..c4f23fa2ab52e4fe299a669aba35d81873552269 100644 (file)
@@ -26,7 +26,7 @@ $(VPNC_BINARY): $(VPNC_DIR)/.unpacked
        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)
@@ -38,7 +38,7 @@ $(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)