1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
$NetBSD: patch-aa,v 1.4 2003/04/29 12:16:19 augustss Exp $
--- ./mk/bootstrap.mk.orig Tue May 14 10:25:46 2002
+++ ./mk/bootstrap.mk Fri Mar 28 23:48:02 2003
@@ -123,10 +123,22 @@
HC_BOOT_LIBS = -lHStext -lHStext_cbits -lHSutil -lHSposix -lHSposix_cbits -lHSconcurrent -lHSlang -lHSlang_cbits -lHShaskell98 -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
+# XXX_UB: if we build ghc/utils with hc-bootstrapped compiler+libs,
+# the link fails, libHSrts uses a (new) symbol from libHSbase.
+# Maybe we should insert a ranlib somewhere?
+# Workaround the problem:
+HC_BOOT_LIBS += -lHSbase
+
ifeq "$(GhcLibsWithReadline)" "YES"
HC_BOOT_LIBS += $(patsubst %, -l%, $(LibsReadline))
+HC_BOOT_LIBS += $(ExtraLdOptsReadline)
+ifneq "$(ReadlineIncludePath)" ""
+HC_BOOT_CC_OPTS += -I$(ReadlineIncludePath)
+endif
endif
+HC_BOOT_LIBS += $(ExtraLdOptsGmp)
+
ifeq "$(HaveLibDL)" "YES"
HC_BOOT_LIBS += -ldl
endif
@@ -149,7 +161,7 @@
$(CC) -x c $< -o $@ -S -O $(HC_BOOT_CC_OPTS) -I. `echo $(patsubst -monly-%-regs, -DSTOLEN_X86_REGS=%, $(filter -monly-%-regs, $($*_HC_OPTS))) | sed 's/^$$/-DSTOLEN_X86_REGS=4/'`
%.s : %.raw_s
- $(FPTOOLS_TOP)/$(GHC_MANGLER_DIR)/$(GHC_MANGLER) $< $@ $(patsubst -monly-%-regs, %, $(filter -monly-%-regs, $($*_HC_OPTS)))
+ $(GHC_MANGLER) $< $@ $(patsubst -monly-%-regs, %, $(filter -monly-%-regs, $($*_HC_OPTS)))
%.o : %.s
$(CC) -c -o $@ $<
|