summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/build-package-data.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk
index 86eae14477..17def03638 100644
--- a/rules/build-package-data.mk
+++ b/rules/build-package-data.mk
@@ -81,7 +81,12 @@ $1_$2_CONFIGURE_OPTS += $$(BOOT_PKG_CONSTRAINTS)
endif
$1_$2_CONFIGURE_OPTS += --with-gcc="$$(CC_STAGE$3)"
-$1_$2_CONFIGURE_OPTS += --with-ld="$$(LD)"
+
+ifneq "$3" "0"
+# There is no LD_STAGE0, Cabal will figure it out
+$1_$2_CONFIGURE_OPTS += --with-ld="$$(LD_STAGE$3)"
+endif
+
$1_$2_CONFIGURE_OPTS += --configure-option=--with-cc="$$(CC_STAGE$3)"
$1_$2_CONFIGURE_OPTS += --with-ar="$$(AR_STAGE$3)"
$1_$2_CONFIGURE_OPTS += --with-ranlib="$$(RANLIB)"