fix link error

This commit is contained in:
Jyun-Yan You 2012-01-02 01:24:07 +08:00 committed by Brian Anderson
parent 21eadbe6f1
commit 274fc1b59c
3 changed files with 14 additions and 3 deletions

View File

@ -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 -L/usr/local/lib -lexecinfo
CFG_GCCISH_LINK_FLAGS += -shared -fPIC -lpthread -lrt
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

View File

@ -660,7 +660,10 @@ fn link_binary(sess: session::session,
}
if sess.get_targ_cfg().os == session::os_freebsd {
gcc_args += ["-lrt", "-L/usr/local/lib", "-lexecinfo"];
gcc_args += ["-lrt", "-L/usr/local/lib", "-lexecinfo",
"-L/usr/local/lib/gcc46",
"-L/usr/local/lib/gcc44", "-lstdc++",
"-Wl,-z,origin"];
}
// OS X 10.6 introduced 'compact unwind info', which is produced by the

View File

@ -33,7 +33,13 @@ snapshot_files = {
"lib/std-*.dll",
"lib/rustc-*.dll",
"lib/rustrt.dll",
"lib/rustllvm.dll"]
"lib/rustllvm.dll"],
"freebsd": ["bin/rustc",
"lib/libcore-*.so",
"lib/libstd-*.so",
"lib/librustc-*.so",
"lib/librustrt.so",
"lib/librustllvm.so"]
}
def parse_line(n, line):
@ -73,6 +79,8 @@ def get_kernel(triple):
return "winnt"
if os_name == "darwin":
return "macos"
if os_name == "freebsd":
return "freebsd"
return "linux"
def get_cpu(triple):