1182 Commits

Author SHA1 Message Date
Matt Caswell
f4764841dc Update copyright year
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9848)
2019-09-10 13:59:11 +01:00
Dr. Matthias St. Pierre
d374a61bb7 Configure: clang: add -Wno-unknown-warning-option
Fixes travis build errors due to clang

    error: unknown warning option '-Wno-extended-offsetof'

It seems like '-Wextended-offsetof' was removed from clang in version 6.0.0,
(see [1], [2]). While gcc ignores unknown options of the type '-Wno-xxx',
clang by default issues a warning [-Wunknown-warning-option] (see [3]), which
together with '-Werror' causes the build to fail.

This commit adds the '-Wno-unknown-warning-option' option to make clang
behave more relaxed like gcc.

[1] https://reviews.llvm.org/D40267
[2] https://github.com/llvm/llvm-project/commit/52a3ca9e2909
[3] https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option

[extended tests]

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9804)
2019-09-08 01:55:14 +02:00
Richard Levitte
013aefc5f0 Configuration: make sure the shared_sources table doesn't contain empty elements
Fixes #7634

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7635)

(cherry picked from commit 0c594ccc29f6ba241627f436ba3d05fc400d1066)
2018-11-13 23:53:54 +01:00
Richard Levitte
32096fdac9 Check early that the config target exists and isn't a template
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6885)

(cherry picked from commit 4e360445473c3da938703a8142a36cf6ee86a191)
2018-08-07 17:22:55 +02:00
Richard Levitte
36e732b00c Configure death handler: instead of printing directly, amend the message
This is done by calling die again, just make sure to reset the __DIE__
handler first.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6776)

(cherry picked from commit eb807d5383fd228a5c4cf9afc2fec487e0d22cee)
2018-07-24 22:15:29 +02:00
Richard Levitte
f65389acaa Configure death handler: remember to call original death handler
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6776)

(cherry picked from commit 88accfe6dccf904fec5a17db4a59cd2c4c480382)
2018-07-24 22:15:28 +02:00
Richard Levitte
64eae7475e Configure death handler: bail out early when run in eval block
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6776)

(cherry picked from commit 1a6c30029802179ebe0ec1eedfdc9d78bb6dc4dd)
2018-07-24 22:15:28 +02:00
Richard Levitte
bb8befc660 Configure: print generic advice when dying
On the same note, change the 'NASM not found' message to give specific
advice on how to handle the failure.

Fixes #6765

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6771)

(cherry picked from commit 8937a4ed8ac3fd64be61e9ce7a16bccccf3d2273)
2018-07-24 16:31:58 +02:00
Richard Levitte
a0d893f9b4 Configure: Display error/warning on deprecated/unsupported options after loop
Fixes #6755

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6759)

(cherry picked from commit ddbe700e93e34694519d303e1b4e4525184c9dad)
2018-07-22 11:07:39 +02:00
Todd Short
29627a364b Configure: fix Mac OS X builds that still require makedepend
Earlier Apple Xcode compilers, e.g. one targeting Mac OS X 10.7, don't
support dependency generation and one still has to use makedepend.  It's
unclear when it was fixed, but all clang-based Apple compilers seem to
support -M options.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6167)
2018-05-05 21:03:24 +02:00
Matt Caswell
f520f134d1 Update copyright year
Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-03-27 13:43:23 +01:00
Richard Levitte
d8bb766bdc Configure: catch the build tree configdata.pm
There are things depending on configdata.pm.  However, it's perfectly
possible that there is one in the source directory from a previous
build, and that might disrupt an out of source build.  To avoid this
conflict, make sure never to use the source tree configdata.pm in that
case, i.e. make the hard assumption that it's a generated file in the
build tree, which it is.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5546)

(cherry picked from commit 846e4c4d650da50f049ee74901e840ffe409fa69)
2018-03-10 09:53:48 +01:00
Richard Levitte
5cdc23a3e5 Configure: don't mangle the directory again when checking DEPEND inclusion
When generating the correct inclusion directory for DEPEND, we mangled
it to be relative to the build or the source directory.  However, the
value we handle already come with a correct directory, so we only need
to use it as is.

Fixes #5543

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5546)

(cherry picked from commit 906032d5a04f8cf8af5f515e0a8ea44a2285a2cc)
2018-03-10 09:51:58 +01:00
Richard Levitte
b91891043d Configure: if a file is generated, never assume it's in the source dir
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5355)

(cherry picked from commit 9b7e82f8d939ca6894f941268b219da55f069b26)
2018-02-13 21:12:26 +01:00
Richard Levitte
b09aa2709d Don't define OPENSSL_NO_ERR for the command line
It's already in opensslconf.h, which is included where this is relevant.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5188)

(cherry picked from commit 711a8b999e7a0733f349e7f330fa3fa013e995fd)
2018-01-29 15:28:28 +01:00
Richard Levitte
425df74ab6 Remove $no_sse2, as it's just a 'copy' of $disabled{sse2}
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5188)

(cherry picked from commit 0d59958c4999a456531835d0b61ba4eaecceaf86)
2018-01-29 15:27:07 +01:00
Richard Levitte
8054342b78 Configure: ensure that a DEPEND generates the correct inclusion directory
We incorrectly assumed that explicit dependencies meant that the
source directory would be added for inclusion.  However, if the
dependent file is generated, it's stored in the build directory, and
that should be used for inclusion rather than the source directory.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5153)

(cherry picked from commit e431bcfabd72163b0ee89674e2face26a349ba9c)
2018-01-24 15:57:03 +01:00
Richard Levitte
6a8dfb90b5 Configure: let INCLUDEs set on binaries "trickle down" to the objects
This ensures that only one set of includes is associated with each
object file, reagardless of where it's used.

For example, if apps/build.info has this:

    SOURCE[openssl]=foo.c
    INCLUDE[openssl]=.. ../include

and test/build.info has this:

    SOURCE[footest]=../apps/foo.c
    INCLUDE[footest]=../include

The inclusion directories used for apps/foo.o would differ depending
on which program's dependencies get generated first in the build file.

With this change, all those INCLUDEs get combined into one set of
inclusion directories tied to the object file.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5153)

(cherry picked from commit 1b5ad51fc9b29d8893d5224f00bb3360f8aca465)
2018-01-24 15:56:57 +01:00
Richard Levitte
bda1af6d5f Configure: try to make sure every config target name is unique
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5047)

(cherry picked from commit 225f980d22dfe66aa3945c21609042c32284e61c)
2018-01-09 20:48:37 +01:00
Richard Levitte
f70425d3ac Configure: cleanup @disable_cascade
'rsa', 'sha' and 'tlsext' can't be disabled, not even as a consequence
of other conditions, so having cascading disables that depend on them
is futile.  Clean up!

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4693)

(cherry picked from commit 89635075d84353fc0c3d44a82fd0903ccd4ab24a)
2017-11-07 16:31:17 +01:00
Richard Levitte
470a601705 Consolidate the locations where we have our internal perl modules
Instead of having perl modules under test/testlib and util,
consolidate them all to be inside util/perl.

(this is an adaptation of the part of #4069 that wasn't included in #4666)

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4667)
2017-11-05 22:58:10 +01:00
Richard Levitte
b81cfa07ad Perl: Use our own globbing wrapper rather than File::Glob::glob
File::Glob::glob is deprecated, it's use generates this kind of
message:

    File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. at ../master/Configure line 277.

The first idea was to use a construction that makes the caller glob()
use File::Glob::bsd_glob().  That turned out not to work well
everywhere, so instead, we make our own wrapper, OpenSSL::Glob and use
that.

Fixes #4636

(this is an adaptation of #4040 and part of #4069, for 1.1.0)

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4666)
2017-11-05 22:57:06 +01:00
Richard Levitte
583d8f6342 Disable the EGD seeding meachanism when stdio is disabled
crypto/rand/rand_egd.c makes extensive use of stdio functions.  When
they are disabled, it makes sense to disable egd as well.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4358)

(cherry picked from commit 15a1bd0ab2950671686cea51f4218c8f3d92fad9)
2017-09-12 08:04:04 +02:00
Andy Polyakov
3daecf16bd Configure: base compiler-specific decisions on pre-defines.
The commit subject is a bit misleading in sense that decisions affect
only gcc and gcc-alikes, like clang, recent icc...

This is back-port of 54cf3b981afcbbd3754c8ba1114ab6a658d86c08, GH#4281.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-09-01 08:56:26 +02:00
Richard Levitte
ef6d11f76f Revert "Perl: Use File::Glob::bsd_glob rather than File::Glob::glob"
This needs more change that what is appropriate for the 1.1.0 branch.

This reverts commit 0401110073cd392602855f9b72af2ebec7909625.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2017-08-03 17:21:15 +02:00
Richard Levitte
0401110073 Perl: Use File::Glob::bsd_glob rather than File::Glob::glob
File::Glob::glob is deprecated, it's use generates this kind of
message:

    File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. at ../master/Configure line 277.

So instead, use a construction that makes the caller glob() use
File::Glob::bsd_glob().

Note that we're still excluding VMS, as it's directory specs use '['
and ']', which have a different meaning with bsd_glob and would need
some extra quoting.  This might change, but later.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4040)

(cherry picked from commit 102c9e1296b656c4049c1110abc8a52b43bd0dcf)
2017-07-28 14:47:55 +02:00
Benjamin Kaduk
6fd603ab2f Remove duplicates from clang_devteam_warnings
Since the clang_devteam_warnings are appended to the gcc_devteam_warnings
when strict-warnings are requested, any items present in both the gcc
and clang variables will be duplicated in the cflags used for clang builds.
Remove the extra copy from the clang-specific flags in favor of the
gcc_devteam_warnings that are used for all strict-warnings builds.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3239)
(cherry picked from commit 96db26919d5caff2db6340354a026f56dc6f09da)

[extended tests]
2017-06-20 13:35:33 -04:00
Benjamin Kaduk
725f121dcf Add -Wextra to gcc devteam warnings
clang already has it; let's flip the switch and deal with the fallout.
Exclude -Wunused-parameter, as we have many places where we keep unused
parameters to conform to a uniform vtable-like interface.
Also exclude -Wmissing-field-initializers; it's okay to rely on
the standard-mandated behavior of filling out with 0/NULL.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3239)
(cherry picked from commit 560ad13c74fe6967991a2429d90eeeba815d1f9e)
2017-06-20 13:35:33 -04:00
Paul Yang
0e0a9ae30b Remove non-accurate description in Configure script
For DES and 3DES based ciphers are also enabled by this option.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3707)
(cherry picked from commit edcdf38bd09f77160f0ec3e5bdd9d9525daf6f25)
2017-06-17 18:42:30 -04:00
Andy Polyakov
a43cf4c0c0 Configure: use 5.10.0, don't require...
Configure started with 'require 5.10.0', but if executed by older perl
it failed with "might be runaway multi-line // string" instead of
naturally expected "Perl v5.10.0 required--this is only v5.x.y".

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit d83112b7fd3b0e751f8a5947e5a93db1cbbe86dc)
2017-04-01 15:51:18 +02:00
FdaSilvaYY
a2dcdb57af More typo fixes
Backport of 69687aa829bc8bdcaf5468eb3dd0ada13700b7aa
(Merged from #3069)

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3079)
2017-03-30 22:13:12 +02:00
Richard Levitte
a40b5be27e 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)
(cherry picked from commit d192a3aaeb76fc89f8285b4dc938c2bc0c37d0d4)
2017-03-06 16:43:21 +01:00
Rich Salz
4c3376ec27 Add -Wundef to strict-warnings
Avoid a -Wundef warning in o_str.c
Avoid a -Wundef warning in testutil.h
Include internal/cryptlib.h before openssl/stack.h
to avoid use of undefined symbol OPENSSL_API_COMPAT.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2709)
2017-02-23 09:48:49 -05:00
Richard Levitte
eb5de0ce57 If all versions of a proto are disabled, disabled the proto as well
For example, 'no-dtls1 no-dtls1_2' will imply 'no-dtls'

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2670)
(cherry picked from commit 343a7467c270c54a8e1c85e88e807a1c2e0b6127)
2017-02-17 21:29:19 +01:00
Andy Polyakov
825930389e INSTALL: clarify 386 and no-sse2 options.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 5ae5dc96610f0a598dac9d2f267b5c0ddd77b2e4)
2016-11-25 17:36:36 +01:00
Richard Levitte
5be6f71858 Only build the body of e_padlock when there are lower level routines
engines/e_padlock.c assumes that for all x86 and x86_64 platforms, the
lower level routines will be present.  However, that's not always
true, for example for solaris-x86-cc, and that leads to build errors.

The better solution is to have configure detect if the lower level
padlock routines are being built, and define the macro PADLOCK_ASM if
they are, and use that macro in our C code.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1510)
(cherry picked from commit 7b176a549ea374fc9b64c3fa7f0812239528b696)
2016-11-15 15:15:52 +01:00
Vitezslav Cizek
bf4e64227d Configure: remove superfluous 0x
The number is taken from the OPENSSL_VERSION_NUMBER which is already
in the hex form.

CLA: trivial

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1706)

(cherry picked from commit 35a498e431f81f94c4ee2dd451cdfe4d566fef3b)
2016-10-13 15:37:00 -04:00
Richard Levitte
0de5e4f092 Remove automatic RPATH - add user rpath support
Make Configure recognise -rpath and -R to support user added rpaths
for OSF1 and Solaris.  For convenience, add a variable LIBRPATH in the
Unix Makefile, which the users can use as follows:

    ./config [options] -Wl,-rpath,\$(LIBRPATH)

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit fad599f7f147ee71e5581211fb654c2c8c491cd8)
2016-10-13 02:25:42 +02:00
Andy Polyakov
f757ce2a3d Configure: clarify and refine -static.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 047d97afd97520eae268f6d8a36fbf9a0239a994)
2016-09-21 21:38:25 +02:00
Richard Levitte
11bb654c60 Have the configuration options 'no-err' and 'no-async' work again
In an earlier attempt to simplify the processing of disabled options,
'no-err' and 'no-async' stopped working properly.  'err' and 'async'
are directories under 'crypto/', but they are special insofar that
they can't be simply skipped, like all the algorithm directories can,
so they need special treatment among the disablable things.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 66fe388aa410820d80ab1d99730b64b1b56a89d4)
2016-09-17 23:22:16 +02:00
Richard Levitte
5dab48340e Rearrange the storage of build file template names in %config
They are now relative paths as well

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 1967a42eb5192efc552287f78850420082caba7c)
2016-09-16 11:53:30 +02:00
Richard Levitte
efd2379412 Register the name of the config file each config target was found in
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit ee9b0bbb4c66812da18939ea96c4625cb001f3bd)
2016-09-16 11:53:29 +02:00
Andy Polyakov
1556abd043 Configure: detect gcc's dependency generation capability more accurately.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 35c11bfc69e6b90fd1c4c4ca6ad3f500584ca939)
2016-09-13 14:04:21 +02:00
Richard Levitte
c3cfc9962b Allow asan, msan and ubsan to be configured with shared libraries
The background story is that util/shlib_wrap.sh was setting LD_PRELOAD
or similar platform dependent variables, just in case the shared
libraries were built with -rpath.  Unfortunately, this doesn't work
too well with asan, msan or ubsan.

So, the solution is to forbid the combination of shared libraries,
-rpath and any of the sanity analyzers we can configure.

This changes util/shlib_wrap.sh so it only contains the code that sets
LD_PRELOAD when -rpath has been used when configuring.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 342a1a23793cb99921abeabe882adf8652ba715d)
2016-09-07 21:54:08 +02:00
Richard Levitte
79e5eae6ab Configure: Reorganise the checking of disabled options
The way we figured out what options are crypto algorithms and what are
something other was somewhat sketchy.  This change bases the
distinction on available sdirs instead.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 3e2dd30d665f3a312a45f945ffafb74ff6c420d6)
2016-09-07 17:28:08 +02:00
Richard Levitte
eed06638c7 Revert "Make it possible to disable fuzz testing"
This reverts commit eb40eaed727500bf4a15f848c99e37edd18e142e.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit a5e1f1230e09b249ff94cc48aeffd1b874cb937e)
2016-09-01 21:02:23 +02:00
Richard Levitte
3c8be9c350 Have Configure's HASH or TABLE produce complete lists
Because some targets execute perl code that might die, we risk
incomplete lists.  Make it so dying doesn't happen when we're listing
targets.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit d63c12c697faa4e2fa0e5d7565521a5813c86415)
2016-08-31 20:44:16 +02:00
Richard Levitte
67d81419f5 Configure's print_table_entry printed incorrect information
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 0c0d78b88d0bc4171b577ba3877c7b7ed0e91935)
2016-08-31 20:44:16 +02:00
Richard Levitte
fd2107e077 Make it possible to disable fuzz testing
These tests take a very long time on some platforms, and arent't
always strictly necessary.  This makes it possible to turn them
off.  The necessary binaries are still built, though, in case
someone still wants to do a manual run.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit eb40eaed727500bf4a15f848c99e37edd18e142e)
2016-08-31 17:44:15 +02:00
Richard Levitte
bbf0074887 The Perl interpreter might be in a path with spaces, so maybe quote it
Note: some shells do not like the command verb to be quoted, so we avoid
it unless it's actually necessary.

RT#4665

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f879d5ff38d3c2283db968ea57c7a3207cc05889)
2016-08-31 16:44:15 +02:00