Commit 5cb43f32 authored by Kirill Smelkov's avatar Kirill Smelkov

openssl: Allow it to be build with make -jN N > 1

There is a story for OpenSSL build to be broken for `make -j`. Gentoo-
and various other people proposed fixes, at least from 2008, but for
some reasons (patch does not work with BSD make, upstream forgot to
apply, etc) they are not applied to main codebase.

What we can do is to "cherry-pick" the patch from Gentoo to speed-up
OpenSSL build. On a typical 8-cores i7 node, with the following test
buildout:

    [buildout]
    extends =
      slapos/stack/slapos.cfg
      slapos/component/openssl/buildout.cfg

after full build

                    time (rm -rf parts/openssl && ./bin/buildout install openssl)

    MAKEFLAGS=-j1   1m48s
    MAKEFLAGS=-j8   0m53s

and the timing does not subtract time to e.g. download the package from
network, so the building speedup itself is even more.

/cc @kazuhiko
parent e8f90a8d
......@@ -22,6 +22,7 @@ patch-binary = ${patch:location}/bin/patch
patches =
${:_profile_base_location_}/openssl-nodoc.patch#dd1345ae7ed18ccf176bc6b77c516f98
${:_profile_base_location_}/openssl-exlibs.patch#fba5c873cf974ba80a973be41da3c738
${:_profile_base_location_}/openssl-1.0.1m-parallel-build.patch#a1ddd93b5b296473c7446131deb31f93
patch-options = -p1
configure-command = ./config
configure-options =
......@@ -33,10 +34,6 @@ configure-options =
shared no-idea no-mdc2 no-rc5 zlib
-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib
&& make depend
# it seems that parallel build sometimes fails for openssl.
make-options =
-j1
make-targets =
all install_sw && rm -f ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/* && for i in ${ca-certificates:location}/certs/*/*.crt; do ln -sv $i ${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl/certs/`${buildout:parts-directory}/${:_buildout_section_name_}/bin/openssl x509 -hash -noout -in $i`.0; done; true
environment =
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment