Просмотр исходного кода

Enforce use of GNU pth for OpenLDAP. This fixes crashes that occur under heavy parallel load in preemtive threading enviroments (Solaris) where slapd(8C) incorrectly assumes underlying libraries like db are being built threading aware and take care of appropriate locking. This is not the case in OpenPKG because db is using non-Pthread mutex. As a side effect our test setup not only passes a stress test where it broke previously but also indicates a performance boost by factor 3.5 on Solaris 8 and factor 4 on Solaris 9. There's neither gain nor pain in reliability and performance for FreeBSD4. Others were not tested.

Thomas Lotterer 21 лет назад
Родитель
Сommit
d95fcb8c08
1 измененных файлов с 6 добавлено и 5 удалено
  1. 6 5
      openldap/openldap.spec

+ 6 - 5
openldap/openldap.spec

@@ -53,8 +53,8 @@ Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
 BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc
 PreReq:       OpenPKG, openpkg >= 20040130
-BuildPreReq:  readline, openssl, db >= 4.2
-PreReq:       readline, openssl, db >= 4.2
+BuildPreReq:  readline, openssl, db >= 4.2, pth
+PreReq:       readline, openssl, db >= 4.2, pth
 %if "%{with_fsl}" == "yes"
 BuildPreReq:  fsl >= 1.2.0
 PreReq:       fsl >= 1.2.0
@@ -101,10 +101,10 @@ AutoReqProv:  no
     cf="%{l_cppflags}"
 %endif
     CC="%{l_cc}" \
-    CFLAGS="%{l_cflags -O}" \
+    CFLAGS="%{l_cflags -O} `%{l_prefix}/bin/pth-config --cflags`" \
     CPPFLAGS="$cf" \
-    LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
-    LIBS="%{l_fsl_libs}" \
+    LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/pth-config --ldflags` %{l_fsl_ldflags}" \
+    LIBS="`%{l_prefix}/bin/pth-config --libs` %{l_fsl_libs}" \
     ./configure \
         --cache-file=./config.cache \
         --prefix=%{l_prefix} \
@@ -153,6 +153,7 @@ AutoReqProv:  no
 %endif
         --with-dyngroup \
         --with-proxycache \
+        --with-threads=pth \
         --enable-slurpd
 
     #   build toolkit