Commit graph

96 commits

Author SHA1 Message Date
Richard Levitte
592b6fb489 Small MSVC build fixes.
- "/Ox /O2 /Ob2" get's reduced to "/O2", the reason being:

    /Ox = /Ob2 /Og /Oi /Ot /Oy /Gs
    /O2 = /Ob2 /Og /Oi /Ot /Oy /Gs /GF /Gy

- apps/openssl.cnf gets installed.

- always delete files quietly, as they might not be there.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1075)
2016-05-16 11:15:57 +02:00
Richard Levitte
3ec8a1cfd8 Windows: When installing libraries and executables, install .pdb files as well
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-12 22:20:30 +02:00
Richard Levitte
ae69c7d353 Move the DJGPP target to its own config.
DJGPP is a 3rd party configuration, we rely entirely on the OpenSSL to
help us fine tune and test.  Therefore, it's moved to its own config.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-12 22:10:55 +02:00
Andy Polyakov
c21c7830ac IRIX fixes.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-10 08:44:51 +02:00
Andy Polyakov
b4de72bf64 Tru64 fixes.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-03 20:14:26 +02:00
Andy Polyakov
cba792a1e9 Android build fixes.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-02 12:49:57 +02:00
Richard Levitte
e590afdcf4 VMS: only explicitely translate names in library C files.
When compiling all other C files, rely on the compiler to
automatically pick up the name translation information from the header
files __DECC_INCLUDE_{PRO,EPI}LOGUE.H.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-04-29 15:20:48 +02:00
Richard Levitte
f0d484fcd4 Typo, asoutflag -> perlasm_scheme
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-04-19 23:22:55 +02:00
Richard Levitte
43800958f1 Only allow Microsoft assembler with no-asm on Windows
This also restores the possibility to have ml used with VC-WIN32 with
no-asm, which was lost during the mk1mf -> unified transition.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-04-19 20:57:08 +02:00
Jérôme Duval
2ca1e22b2a Haiku x86-64 doesn't need RC4_CHAR.
* add a comment about Haiku being built with no-asm.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-18 07:40:11 -04:00
Richard Levitte
ef5b8296a1 ex_libs settings have to be added to, not overriden, on Windows too
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-15 07:53:17 +02:00
Jérôme Duval
6e08e9e7cc Add Haiku support.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-14 13:49:42 -04:00
Richard Levitte
5a5c0b953f Remake the way dynamic zlib is loaded
Instead of absolute hard coding of the libz library name, have it use
the macro LIBZ, which is set to defaults we know in case it's
undefined.

This allows our configuration to set something that's sane on current
or older platforms, and allows the user to override it by defining
LIBZ themselves.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-13 11:36:46 +02:00
Richard Levitte
0c9b153426 Configuration: Simplify the way vms information is retrieved
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-13 11:36:46 +02:00
Richard Levitte
62890f4728 Fix zlib configuration options.
The macros ZLIB and ZLIB_SHARED weren't appropriately defined,
deviating wrongly from how they worked in earlier OpenSSL versions.
So, restore it so that ZLIB is defined if configured "enable-zlib" and
so that ZLIB and ZLIB_SHARED are defined if configured
"enable-zlib-dynamic".

Additionally, correct the interpretation of the --with-zlib-lib value
on Windows and VMS, where it's used to indicate the actual zlib
zlib library file / logical name, as that can differ depending on zlib
version and packaging on those platforms.

Finally for Windows and VMS, we also define the macro LIBZ with that
file name / logical name when configured "zlib-dynamic", so the
compression unit can pick it up and use it.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-13 11:36:46 +02:00
Andy Polyakov
463a7b8cb0 Clean-up *_DEBUG options.
Since NDEBUG is defined unconditionally on command line for release
builds, we can omit *_DEBUG options in favour of effective "all-on"
in debug builds exercised though CI.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-04-07 21:18:00 +02:00
Andy Polyakov
c32cbe9787 Configurations/10-main.conf: omit now redundant -D_WINDLL.
... and refine /MT vs. /MD flag handling.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-07 21:13:02 +02:00
Richard Levitte
368058d0a7 Force argv to be an array of long pointers on VMS
Reverts commit 087ca80ad8

Instead of battling the odd format of argv given to main() in default
P64 mode, tell the compiler to make it an array of 64-bit pointers
when compiling in P64 mode.

A note is added in NOTES.VMS regarding minimum DEC C version.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-04-01 16:23:35 +02:00
Richard Levitte
0a2629b38e Config: The cflags in vms-alpha and vms-ia64 have to be added
"vms-generic" already has some values, which were discarded.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-29 22:06:07 +02:00
Richard Levitte
5fe5bc3094 VMS: Disable the warning MAYLOSEDATA3
The warning MAYLOSEDATA3 is one you will always get when compiling
source that calculates the difference between two pointers with
/POINTER_SIZE=64.

The reason is quite simple, ptrdiff_t is always a 32-bit integer
regardless of pointer size, so the result of 'ptr1 - ptr2' can
potentially be larger than a 32-bit integer.  The compiler simply
warns you of that possibility.

However, we only use pointer difference within objects and strings,
all of them well within 2^32 bytes in size, so that operation is
harmless with our source, and we can therefore safely turn off that
warning.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-29 20:27:22 +02:00
Andy Polyakov
fdf6f73e5e Windows build system: fix 32-bit appveyor build.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-29 09:51:40 +02:00
Andy Polyakov
6ddb62a575 Build system: VC-WIN64I fixups.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-29 09:48:25 +02:00
Richard Levitte
ac722c9af0 Small fixups in DSO
- VMS configs had no dso_scheme
- Incorrect return of NULL method.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-23 08:40:56 +01:00
Richard Levitte
52d86d9b8d Downcase VMS config names
On VMS, we downcase option names, which means that config names are
downcased as well, so they need to be downcased in the target table to
be found.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-21 20:20:15 +01:00
Andy Polyakov
b75ac3c2a3 Build system: VC-WIN64I fixups.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21 11:44:27 +01:00
Andy Polyakov
acf1525966 Windows build system: get uplink right.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21 11:27:57 +01:00
Andy Polyakov
c75065e1ea Configurations/10-main.conf: freeze -std option in darwin*-ppc-cc.
RT#4422

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21 11:11:19 +01:00
Richard Levitte
0ef1ce49ee Remove generation of ms/version32.rc from Configure, use util/mkrc.pl
utils/mkrc.pl was added a while ago as a better generator for the
Windows DLL resource file.  Finalize the change by removing the
ms/version32.rc generator from Configure and adding resource file
support using mkrc.pl in Configurations/windows-makefile.pl

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-21 11:00:21 +01:00
Richard Levitte
1f2e1cd5e8 Make picker, thread and combine standard config helper functions
Document them as well

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-17 22:46:14 +01:00
Rich Salz
1fbab1dc6f Remove Netware and OS/2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-17 17:06:57 -04:00
Rich Salz
23d38992fc Remove ultrix/mips support.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-17 15:29:15 -04:00
Richard Levitte
8e56a4227b Remove support for Borland C++
Borland C++ 4.5 is very old and our "support" for it is already
non-existent, we might as well remove it.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-17 20:16:38 +01:00
Richard Levitte
8975fb6212 DLL object files should not be built with /Zl"
When building the DLLs, we depend on the correct default C RTL info.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-16 18:11:01 +01:00
Andy Polyakov
2460c7f133 poly1305/asm/poly1305-x86_64.pl: make it work with linux-x32.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-15 23:58:31 +01:00
Richard Levitte
e58d91027a Cygwin configs were missing thread_scheme settings, add them
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-15 15:38:11 +01:00
Andy Polyakov
8d51db86f7 s390x assembly pack: 32-bit fixups.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-14 13:52:34 +01:00
Richard Levitte
01d9997659 Fix a few Configure errors
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-14 11:21:35 +01:00
Richard Levitte
2fe7303628 Unified - extract settings from util/pl/VC-32.pl and make the config settings
This introduces the settings loutflag and aroutflag, because different
Windows tools that do the same thing have different ways to specify
the output file.

The Borland C++ config is commented away for the monent, perhaps
permanently.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09 11:22:07 +01:00
Richard Levitte
0c8734198d No -fno-common for Darwin
When object files with common block symbols are added to static
libraries on Darwin, those symbols are invisible to the linker that
tries to use them.  Our solution was to use -fno-common when compiling
C source.

Unfortunately, there is assembler code that defines OPENSSL_ia32cap_P
as a common block symbol, unconditionally, and in some cases, there is
no other definition.  -fno-common doesn't help in this case.

However, 'ranlib -c' adds common block symbols to the index of the
static library, which makes them visible to the linker using it, and
that solves the problem we've seen.

The common conclusion is, either use -fno-common or ranlib -c on
Darwin.  Since we have common block symbols unconditionally, choosing
the method for our source is easy.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-03-05 12:10:13 +01:00
Richard Levitte
9c62a279fe Configure - Get rid of the special thread_cflag, replace with thread_scheme
The thread_cflag setting filled a double role, as kinda sorta an
indicator of thread scheme, and as cflags.  Some configs also added
lflags and ex_libs for multithreading regardless of if threading would
be enabled or not.

Instead of this, add threading cflags among in the cflag setting,
threading lflags in the lflag setting and so on if and only if threads
are enabled (which they are by default).

Also, for configs where there are no special cflags for threading (the
VMS configs are of that kind), this makes it possible to still clearly
mention what thread scheme is used.

The exact value of thread scheme is currently ignored except when it's
"(unknown)", and thereby only serves as a flag to tell if we know how
to build for multi-threading in a particular config.  Yet, the
currently used values are "(unknown)", "pthreads", "uithreads" (a.k.a
solaris threads) and "winthreads".

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte
8864f0de7b Configure - get rid of the special debug_ and release_ settings
Instead, make the build type ("debug" or "release") available through
$config{build_type} and let the configs themselves figure out what the
usual settings (such as "cflags", "lflags" and so on) should be
accordingly.

The benefit with this is that we can now have debug and release
variants of any setting, not just those Configure supports, and may
also involve other factors (the MSVC flags /MD[d] and /MT[d] involve
both build type and whether threading is enabled or not)

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte
98fdbce091 Configure - move the addition of the zlib / libz lib to configs
Configure had the Unix centric addition of -lz when linking with zlib
is enabled, which doesn't work on other platforms.  Therefore, we move
it to the BASE_unix config template and add corresponding ones in the
other BASE_* config templates.  The Windows one is probably incomplete,
but that doesn't matter for the moment, as mk1mf does it's own thing
anyway.

This required making the %withargs table global, so perl snippets in
the configs can use it.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte
d2b2221a04 Configure - Rename BASE to DEFAULTS and add a few inheritable BASEs
These BASE templates are intended to hold values that are common for
all configuration variants for whole families of configurations.

So far, three "families" are identified: Unix, Windows and VMS, mostly
characterised by the build system they currently use.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte
e9abfc3a00 Add a shared_target to the VC-common config
This has no real meaning, except it gives Configure a hint that VC
targets are indeed capable of producing shared objects.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-02 15:45:45 +01:00
FdaSilvaYY
b6453a68bb GH753: More spelling fix
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-27 10:58:16 -05:00
Richard Levitte
56b10d8824 Remove comments saying you must do 'make -f Makefile.in TABLE'
Since the configs were remade into hash tables, this isn't needed
any more.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-26 17:39:19 +01:00
Richard Levitte
bdcd83e127 Configure - neater looking add() and add_before()
They now default to " " as separator, but that can be overridden by
having a hash with parameters as last argument.  The only currently
recognised parameter is `separator'.

The special separator `undef' will force the result to become a list
rather than a concatenated string.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-26 09:00:25 +01:00
Richard Levitte
893fe73a63 Remove all -march= from configs
These flags are limitting needlessly, are often patched by packagers,
and should be specified on the configuration command line by anyone
who desires for it to be specific rather than forced by us.

This work was already done with mingw when those configs were worked
on, now it gets applied to the remaining configs.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-23 00:47:52 +01:00
Richard Levitte
84af1bae68 Clean away $config{no_shared} since we have $disabled{shared}
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-22 16:36:58 +01:00
Richard Levitte
5ee719da04 apps_extra_src changed name to apps_aux_src, rename everywhere
One spot was forgotten.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20 09:28:16 +01:00