summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-16 14:12:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-16 14:13:48 +0200
commit42852bb7a33fcfac793224d12cb46ba2f4c8e598 (patch)
tree668338080db4858a8cde33b0a9a32294106aee88 /external
parente71a61bc09a15cdcec872c2b281c9884401cfb7f (diff)
Help openldap configure along when CC contains -fsanitize=address on Linux
Change-Id: Ie1cebb9884d580d5e2bb0e885a22ee04b92aecb5
Diffstat (limited to 'external')
-rw-r--r--external/openldap/ExternalProject_openldap.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/external/openldap/ExternalProject_openldap.mk b/external/openldap/ExternalProject_openldap.mk
index 1b919f41355e..6fc4f51036d8 100644
--- a/external/openldap/ExternalProject_openldap.mk
+++ b/external/openldap/ExternalProject_openldap.mk
@@ -15,6 +15,17 @@ $(eval $(call gb_ExternalProject_register_targets,openldap,\
build \
))
+openldap_LDFLAGS =
+ifneq ($(SYSTEM_NSS),)
+openldap_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
+ $(if $(filter AIX,$(OS)),-Wl$(COMMA)-brtl)
+endif
+# Help openldap's configure determine that it needs -lpthread even if libasan.so
+# contains a pthread_create override:
+ifneq ($(filter -fsanitize=address,$(CC)),)
+openldap_LDFLAGS += -pthread
+endif
+
$(call gb_ExternalProject_get_state_target,openldap,build) :
$(call gb_ExternalProject_run,build,\
./configure \
@@ -34,8 +45,8 @@ $(call gb_ExternalProject_get_state_target,openldap,build) :
, \
CPPFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include" \
CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include" \
- LDFLAGS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib $(if $(filter AIX,$(OS)),-Wl$(COMMA)-brtl)" \
) \
+ $(if $(openldap_LDFLAGS),LDFLAGS="$(openldap_LDFLAGS)") \
&& MAKEFLAGS= && $(MAKE) \
)