Explorar el Código

Backed out some misinformed changes, and made gcc-dependent thread library inclusion consistent across platforms.

Ralf S. Engelschall hace 24 años
padre
commit
62597925e2
Se han modificado 1 ficheros con 14 adiciones y 1 borrados
  1. 14 1
      pgp2/pgp2.spec

+ 14 - 1
pgp2/pgp2.spec

@@ -68,7 +68,20 @@ AutoReqProv:  no
 
 %build
     cd src
-    CC="%{l_cc}"
+    CC="%{l_cc}" CFLAGS="%{l_cflags -O}"
+    CFLAGS="%{l_cflags -O}"
+    case "%{l_target}" in
+        *-freebsd* )
+            if ( %{l_cc} --version | grep -i -e "gcc" ); then
+                CFLAGS="$CFLAGS -pthread"
+            fi
+            ;;
+        *-solaris* )
+            if ( %{l_cc} --version | grep -i -e "gcc" ); then
+                CFLAGS="$CFLAGS -pthreads"
+            fi
+            ;;
+    esac
     case "%{l_target}" in
         *-freebsd* )
             OS=freebsd