Skip to content

Commit bb99998

Browse files
committed
---
yaml --- r: 6794 b: refs/heads/master c: cb5f636 h: refs/heads/master v: v3
1 parent 736a99f commit bb99998

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
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: 68f4849f0f52bc37fc24a36fb7e14002bdb2cd61
2+
refs/heads/master: cb5f636ff14c09411c5dab7475db6802bd993f40

trunk/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
7676
CFG_LIB_GLOB=lib$(1)-*.dylib
7777
CFG_UNIXY := 1
7878
CFG_LDENV := DYLD_LIBRARY_PATH
79-
CFG_GCCISH_LINK_FLAGS += -dynamiclib -lpthread -framework CoreServices
79+
CFG_GCCISH_LINK_FLAGS += -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind
8080
CFG_GCCISH_DEF_FLAG := -Wl,-exported_symbols_list,
8181
# Darwin has a very blurry notion of "64 bit", and claims it's running
8282
# "on an i386" when the whole userspace is 64-bit and the compiler

trunk/src/comp/back/link.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,14 @@ fn link_binary(sess: session::session,
657657
gcc_args += ["-lrt", "-ldl"];
658658
}
659659

660+
// OS X 10.6 introduced 'compact unwind info', which is produced by the
661+
// linker from the dwarf unwind info. Unfortunately, it does not seem to
662+
// understand how to unwind our __morestack frame, so we have to turn it
663+
// off. This has impacted some other projects like GHC.
664+
if sess.get_targ_cfg().os == session::os_macos {
665+
gcc_args += ["-Wl,-no_compact_unwind"];
666+
}
667+
660668
// Stack growth requires statically linking a __morestack function
661669
gcc_args += ["-lmorestack"];
662670

0 commit comments

Comments
 (0)