0.9.13.47: Thread safety miscellania
[sbcl.git] / src / runtime / Config.x86-freebsd
index 149a999..423dc5a 100644 (file)
@@ -1,7 +1,23 @@
+# -*- makefile -*- for the C-level run-time support for SBCL
+
+# This software is part of the SBCL system. See the README file for
+# more information.
+#
+# This software is derived from the CMU CL system, which was
+# written at Carnegie Mellon University and released into the
+# public domain. The software is in the public domain and is
+# provided with absolutely no warranty. See the COPYING and CREDITS
+# files for more information.
+
 include Config.x86-bsd
 
-# Until sbcl-0.6.7.3, we used "OS_LINK_FLAGS=-static" here, which
+ASSEM_SRC += ldso-stubs.S
+
+# Until sbcl-0.6.7.3, we used "LINKFLAGS+=-static" here, which
 # worked fine for most things, but LOAD-FOREIGN & friends require
 # dlopen() etc., which in turn depend on dynamic linking of the
 # runtime.
-OS_LINK_FLAGS = -dynamic -export-dynamic
+LINKFLAGS += -dynamic -export-dynamic
+LINKFLAGS += $(shell if grep LISP_FEATURE_SB_THREAD genesis/config.h \
+                      > /dev/null 2>&1; \
+                   then echo "-lpthread"; fi)