Skip to content

Commit

Permalink
Add FreeBSD support in the Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
robarnold authored and graydon committed Feb 9, 2011
1 parent 8c0d350 commit 6e39102
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Makefile
Expand Up @@ -32,6 +32,26 @@ CFG_RUSTC_FLAGS := -nowarn
# embedded into the executable, so use a no-op command.
DSYMUTIL := true

ifeq ($(CFG_OSTYPE), FreeBSD)
CFG_RUNTIME := librustrt.so
CFG_STDLIB := libstd.so
CFG_GCC_CFLAGS += -fPIC -march=i686 -I/usr/local/include
CFG_GCC_LINK_FLAGS += -shared -fPIC -lpthread -lrt
ifeq ($(CFG_CPUTYPE), x86_64)
CFG_GCC_CFLAGS += -m32
CFG_GCC_LINK_FLAGS += -m32
endif
CFG_NATIVE := 1
CFG_UNIXY := 1
CFG_VALGRIND := $(shell which valgrind)
ifdef CFG_VALGRIND
CFG_VALGRIND += --leak-check=full \
--error-exitcode=1 \
--quiet --vex-iropt-level=0 \
--suppressions=etc/x86.supp
endif
endif

ifeq ($(CFG_OSTYPE), Linux)
CFG_RUNTIME := librustrt.so
CFG_STDLIB := libstd.so
Expand Down

0 comments on commit 6e39102

Please sign in to comment.