compiler: filter out -lrt flaf for OXS
authorJean Privat <jean@pryen.org>
Thu, 23 Jul 2015 14:58:08 +0000 (10:58 -0400)
committerJean Privat <jean@pryen.org>
Thu, 23 Jul 2015 14:58:08 +0000 (10:58 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/abstract_compiler.nit

index 43686ae..7f3e924 100644 (file)
@@ -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("$","$$")}")