From ad037dac641142eac92ffd9dfd79da25cb2caf6e Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 23 Jul 2015 10:58:08 -0400 Subject: [PATCH] compiler: filter out -lrt flaf for OXS Signed-off-by: Jean Privat --- src/compiler/abstract_compiler.nit | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index 43686ae..7f3e924 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -389,6 +389,15 @@ endif makefile.write("CFLAGS += -D NO_STACKTRACE\n\n") end + makefile.write """ +# Special configuration for Darwin +ifeq ($(uname_S),Darwin) + # Remove POSIX flag -lrt + LDLIBS := $(filter-out -lrt,$(LDLIBS)) +endif + +""" + makefile.write("all: {outpath}\n") if outpath != real_outpath then makefile.write("\tcp -- {outpath.escape_to_sh} {real_outpath.escape_to_sh.replace("$","$$")}") -- 1.7.9.5