소스 검색

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 년 전
부모
커밋
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