Skip to content

Commit

Permalink
Fix no-stdio and no-autoalginit
Browse files Browse the repository at this point in the history
no-stdio does not work with the apps. Since the tests also need the apps
it doesn't support that either. Therefore we disable building of both.

no-autoalginit is not compatible with the apps because it requires explicit
loading of the algorithms, and the apps don't do that. Therefore we disable
building the apps for this option. Similarly the tests depend on the apps
so we also disable the tests. Finally the whole point about no-autoalginit
is to avoid excessive executable sizes when doing static linking. Therefore
we disable "shared" if this option is selected.

Reviewed-by: Richard Levitte <[email protected]>
  • Loading branch information
mattcaswell committed Apr 14, 2016
1 parent c3a64b5 commit d90a6be
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 223 deletions.
4 changes: 4 additions & 0 deletions Configurations/descrip.mms.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ build_tests_nodep : $(TESTPROGS)
test tests : configdata.pm, -
build_apps_nodep, build_engines_nodep, build_tests_nodep, -
depend
@ ! {- output_off() if $disabled{tests}; "" -}
SET DEFAULT [.test]{- move("test") -}
DEFINE SRCTOP {- sourcedir() -}
DEFINE BLDTOP {- builddir() -}
Expand All @@ -235,6 +236,9 @@ test tests : configdata.pm, -
DEASSIGN BLDTOP
DEASSIGN SRCTOP
SET DEFAULT [-]{- move("..") -}
@ ! {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
@ WRITE SYS$OUTPUT "Tests are not supported with your chosen Configure options"
@ ! {- output_on() if !$disabled{tests}; "" -}

list-tests :
@ TOP=$(SRCDIR) PERL=$(PERL) $(PERL) {- catfile($config{sourcedir},"test", "run_tests.pl") -} list
Expand Down
4 changes: 4 additions & 0 deletions Configurations/unix-Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,16 @@ build_tests_nodep: $(TESTPROGS)

test tests: build_tests_nodep build_apps_nodep build_engines_nodep \
depend link-utils
@ : {- output_off() if $disabled{tests}; "" -}
( cd test; \
SRCTOP=../$(SRCDIR) \
BLDTOP=../$(BLDDIR) \
EXE_EXT={- $exeext -} \
OPENSSL_ENGINES=../$(BLDDIR)/engines \
$(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
@ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
@echo "Tests are not supported with your chosen Configure options"
@ : {- output_on() if !$disabled{tests}; "" -}

list-tests:
@TOP=$(SRCDIR) PERL=$(PERL) $(PERL) $(SRCDIR)/test/run_tests.pl list
Expand Down
4 changes: 4 additions & 0 deletions Configurations/windows-makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,14 @@ build_tests: configdata.pm build_tests_nodep depend
build_tests_nodep: $(TESTPROGS)

test tests: build_tests_nodep build_apps_nodep build_engines_nodep depend
@rem {- output_off() if $disabled{tests}; "" -}
set SRCTOP=$(SRCDIR)
set BLDTOP=$(BLDDIR)
set PERL=$(PERL)
$(PERL) $(SRCDIR)\test\run_tests.pl $(TESTS)
@rem {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
@echo "Tests are not supported with your chosen Configure options"
@rem {- output_on() if !$disabled{tests}; "" -}

list-tests:
@set TOP=$(SRCDIR)
Expand Down
6 changes: 6 additions & 0 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ my @disable_cascades = (
"pic" => [ "shared" ],
"shared" => [ "dynamic-engine" ],
"engine" => [ "afalgeng" ],

# no-autoalginit is only useful when building non-shared
"autoalginit" => [ "shared", "apps" ],

"stdio" => [ "apps" ],
"apps" => [ "tests" ],
"comp" => [ "zlib" ],
sub { !$disabled{"unit-test"} } => [ "heartbeats" ],
);
Expand Down
36 changes: 19 additions & 17 deletions apps/build.info
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{- use File::Spec::Functions qw/catdir rel2abs/; -}
PROGRAMS=openssl
SOURCE[openssl]=\
openssl.c \
asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c \
dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c \
genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c \
pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c \
s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c \
srp.c ts.c verify.c version.c x509.c rehash.c \
apps.c opt.c s_cb.c s_socket.c \
app_rand.c \
{- $target{apps_aux_src} -}
INCLUDE[openssl]={- rel2abs(catdir($builddir,"../include")) -} .. ../include
DEPEND[openssl]=../libssl
IF[{- !$disabled{apps} -}]
PROGRAMS=openssl
SOURCE[openssl]=\
openssl.c \
asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c \
dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c \
genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c \
pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c \
s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c \
srp.c ts.c verify.c version.c x509.c rehash.c \
apps.c opt.c s_cb.c s_socket.c \
app_rand.c \
{- $target{apps_aux_src} -}
INCLUDE[openssl]={- rel2abs(catdir($builddir,"../include")) -} .. ../include
DEPEND[openssl]=../libssl

SCRIPTS=CA.pl tsget
SOURCE[CA.pl]=CA.pl.in
SOURCE[tsget]=tsget.in
SCRIPTS=CA.pl tsget
SOURCE[CA.pl]=CA.pl.in
SOURCE[tsget]=tsget.in
ENDIF
Loading

0 comments on commit d90a6be

Please sign in to comment.