on master help sign in
Work around bug in glibc 2.11
commitf744f1c1dd9dde19820200169f8bf5453b832916 authorMiëtek Bak <mietek@bak.io> dateTue 9 Dec 2014, 22:50 (12 years ago) parent12c7a1b
1 file changed+9
rts/Makefile+9
rts/Makefile+9
@@ -8,6 +8,15 @@ CFLAGS:=-fPIC $(CFLAGS)
88CFLAGS += $(GMP_INCLUDE_DIR) $(GMP) -DIDRIS_TARGET_OS="\"$(OS)\""
99CFLAGS += -DIDRIS_TARGET_TRIPLE="\"$(MACHINE)\""
1010
11+# NOTE: This works around glibc 2.11 not declaring pthread_mutexattr_settype
12+# and PTHREAD_MUTEX_RECURSIVE by default, causing compilation failures on
13+# Debian 6 and Ubuntu 10.04 LTS.
14+ifeq ($(OS), unix)
15+ifneq ($(shell ldd --version | head -n 1 | grep 2.11),)
16+ CFLAGS += -D_GNU_SOURCE
17+endif
18+endif
19+
1120ifeq ($(OS), windows)
1221 OBJS += windows/idris_stdfgn.o windows/idris_net.o
1322else