Skip to content

Commit f141853

Browse files
committed
---
yaml --- r: 2041 b: refs/heads/master c: f8e22cd h: refs/heads/master i: 2039: 8cca7fd v: v3
1 parent e036239 commit f141853

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 97d0f76c633b3e3f73bed79096e24b320ee6dbaf
2+
refs/heads/master: f8e22cdff328dc9895e146cdcf0089f3e4db27f8

trunk/Makefile.in

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ ifeq ($(CFG_OSTYPE), Linux)
3838
CFG_LIB_NAME=lib$(1).so
3939
CFG_GCC_CFLAGS += -fPIC -march=i686 -O2
4040
CFG_GCC_LINK_FLAGS += -shared -fPIC -ldl -lpthread -lrt
41-
CFG_GCC_DEF_FLAG := -Wl,-whole-archive,--export-dynamic,--dynamic-list=
41+
CFG_GCC_DEF_FLAG := -Wl,--export-dynamic,--dynamic-list=
42+
CFG_GCC_PRE_LIB_FLAGS := -Wl,-whole-archive
4243
CFG_GCC_POST_LIB_FLAGS := -Wl,-no-whole-archive
4344
ifeq ($(CFG_CPUTYPE), x86_64)
4445
CFG_GCC_CFLAGS += -m32
@@ -417,11 +418,19 @@ rt/$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR) $(RUNTIME_DEF)
417418
@$(call E, link: $@)
418419
$(Q)$(call CFG_LINK_C,$@,$(RUNTIME_LIBS) $(RUNTIME_OBJS),$(RUNTIME_DEF))
419420

420-
rustllvm/$(CFG_RUSTLLVM): $(RUSTLLVM_OBJS) $(MKFILES) $(RUSTLLVM_HDR) \
421+
# FIXME: Building a .a is a hack so that we build with both older and newer
422+
# versions of LLVM. In newer versions some of the bits of this library are
423+
# already in LLVM itself, so they are skipped.
424+
rustllvm/rustllvmbits.a: $(RUSTLLVM_OBJS)
425+
rm -f $@
426+
ar crs $@ $^
427+
428+
rustllvm/$(CFG_RUSTLLVM): rustllvm/rustllvmbits.a $(MKFILES) $(RUSTLLVM_HDR) \
421429
$(RUSTLLVM_DEF)
422430
@$(call E, link: $@)
423-
$(Q)$(call CFG_LINK_C,$@,$(RUSTLLVM_LIBS) $(RUSTLLVM_OBJS) \
424-
$(CFG_LLVM_LIBS) $(CFG_LLVM_LDFLAGS),$(RUSTLLVM_DEF))
431+
$(Q)$(call CFG_LINK_C,$@,$(RUSTLLVM_LIBS) rustllvm/rustllvmbits.a \
432+
$(CFG_GCC_PRE_LIB_FLAGS) $(CFG_LLVM_LIBS) \
433+
$(CFG_GCC_POST_LIB_FLAGS) $(CFG_LLVM_LDFLAGS),$(RUSTLLVM_DEF))
425434

426435
ifdef CFG_BOOT_NATIVE
427436
boot/rustboot$(X): $(BOOT_CMXS) $(MKFILES)

0 commit comments

Comments
 (0)