diff options
| author | Patrick Walton <[email protected]> | 2011-03-24 11:26:46 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-24 11:26:46 -0700 |
| commit | a2b9a7ce8f1246e9d8b0d65ba3d989a2b2d25451 (patch) | |
| tree | 3572daf3796a9e7590fb4956372cfc027af41f01 /Makefile.in | |
| parent | XFAIL floating point tests in rustc to put out burning tinderbox (diff) | |
| download | rust-a2b9a7ce8f1246e9d8b0d65ba3d989a2b2d25451.tar.xz rust-a2b9a7ce8f1246e9d8b0d65ba3d989a2b2d25451.zip | |
rustc: Use a .def file for Darwin. Puts out burning Darwin tinderbox.
Diffstat (limited to 'Makefile.in')
| -rw-r--r-- | Makefile.in | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in index fc8aa7e5..a0f7a11f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -31,18 +31,21 @@ ifeq ($(CFG_OSTYPE), FreeBSD) endif CFG_UNIXY := 1 CFG_LDENV := LD_LIBRARY_PATH + CFG_DEF_SUFFIX := .bsd.def endif ifeq ($(CFG_OSTYPE), Linux) CFG_LIB_NAME=lib$(1).so CFG_GCC_CFLAGS += -fPIC -march=i686 CFG_GCC_LINK_FLAGS += -shared -fPIC -ldl -lpthread -lrt + CFG_GCC_DEF_FLAG := ifeq ($(CFG_CPUTYPE), x86_64) CFG_GCC_CFLAGS += -m32 CFG_GCC_LINK_FLAGS += -m32 endif CFG_UNIXY := 1 CFG_LDENV := LD_LIBRARY_PATH + CFG_DEF_SUFFIX := .linux.def endif ifeq ($(CFG_OSTYPE), Darwin) @@ -50,6 +53,7 @@ ifeq ($(CFG_OSTYPE), Darwin) CFG_UNIXY := 1 CFG_LDENV := DYLD_LIBRARY_PATH CFG_GCC_LINK_FLAGS += -dynamiclib -lpthread + CFG_GCC_DEF_FLAG := -exported_symbols_list # Darwin has a very blurry notion of "64 bit", and claims it's running # "on an i386" when the whole userspace is 64-bit and the compiler # emits 64-bit binaries by default. So we just force -m32 here. Smarter @@ -57,6 +61,7 @@ ifeq ($(CFG_OSTYPE), Darwin) CFG_GCC_CFLAGS += -m32 CFG_GCC_LINK_FLAGS += -m32 CFG_DSYMUTIL := dsymutil + CFG_DEF_SUFFIX := .darwin.def endif ifneq ($(findstring MINGW,$(CFG_OSTYPE)),) @@ -84,6 +89,7 @@ ifdef CFG_WINDOWSY endif CFG_GCC_CFLAGS += -march=i686 CFG_GCC_LINK_FLAGS += -shared -fPIC + CFG_DEF_SUFFIX := .def endif ifdef CFG_UNIXY @@ -141,16 +147,12 @@ ifdef CFG_GCC CFG_GCC_LINK_FLAGS += -g CFG_COMPILE_C = $(CFG_GCC_CROSS)g++ $(CFG_GCC_CFLAGS) -c -o $(1) $(2) CFG_DEPEND_C = $(CFG_GCC_CROSS)g++ $(CFG_GCC_CFLAGS) -MT "$(1)" -MM $(2) + CFG_LINK_C = $(CFG_GCC_CROSS)g++ $(CFG_GCC_LINK_FLAGS) -o $(1) \ + $(CFG_GCC_DEF_FLAG) $(3) $(2) else CFG_ERR := $(error please try on a system with gcc) endif -ifdef CFG_WINDOWSY - CFG_LINK_C = $(CFG_GCC_CROSS)g++ $(CFG_GCC_LINK_FLAGS) -o $(1) $(3) $(2) -else - CFG_LINK_C = $(CFG_GCC_CROSS)g++ $(CFG_GCC_LINK_FLAGS) -o $(1) $(2) -endif - ifdef CFG_OCAMLC_OPT $(info cfg: have ocaml native compiler) OPT=.opt @@ -342,7 +344,7 @@ RUNTIME_HDR := rt/globals.h \ rt/test/rust_test_runtime.h \ rt/test/rust_test_util.h -RUNTIME_DEF := $(S)src/rt/rustrt.def +RUNTIME_DEF := $(S)src/rt/rustrt$(CFG_DEF_SUFFIX) RUNTIME_INCS := -I $(S)src/rt/isaac -I $(S)src/rt/uthash RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o) @@ -354,7 +356,7 @@ RUSTLLVM_CS := $(addprefix rustllvm/, \ MachOObjectFile.cpp Object.cpp RustWrapper.cpp) RUSTLLVM_HDR := rustllvm/include/llvm-c/Object.h -RUSTLLVM_DEF := $(S)src/rustllvm/rustllvm.def +RUSTLLVM_DEF := $(S)src/rustllvm/rustllvm$(CFG_DEF_SUFFIX) RUSTLLVM_INCS := -iquote $(CFG_LLVM_INCDIR) \ -iquote $(S)src/rustllvm/include |