add missing library, enable segmented stacks for freebsd
This commit is contained in:
parent
d4884b6c6e
commit
21eadbe6f1
3 changed files with 11 additions and 10 deletions
|
@ -25,7 +25,7 @@ ifneq ($(findstring freebsd,$(CFG_OSTYPE)),)
|
|||
CFG_LIB_NAME=lib$(1).so
|
||||
CFG_LIB_GLOB=lib$(1)-*.so
|
||||
CFG_GCCISH_CFLAGS += -fPIC -I/usr/local/include
|
||||
CFG_GCCISH_LINK_FLAGS += -shared -fPIC -lpthread -lrt
|
||||
CFG_GCCISH_LINK_FLAGS += -shared -fPIC -lpthread -lrt -L/usr/local/lib -lexecinfo
|
||||
CFG_GCCISH_DEF_FLAG := -Wl,--export-dynamic,--dynamic-list=
|
||||
CFG_GCCISH_PRE_LIB_FLAGS := -Wl,-whole-archive
|
||||
CFG_GCCISH_POST_LIB_FLAGS := -Wl,-no-whole-archive
|
||||
|
|
|
@ -220,7 +220,6 @@ mod write {
|
|||
} else { FileType = LLVMAssemblyFile; }
|
||||
// Write optimized bitcode if --save-temps was on.
|
||||
|
||||
let seg_stack = sess.get_targ_cfg().os != session::os_freebsd;
|
||||
if opts.save_temps {
|
||||
// Always output the bitcode file with --save-temps
|
||||
|
||||
|
@ -245,7 +244,7 @@ mod write {
|
|||
buf_o,
|
||||
LLVMAssemblyFile,
|
||||
CodeGenOptLevel,
|
||||
seg_stack)})});
|
||||
true)})});
|
||||
}
|
||||
|
||||
|
||||
|
@ -265,7 +264,7 @@ mod write {
|
|||
buf_o,
|
||||
LLVMObjectFile,
|
||||
CodeGenOptLevel,
|
||||
seg_stack)})});
|
||||
true)})});
|
||||
}
|
||||
} else {
|
||||
// If we aren't saving temps then just output the file
|
||||
|
@ -283,7 +282,7 @@ mod write {
|
|||
buf_o,
|
||||
FileType,
|
||||
CodeGenOptLevel,
|
||||
seg_stack)})});
|
||||
true)})});
|
||||
}
|
||||
// Clean up and return
|
||||
|
||||
|
@ -661,7 +660,7 @@ fn link_binary(sess: session::session,
|
|||
}
|
||||
|
||||
if sess.get_targ_cfg().os == session::os_freebsd {
|
||||
gcc_args += ["-lrt"];
|
||||
gcc_args += ["-lrt", "-L/usr/local/lib", "-lexecinfo"];
|
||||
}
|
||||
|
||||
// OS X 10.6 introduced 'compact unwind info', which is produced by the
|
||||
|
|
|
@ -14,21 +14,23 @@
|
|||
.globl GET_SP
|
||||
.globl CHECK_STACK
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__)
|
||||
RECORD_SP:
|
||||
movq %rdi, %fs:112
|
||||
ret
|
||||
#else
|
||||
#if defined(__APPLE__)
|
||||
#elif defined(__APPLE__)
|
||||
RECORD_SP:
|
||||
movq $0x60+90*8, %rsi
|
||||
movq %rdi, %gs:(%rsi)
|
||||
ret
|
||||
#elif defined(__FreeBSD__)
|
||||
RECORD_SP:
|
||||
movq %rdi, %fs:24
|
||||
ret
|
||||
#else
|
||||
RECORD_SP:
|
||||
ret
|
||||
#endif
|
||||
#endif
|
||||
|
||||
GET_SP:
|
||||
movq %rsp, %rax
|
||||
|
|
Loading…
Add table
Reference in a new issue