Commit graph

441 commits

Author SHA1 Message Date
Richard Levitte
d445302418 Simplify the handling of shared library version numbers
$(SHLIB_MAJOR).$(SHLIB_MINOR) is really a synonym for
$(SHLIB_VERSION_NUMBER), and is therefore an added complexity,
so better to use $(SHLIB_VERSION_NUMBER) directly.  SHLIB_MAJOR and
SHLIB_MINOR are now unused, but are kept around purely as information
in case someone relies on their existence.

At the same time, add support for custom shared library extensions
with the three new Makefile variables SHLIB_EXT, SHLIB_EXT_SIMPLE and
SHLIB_EXT_IMPORT.  By default, they hold the variants of shared
library extensions we support.  On mingw and cygwin, SHLIB_EXT_IMPORT
is defined; on all other Unix platforms, it's empty.

An example to get shared libraries with a slightly different SOVER name:

    $ make SHLIB_EXT='.$(SHLIB_VERSION_NUMBER).so'

Fixes #3902

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3964)
2017-07-26 22:53:03 +02:00
Richard Levitte
d07abe13a7 Simplify Makefile.shared
Makefile.shared was designed to figure out static library names,
shared library names, library version compatibility, import library
names and the like on its own.  This was a design for pre-1.1.0
OpenSSL because the main Makefile didn't have all that knowledge.

With 1.1.0, the situation isn't the same, a lot more knowledge is
included in the main Makefile, and while Makefile.shared did things
right most of the time (there are some corner cases, such as the
choice of .sl or .so as DSO extension on some HPUX versions), there's
still an inherent fragility when one has to keep an eye on
Makefile.shared to make sure it produces what the main Makefile
produces.

This change simplifies Makefile.shared by removing all its
"intelligence" and have it depend entirely on the input from the main
Makefile instead.  That way, all the naming is driven from
configuration data.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3983)
2017-07-24 11:34:17 +02:00
Richard Levitte
984cf15eb5 VMS: When running a sub-MMS, make sure to give it the main MMS' qualifiers
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3880)
2017-07-07 11:31:03 +02:00
Rich Salz
624265c60e Cleanup some copyright stuff
Remove some incorrect copyright references.
Move copyright to standard place
Add OpenSSL copyright where missing.
Remove copyrighted file that we don't use any more
Remove Itanium assembler for RC4 and MD5 (assembler versions of old and
weak algorithms for an old chip)
Standardize apps/rehash copyright comment; approved by Timo
Put dual-copyright notice on mkcert

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3691)
2017-06-30 21:56:44 -04:00
Rich Salz
5407338a88 Add ECHO to makefiles for real silence
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3801)
2017-06-30 09:27:30 -04:00
Richard Levitte
619eb33a0c Add new /dev/crypto engine
Based on cryptodev-linux

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3744)
2017-06-28 12:54:33 +02:00
Richard Levitte
906eb3d031 Configure: give config targets the possibility to enable or disable features
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3745)
2017-06-22 01:24:54 +02:00
Bernd Edlinger
f8baec3924 Fix the comment about default OPENSSLDIR in windows.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3650)
2017-06-16 14:36:11 -04:00
Richard Levitte
9b03b91b84 Add the target 'build_all_generated'
This new target is used to build all generated files and only that.
This can be used to prepare everything that requires things like perl
for a system that lacks perl and then move everything to that system
and do the rest of the build there.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3695)
2017-06-16 03:48:55 +02:00
Richard Levitte
6a74806ed7 Build apps/progs.h dynamically
Because apps/progs.h isn't configuration agnostic, it's not at all
suited for 'make update' or being versioned, so change it to be
dynamically generated.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3688)
2017-06-15 19:49:21 +02:00
Rich Salz
1722496fca Remove doc of non-existent functions
Fix test for "documenting private functions"
And add -p flag to doc-nits recipe
Mark when things were deprecated, if doc'd as such

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3624)
2017-06-08 15:18:38 -04:00
Richard Levitte
edef840f23 Windows: rearrange programs cleanup
The list of programs hit nmake's maximum line length, so we split up the
line in smaller chunks.

Fixes #3634

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3636)
2017-06-08 16:57:08 +02:00
Rich Salz
52df25cf2e make error tables const and separate header file
Run perltidy on util/mkerr
Change some mkerr flags, write some doc comments
Make generated tables "const" when genearting lib-internal ones.
Add "state" file for mkerr
Renerate error tables and headers
Rationalize declaration of ERR_load_XXX_strings
Fix out-of-tree build
Add -static; sort flags/vars for options.
Also tweak code output
Moved engines/afalg to engines (from master)
Use -static flag
Standard engine #include's of errors
Don't linewrap err string tables unless necessary

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3392)
2017-06-07 15:12:03 -04:00
Richard Levitte
b3e5db40ec VMS: Make sure to include MAIN from static libraries if needed
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-24 18:09:01 +02:00
Richard Levitte
331058180a Make it possible to build static-only libraries
The trick is to use the .a extension explicitely in the build.info files.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-24 18:09:01 +02:00
Richard Levitte
cb2a6eb76e Typo fix in Configurations/descrip.mms.tmpl
... on the theme "I could have sworn I saved that fix!"

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3285)
2017-04-24 09:31:45 +02:00
Richard Levitte
757264207a Port Ben's parallell Makefile hack to VMS
As far as I know, there is no MMS / MMK with parallellism today.
However, it might be added in the future (perhaps in MMK at least), so
we may as well prepare for it now.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3282)
2017-04-23 16:17:32 +02:00
Richard Levitte
f919c12f5c Port Ben's parallell Makefile hack to Windows
jom is an nmake clone that does parallell building, via the same -j
argument as GNU make.  To make it work, we need to apply the same
dependeency build up as done in 27c40a9317

Fixes #3272

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3277)
2017-04-23 16:07:47 +02:00
Richard Levitte
19eaee749d VMS: Fix the passing of cflags for things not being installed
When building object files for libraries, information whether the
library would be installed or not wasn't passed down to the object
file building rules.

Also, make it so settings like |no_inst_lib_cflags| can be the empty
string.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3247)
2017-04-18 23:46:13 +02:00
Andy Polyakov
1bc563caa1 Configurations/README: reword bn_ops description.
Fixes GH#3116.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-04-04 23:16:03 +02:00
Richard Levitte
a2880aec73 VMS: turning off CALL_DEBUG isn't possible on Alpha
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2962)
2017-03-15 17:16:37 +01:00
Richard Levitte
1ae4c07e50 VMS: don't use /DSF, turn off CALL_DEBUG instead
It turns out that /DSF didn't do any good for our purposes.  Instead,
remove the CALL_DEBUG flag from any image we link.  This ensures that
we can have debugging information in the image files, but don't
automatically end up in a debugging session upon image activation.

Unfortunately, this means the CALL_DEBUG must be turned on when there
is a need to run with the debugger activated, and to turn it off when
done.  This has been documented in NOTES.VMS.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2957)
2017-03-15 03:09:57 +01:00
Richard Levitte
2de2df7fe8 VMS: Change debug linking method to generate a separate Debug Symbol File
That makes it possible to run images without automagically ending up
in a debug session, while still being able to debug when required.

All .DSF files must reside in the same directory to be useful.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2947)
2017-03-14 22:27:17 +01:00
Rich Salz
a3b0d46693 Handle find-doc-nits script rename
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-11 10:29:09 -05:00
Rich Salz
9e183d2271 Fix many doc L<> errors
Add 2017 copyright year
Add missing typedef to NAME
Remove ec(7) and bn(7) doc links
Remove .pod link errors, bogus links, make a few typo corrections
Fix some typo's in links and some missing items.
Don't link to C runtime functions (See OPENSSL_malloc for example/precedent)
Document ASN1_tag2str(), add a few typedef's that were missing from NAME
Update doc-nits target; addresses
    https://github.com/openssl/openssl/pull/1900#issuecomment-259943891,
Merge check-doc-links into find-doc-nits; if run regularly, would have found
    https://github.com/openssl/openssl/pull/2825

    Reviewed-by: Richard Levitte <levitte@openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2862)
2017-03-11 08:56:44 -05:00
Richard Levitte
cadb015b02 Unix Makefile: Have manual generation use the same perl script as Windows and VMS
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2863)
2017-03-06 21:38:19 +01:00
Richard Levitte
44eb65ce20 Add documentation on platform specific checks
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2851)
2017-03-06 16:42:46 +01:00
Richard Levitte
d192a3aaeb Add a platform specific configuration checker
For each platform, we may need to perform some basic checks to see
that available tools perform as we expect them.

For the moment, the added checkers test that Perl gives the expected
path format.  This should help MingW users to see if they run an
appropriate Perl implementation, for example.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2851)
2017-03-06 16:42:46 +01:00
Andy Polyakov
8cfc21f53a Configurations/10-main.conf: omit redundant -lresolv from Solaris configs.
GH#2816

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-02 16:29:57 +01:00
Andy Polyakov
28443085c7 Configurations/50-masm.conf: add /nologo to ml64 command line.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2810)
2017-03-02 14:02:25 +01:00
Andy Polyakov
fe9aa7642c appveyor.yml: engage VC-WIN64A-masm.
One of the reasons for why masm/ml64 is not [fully] supported is that
it's problematic to support multiple versions. But latest one usually
works and/or it's lesser problem to make it work. So idea here is to
have a "whistle" when it breaks, so that problems can be evaluated as
they emerge. It's kind of "best effort" thing, as opposite to "full
support".

Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-02-21 22:39:00 +01:00
Bernd Edlinger
122fa08852 remove test/.rnd on make clean
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2344)
2017-02-01 19:10:03 +01:00
Rich Salz
65c1f979ee Review comments; fail build if nits found
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2202)
2017-01-12 09:31:36 -05:00
Richard Levitte
29ee1be50c Run find-doc-nits in travis
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2202)
2017-01-12 09:31:36 -05:00
Kurt Roeckx
55ab86e4c2 Add missing -zdelete for some linux arches
b6d5ba1a9f forgot to update some linux arches.

Reviewed-by: Richard Levitte <levitte@openssl.org>

GH: #1977
2016-11-21 22:47:27 +01:00
Richard Levitte
7fbc0bfdd7 Add a modern linux-x86 config target
'linux-x86' is similar to 'linux-x86_64' but uses -m32 rather than -m64.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1924)
2016-11-16 14:08:44 +01:00
Andy Polyakov
1e19eacd6f Configurations/10-main.conf: remove obsolete flag from solaris-x86-gcc.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-15 00:23:34 +01:00
Andy Polyakov
fe9e5b9ccc Configurations/10-main.conf: document GCC for Solaris config constraint.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-15 00:23:17 +01:00
Richard Levitte
10b0b5ecd9 Revert "Move algorithm specific ppccap code from crypto/ppccap.c"
Now that we can link specifically with static libraries, the immediate
need to split ppccap.c (and eventually other *cap.c files) is no more.

This reverts commit e3fb4d3d52.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-10 16:24:02 +01:00
Richard Levitte
473a954771 Document how to force linking with static libraries
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1889)
2016-11-10 15:51:43 +01:00
Richard Levitte
186a31e510 Building: make it possible to force linking with static OpenSSL libs
Very simply, support having the .a extension to denote depending on
static libraries.  Note that this is not supported on native Windows
when building shared libraries, as there is not static library then,
just an import library with the same name.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1889)
2016-11-10 15:51:42 +01:00
Richard Levitte
5a5b85d125 descrip.mms.tmpl: Simplify fiddling of logical names record and statem
Instead of enumerating exactly those files in test/ that include
../ssl/ssl_locl.h, assume they all do.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1891)
2016-11-10 15:48:15 +01:00
Richard Levitte
e3fb4d3d52 Move algorithm specific ppccap code from crypto/ppccap.c
Having that code in one central object file turned out to cause
trouble when building test/modes_internal_test.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1883)
2016-11-09 02:40:36 +01:00
Richard Levitte
12ccb021be Unix Makefile: Make sure to use $(PERL) when running ./Configure
For consistency, it's better to use the perl that was specified to
Configure last time it was called.

Use case:

perl v5.8.8 was first along $PATH, perl v5.22.2 was available and
specified as: PERL=/opt/local/bin/perl ./config.  When make wanted to
reconfigure and called './Configure reconf', configuration broke down,
complaining about a perl that's too old.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1884)
2016-11-09 02:37:29 +01:00
Richard Levitte
475592e241 Windows: use default ZLIB1 unless --with-zlib-lib is set
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1772)
2016-11-06 22:54:08 +01:00
Richard Levitte
111b234c8f Fix the LIBZ macro on VC config targets
If zlib-dynamic was given but not --with-zlib-lib, LIBZ was defined to
the empty string.  Instead, give it the default "ZLIB1".

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1772)
2016-11-06 22:54:08 +01:00
Richard Levitte
1186a2b3d4 VMS: pretend to use -znodelete
VMS only unloads shared libraries at process rundown, so tell the
OpenSSL code so by pretending we linked with -znodelete.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1862)
2016-11-06 18:35:01 +01:00
Richard Levitte
3ee24d4aca VMS build file template: assign 'arch' to local symbol table
Since the local symbol table is looked up before the global symbol
table, 'arch' assigned in the local symbol table of the DCL where MMS
is called would be seen before the 'arch' defined in descrip.mms.
Assigning it to the local symbol table in descrip.mms removes that
issue.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1853)
2016-11-04 19:11:11 +01:00
Richard Levitte
5c3dbd2eac VMS: update the list of files that need some extra treatment
This is related to a lack in path merging involding includes of includes

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1846)
2016-11-04 15:36:25 +01:00
Richard Levitte
fb0abdceff VMS: correct the logic around linking executables
The logic around avoiding MULDEF warnings was flawed.  Simplifying it
makes it better.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1846)
2016-11-04 15:36:25 +01:00