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
} 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
buf_o,
LLVMAssemblyFile,
CodeGenOptLevel,
- seg_stack)})});
+ true)})});
}
buf_o,
LLVMObjectFile,
CodeGenOptLevel,
- seg_stack)})});
+ true)})});
}
} else {
// If we aren't saving temps then just output the file
buf_o,
FileType,
CodeGenOptLevel,
- seg_stack)})});
+ true)})});
}
// Clean up and return
}
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
.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