Commit graph

308 commits

Author SHA1 Message Date
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
bb6b950e1c Configurations/windows-makefile.tmpl: respect no-makedepend.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21 11:30:14 +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
3e67b33346 Remove mk1mf documentation
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-21 11:02:00 +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
f3e5948af6 Have makedepend output to stdout and redirect it
This gives us better control of what files are produced.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-20 23:03:10 +01:00
Richard Levitte
674d5858df If the asm file to be compiled isn't generated, leave the ext alone
Closes RT#4447

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-19 22:21:14 +01:00
Richard Levitte
9a9f8ee788 Don't let 'generate' target depend on generated files, act directly instead
One of the 'generate' targets depended on $(SRCDIR)/apps/progs.h,
which depended on...  nothing.  This meant it never got regenerated
once it existed, regardless of need.  Of course, we could have it
depend on all the files checked to generate it, but they also depend
on progs.h, so we'd end up getting cricular dependencies, which makes
make unhappy.

Furthermore, and this applies for the other generated files, having
them as targets means that they may be regenerated on the fly in some
cases, and since they get written to the source tree, this isn't such
a good idea if that tree is read-only (which is a possible situation
in an out-of-tree build).

So, we move all the actions to the 'generate' targets themselves, thus
making sure they get regenerated in a controlled manner and regardless
of dependencies.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-19 22:19:12 +01:00
Viktor Dukhovni
ffc8d605e8 Revert "Generate apps/progs.h on the fly"
This reverts commit 04e2a52737.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 13:29:35 -04:00
Richard Levitte
50bf25d223 Add a few more quotes for Windows (install_ssldirs)
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 11:25:10 +01:00
Richard Levitte
5287761bfc Replace sed command with perl
Some implementations of sed require a newline before an ending '}'.
The easier method is to replace that sed command with the
corresponding perl command.

Closes RT#4448

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 11:18:56 +01:00
Richard Levitte
243a98d4a0 Clear the exit code from 'find' in 'make depend'
Depending on what has been built so far, all .d files may not be
present and 'find' will exit with non-zero exit code.  This isn't a
bother for us but may break make, so clear the exit code with an added
'exit 0'.

Closes RT#4444

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 11:17:42 +01:00
Richard Levitte
ac89799c3e Shut find up about files not found
Some of the files in $(DEPS) might not exist.  We don't need to know.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 02:40:02 +01:00
Richard Levitte
769777b0a2 Use the dependencies received in generatesrc()
generatesrc() did already receive dependency information, but never
used it, and never really needed to...  until now.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 01:49:31 +01:00
Richard Levitte
04e2a52737 Generate apps/progs.h on the fly
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 01:49:31 +01:00
Richard Levitte
a6adf099cb Better 'make depend' mechanism
Instead of relying on the '-nt' test operator, which doesn't exist
everywhere, use find's '-newer' to find out if any of the known .d
files is newer than Makefile.

Closes RT#4444

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-18 20:55:10 +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
Richard Levitte
dc8941f031 windows-makefile.tmpl: Stop keeping temporary files
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-17 21:06:14 +01:00
Richard Levitte
8c16829ebd Add install targets for Windows
On Windows, we set INSTALLTOP to default as follows:

  VC-WIN32:

    PREFIX:     %ProgramFiles(x86)%\OpenSSL
    OPENSSLDIR: %CommonProgramFiles(x86)%\SSL

  VC-WIN64*:

    PREFIX:     %ProgramW6432%\OpenSSL
    OPENSSLDIR: %CommonProgramW6432%\SSL

Should those environment variables be missing, the following is used
as fallback:

    PREFIX:     %ProgramFiles%\OpenSSL
    OPENSSLDIR: %CommonProgramFiles%\SSL

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-17 21:06:14 +01: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
a4a7174890 Start documenting Configure internals
This is a living document, everyone is encouraged to add to it.
Implementation details as well as broader implementation philosophy
has a place here.

I'm starting with documentation of the how conditions in build.info
files are treated.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-17 19:08:49 +01:00
Richard Levitte
a717738b45 Don't define OPENSSL_ENGINES in test recipes, do it in Makefiles instead
In most builds, we can assume that engines live in the build tree
subdirectory "engines".  This was hard coded into the tests that use
the engine ossltest.

However, that hard coding is tedious, it would need to be done in
every test recipe, and it's an incorrect assumption in some cases.

This change has us play it safe and let the build files tell the
testing framework where the engines are.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-17 10:10:59 +01:00
Richard Levitte
757c416c4d unix-Makefile template: use $(PERL) everywhere
There was one spot that had hard-coded 'perl'

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-16 23:59:20 +01:00
Richard Levitte
685b6f293b When building DLLs, hack the library name in the .def file
util/mkdef.pl assumes it knows what the resulting library name will
be.  Really, it shouldn't, but changing it will break classic native
Windows builds, so we leave it for now and change the LIBRARY line
externally when needed instead.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-16 18:11:13 +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
Matt Caswell
c1ea997aa8 We should use $SRCDIR in Makefiles
Normally we always refer to source files relative to $SRCDIR in Makefiles.
However the reference to unix-Makefile.tmpl was using a fully expanded
absolute path. This can cause problems for Mingw.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-16 13:35:18 +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
4def90c5de Make the perl dependency post-processor into just one line
Make doesn't always treat multiline quoted strings as nicely as one
would wish.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-15 23:49:22 +01:00
Richard Levitte
29b28eee3e Not all shells understand !
In unix-Makefile.tmpl, this construction has been used a few times

	if ! something; then ...

It seems, though, that some shells do not understand !, so these need
to be changed.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-15 22:28:16 +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
4c1cf7e440 Collect the names of generated files and clean them away at target clean:
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-13 00:03:48 +01:00
Richard Levitte
8a0a3d293c Use single quotes rather than double quotes when needed
When passing down values to Makefile.shared, do so with single quotes
as much as possible to avoid having the shell create a mess of quotes.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-13 00:02:55 +01:00
Richard Levitte
bbd9a50fa8 Harmonize Unix Makefile template with Windows dito
The variable SHARED_CFLAGS and SHARD_LDFLAGS were used in the Unix
template because they normally contain options used when building
"shared".  The Windows template, on the other hand, uses LIB_CFLAGS,
to express the intended use of those flags rather than their content.
The Windows template still used SHARED_LDFLAGS, which seems
inconsistent.

To harmonize the two, any SHARED_CFLAGS gets renamed to LIB_CFLAGS and
SHARED_LDFLAGS to LIB_LDFLAGS.  That makes the intent consistent along
with BIN_{C,LD}FLAGS and DSO_{C,LD}FLAGS.

Finally, make sure to pass down $(LIB_CFLAGS) or $(DSO_CFLAGS) along
with $(CFLAGS) when using Makefile.shared.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-13 00:02:55 +01:00
Richard Levitte
ef75444d08 Avoid sed for dependency post-processing
It turns out that different sed implementations treat -i differently
to cause issues.  make it simpler by avoiding it entirely and give
perl the trust to be consistent enough.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-12 01:15:12 +01:00
Richard Levitte
bb26842d1c Some sed implementations are not greedy enough, use perl instead
The issue is demonstrated as follows:

  On Linux:

    $ echo ': foo.h /usr/include/stddef.h bar.h' | sed -e 's/ \/\(\\.\|[^ ]\)*//g'
    : foo.h bar.h

  On MacOS X:

    $ echo ': foo.h /usr/include/stddef.h bar.h' | sed -e 's/ \/\(\\.\|[^ ]\)*//g'
    : foo.husr/include/stddef.h bar.h

Perl is more consistent:

  On Linux:

    $ echo ': foo.h /usr/include/stddef.h bar.h' | perl -pe 's/ \/(\\.|[^ ])*//g;'
    : foo.h bar.h

  On MacOS X:

    $ echo ': foo.h /usr/include/stddef.h bar.h' | perl -pe 's/ \/(\\.|[^ ])*//g;'
    : foo.h bar.h

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-11 17:41:43 +01:00
Andy Polyakov
0218fc3778 Configurations/unix-Makefile.tmpl: don't leave empty .s files behind.
If pre-processor failed, an empty .s file could be left behind,
which could get successfully compiled if one simply re-ran make
and cause linking failures. Not anymore. Remove even intermediate .S
in case of pre-processor failure.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-11 15:29:49 +01:00
Richard Levitte
987dbc7fbf Harmonise the two methods to generate dependency files
One of them didn't clean away .d.tmp files properly.
The other would overwrite the .d files unconditionally, thereby
causing a possibly unnecessary dependency rebuild, which touches the
date of Makefile, which causes a possibly unnecessary rebuild of
buildinf.h and everything that depends on that.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-11 11:19:50 +01:00
Richard Levitte
fb044341e6 In the recipe using "makedepend", make sure the object file extension is there
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-03-10 20:13:01 +01:00
Richard Levitte
3415c711b0 Add cleaning targets to Configurations/windows-makefile.tmpl
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-10 12:59:53 +01:00
Richard Levitte
d46057277f Pass down inclusion directories to source file generators
The source file generators sometimes use $(CC) to post-process
generated source, and getting the inclusion directories may be
necessary at times, so we pass them down.

RT#4406

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-10 10:02:29 +01:00
Richard Levitte
b805b4440d When configured "shared", don't build static libraries on Windows
The reason for this is that the static libraries and the DLL import
libraries are named the same on Windows.  When configured "shared",
the static libraries are unused anyway.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-10 02:51:50 +01:00
Richard Levitte
9a1394c54e Adapt the Windows makefile template to source generation
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09 11:22:07 +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
7c0e1aa6e2 Unified - a native Windows makefile template
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09 11:22:07 +01:00
Richard Levitte
a4b4bb086b Because crypto/build.info demands CFLAGS_Q, descrip.mms.tmpl must deliver
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-09 11:09:26 +01:00
Richard Levitte
a0130dedc7 Add missing semi
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-09 08:58:43 +01:00
Richard Levitte
29eed3ddb8 Adapt unix Makefile template to 'no-makedepend'
This change is a bit more complex, as it involves several recipe
variants.

Also, remove the $(CROSS_COMPILE) prefix for the makedepend program.
When we use the program "makedepend", this doesn't serve anything,
and when we use the compiler, this value isn't even used.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09 01:57:52 +01:00
Richard Levitte
952a9d1aa3 Adapt descrip.mms.tmpl to 'no-makedepend'
VMS doesn't have "makedepend" anyway, so this is just a matter of using
the right qualifiers when 'makedepend' is enabled.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09 01:57:52 +01:00
Richard Levitte
8458f1bfab Redo the Unix source code generator
For assembler, we want the final target to be foo.s (lowercase s).
However, the build.info may have lines like this (note upper case S):

    GENERATE[foo.S]=foo.pl

This indicates that foo.s (lowercase s) is still to be produced, but
that producing it will take an extra step via $(CC) -E.  Therefore,
the following variants (simplified for display) can be generated:

    GENERATE[foo.S]=foo.pl  =>  foo.s: foo.pl
                                	$(PERL) $foo.pl $@.S; \
                                	$(CC) $(CFLAGS) -E -P $@.S > $@ && \
                                	rm -f $@.S

    GENERATE[foo.s]=foo.pl  =>  foo.s: foo.pl
                                	$(PERL) $foo.pl $@

    GENERATE[foo.S]=foo.m4  =>  foo.s: foo.m4
                                	m4 -B 8192 $foo.m4 > $@.S; \
                                	$(CC) $(CFLAGS) -E -P $@.S > $@ && \
                                	rm -f $@.S

    GENERATE[foo.s]=foo.m4  =>  foo.s: foo.m4
                                	m4 -B 8192 $foo.m4 > $@

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-09 00:15:56 +01:00
Andy Polyakov
eb77e8886d SPARCv9 assembly pack: unify build rules and argument handling.
Make all scripts produce .S, make interpretation of $(CFLAGS)
pre-processor's responsibility, start accepting $(PERLASM_SCHEME).
[$(PERLASM_SCHEME) is redundant in this case, because there are
no deviataions between Solaris and Linux assemblers. This is
purely to unify .pl->.S handling across all targets.]

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-08 15:51:06 +01:00
Richard Levitte
54bb8f74bd Fix configurations such as 'dist' and tar building
For config targets such as 'dist', which doesn't have a BASE template,
we still need to have a default build scheme.

Additionally, the unified Makefile template's target 'tar' wasn't
quite as flexible as the unixmake one.

Finally, .travis-create-release.sh can be somewhat simplified now that
it builds with the unified build scheme.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-08 12:32:00 +01:00
Richard Levitte
021fff844e Make unified builds the default on Unix
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-08 10:48:25 +01:00
Richard Levitte
8a67946e5b Unified - Add the build.info command OVERRIDE, to avoid build file clashes
Should it be needed because the recipes within a RAW section might
clash with those generated by Configure, it's possible to tell it
not to generate them with the use of OVERRIDES, for example:

    SOURCE[libfoo]=foo.c bar.c

    OVERRIDES=bar.o
    BEGINRAW[Makefile(unix)]
    bar.o: bar.c
        $(CC) $(CFLAGS) -DSPECIAL -c -o $@ $<
    ENDRAW[Makefile(unix)]

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07 18:25:56 +01:00
Richard Levitte
66ddf178b4 Unified - Adapt the Unix and VMS templates to support GENERATE
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07 18:25:56 +01:00
Richard Levitte
ae4c745075 Unified - Add the build.info command GENERATE, to generate source files
In some cases, one might want to generate some source files from
others, that's done as follows:

    GENERATE[foo.s]=asm/something.pl $(CFLAGS)
    GENERATE[bar.s]=asm/bar.S

The value of each GENERATE line is a command line or part of it.
Configure places no rules on the command line, except the the first
item muct be the generator file.  It is, however, entirely up to the
build file template to define exactly how those command lines should
be handled, how the output is captured and so on.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07 18:25:56 +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
6928b6171a Change names of ordinals and libs, libeay => libcrypto and ssleay => libssl
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-05 09:02:33 +01:00
Richard Levitte
c8cca980dc Correction, $disabled{shared} rather than $config{no_shared}
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-04 05:43:15 +01:00
Richard Levitte
b894054e3f Remove overzealous echoing
This construct in a Makefile is a bit overzealous:

	@echo FOO
	@FOO

Cleaned up.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-03 17:52:26 +01:00
Richard Levitte
2ad9ef06a6 Document the changes in config settings
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte
2952b9b811 Don't copy from %target to %config so much, see %config as a complement
We copied $target{cflags}, $target{defines} and a few more to %config,
just to add to the entries.  Avoid doing so, and let the build templates
deal with combining the two.

There are a few cases where we still fiddle with %target, but that's
acceptable.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +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
940a09bad4 Minimize copied config settings
$target{lflags} and $target{plib_flag} were copied to %config for no
good reason.

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
Richard Levitte
b756967d28 Make uplink auxiliary source separate from cpuid source
There are cases, for example when configuring no-asm, that the added
uplink source files got in the way of the cpuid ones.  The best way to
solve this is to separate the two.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 14:45:02 +01:00
Richard Levitte
2e0956ba6d Unified - have configdata.pm depend on a few more things
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-01 06:39:16 +01:00
Richard Levitte
687237e93d VMS - don't exit out of a MMS recipe
Exiting out of a recipe more than necessary leaves an ugly message.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-28 09:31:46 +01:00
Richard Levitte
340da949cc Make generation of dependency files more efficient when possible
When building with GNU C, clang or VMS C, it's more efficient to
generate dependency file and object file in one call rather than two.
Have the dependency output in a temporary file and compare it with the
previous one if available to see if replacement is waranted, thereby
avoiding unnecessary reconstruction of Makefile / descrip.mms.

Github issue #750

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-28 01:16:44 +01:00
Rich Salz
6ab364149d Remove some old files.
I read the PROBLEMS, and they're outdated; nothing I'd put in the
online FAQ, for example.  Test-builds work without using these files.
Had to remove the rehash.time stuff from Makefile.in

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-27 13:39:46 -05:00
Richard Levitte
b23238f9aa Keep a cache of files that already have a recipe, in common.tmpl
We don't want recipes for the same files generated more than once

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-27 19:17: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
Rob Percival
0cea8832df Public API for Certificate Transparency
Reviewed-by: Ben Laurie <ben@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-26 14:57:29 -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
0f2d3e4e4e Unified on VMS - add %disabled in vmsconfig.pm (util/dofile.pl demands it)
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-26 15:06:46 +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
28a55a873d Make it possible to build even if dependency files can't be generated
If the local system doesn't have GNU C or clang, and not even
makedepend, the build will stop because the call of 'makedepend'
fails.  This changes so the build won't stop because of such failure.
The result will be empty .d files, and that's ok.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-25 14:48:52 +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
f8d9d6e48b Check that any dependency file is newer than Makefile before concatenating
On slower file systems, this makes a huge difference

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-21 16:26:06 +01:00
Richard Levitte
ea80a25e81 Avoid GNU make re-exec when adding dependencies to Makefile
GNU make will re-exec if (it thinks that) the Makefile has changed.
Just having the target Makefile seems to make it think it has, so we
end up in a look where GNU make re-execs for ever.

The fix is easy, just remove the Makefile target and have the depend
target run the recipe on its own instead of depending on Makefile.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-21 00:33:54 +01:00
Ben Laurie
834aae2a99 Remove OBJ_EXT and friends.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-20 21:07:29 +00:00
Ben Laurie
58f2b0ae58 Missing extension on dependency, .d file is not always made (e.g. when input
is a .s).

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-20 16:56:44 +00:00
Richard Levitte
f27f64e17a Unified on VMS - install dynamic engines if there are any
Don't check for no_shared

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20 16:51:31 +01:00
Richard Levitte
45502bfe19 Always build library object files with shared library cflags
This takes us away from the idea that we know exactly how our static
libraries are going to get used.  Instead, we make them available to
build shareable things with, be it other shared libraries or DSOs.

On the other hand, we also have greater control of when the shared
library cflags.  They will never be used with object files meant got
binaries, such as apps/openssl or test/test*.

With unified, we take this a bit further and prepare for having to
deal with extra cflags specifically to be used with DSOs (dynamic
engines), libraries and binaries (applications).

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20 16:51:31 +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
Richard Levitte
ef3c88cf89 VMS static libraries have the extension .OLB, not .LIB
Object LiBrary

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20 09:27:21 +01:00
Richard Levitte
874efa9f81 Unified 'make depend' has to cleanup after itself
It failed to remove lingering Makefile.new

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-19 23:34:25 +01:00
Richard Levitte
ce5ed82f82 Fix Configurations/unix-Makefile.tmpl
It was turning off output again in two place where it should have
turned it on.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-19 22:39:08 +01:00
Richard Levitte
0fb3b62902 Make sure the linked programs have the correct extension
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:52:16 +01:00
Richard Levitte
520f434b42 Big rename fest of MingW shared libraries
So far, MingW shared libraries were named like this

  libeay32.dll + libeay32.dll.a
  ssleay32.dll + ssleay32.dll.a

That naming scheme is antiquated, a reminicense of SSLeay.  We're
therefore changing the scheme to something that's more like the rest
of OpenSSL.

There are two factors to remember:

  - Windows libraries have no recorded SOvers, which means that the
    shared library version must be encoded in the name.  According to
    some, it's unwise to encode extra periods in a Windows file name,
    so we convert version number periods to underscores.
  - MingW has multilib ability.  However, DLLs need to reside with the
    binaries that use them, so to allow both 32-bit and 64-bit DLLs to
    reside in the same place, we add '-x64' in the name of the 64-bit
    ones.

The resulting name scheme (for SOver 1.1) is this:

  on x86:
  libcrypto-1_1.dll + libcrypto.dll.a
  libssl-1_1.dll + libssl.dll.a

  on x86_64:
  libcrypto-1_1-x64.dll + libcrypto.dll.a
  libssl-1_1-x64.dll + libssl.dll.a

An observation is that the import lib is the same for both
architectures.  Not to worry, though, as they will be installed in
PREFIX/lib/ for x86 and PREFIX/lib64/ for x86_64.

As a side effect, MingW got its own targets in Makefile.shared.
link_dso.mingw-shared and link_app.mingw-shared are aliases for the
corresponding cygwin-shared targets.  link_shlib.mingw-shared is,
however, a target separated from the cygwin one.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:52:16 +01:00
Richard Levitte
f99f91f121 Misc small fixes.
Better libclean that removes the exact files that have been built,
nothing more and nothing less.

Corrected typo

A couple of editorial changes.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:52:15 +01:00
Richard Levitte
98e5534e65 Try removing installation directories after having uninstalled files
Of course, if there are remaining files in a directory, it won't be removed.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:52:15 +01:00
Richard Levitte
5386287cfc Small rename fest in unified, obj2dynlib -> obj2dso
Since we're using the acronym DSO everywhere else and that's a common
name for that kind of object, we might as well do so here as well.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:52:15 +01:00
Richard Levitte
c8c2b77900 Remake the installation of shared libraries in unix-Makefile.tmpl
Instead of having the installation recipe rely on special knowledge,
feed it with information, including what shared library files belong
together.  For Cygwin and Mingw, that's the .dll and its import
library .dll.a.  For Unixen, it's the shared library file name with SO
version and the one without.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:52:15 +01:00
Richard Levitte
e048fd5171 Big rename fest in makefile.shared: link_a / link_o -> link_shlib / link_dso
Originally, the Makefile.shared targets described what they used as
input for a shared object, be it a shared library or a DSO.  It turned
out, however, that the link_o targets were used exclusively for
engines and the link_a targets were for libcrypto and libssl.

This rename fest turns and indication on the kind of input the targets
get to the intention with using them.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:51:23 +01:00
Richard Levitte
f5c174ff93 Centralise the shared library / dso name info in unix-Makefile.tmpl
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:51:23 +01:00
Richard Levitte
e987f9f271 Let Configure figure out the diverse shared library and DSO extensions
Then it can pass around the information where it belongs.  The
Makefile templates pick it up along with other target data, the
DSO module gets to pick up the information through
crypto/include/internal/dso_conf.h

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:51:23 +01:00
Richard Levitte
a8a421b113 VMS fixed in unified build
- install_sw had a display of text that belongs under the install target
- previous layout installed architecture dependent files in
  dev:['prefix'.'arch'.LIB], dev:['prefix'.'arch'.EXE] and
  dev:['prefix'.'arch'.ENGINES].  Changed to dev:['prefix'.LIB.'arch'],
  dev:['prefix'.EXE.'arch'] and dev:['prefix'.ENGINES.'arch'] instead.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:14:06 +01:00
Richard Levitte
f0c93a8593 Unified - don't install the ossltest engine
This is done with a simple file name comparison.  We could think of
something more elegant in the future.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:12:33 +01:00
Richard Levitte
8be7bdb5c6 Unified - do a better job when uninstalling
Some directories weren't removed.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:12:33 +01:00
Richard Levitte
3a55c92bba Rethink the uplink / applink story
Adding uplink and applink to some builds was done by "magic", the
configuration for "mingw" only had a macro definition, the Configure
would react to its presence by adding the uplink source files to
cpuid_asm_src, and crypto/build.info inherited dance to get it
compiled, and Makefile.shared made sure applink.o would be
appropriately linked in.  That was a lot under the hood.

To replace this, we create a few template configurations in
Configurations/00-base-templates.conf, inherit one of them in the
"mingw" configuration, the rest is just about refering to the
$target{apps_aux_src} / $target{apps_obj} in the right places.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-19 11:06:54 +01:00
Richard Levitte
5be5e56c09 VMS: rather use a quick file comparison than DIFF
VMS DIFF tries to calculate all the differences, which is slower than
just reading the files and stopping at the first difference.  The
latter doesn't exist as a command, so the problem is solved with perl
and File::Compare (has been in core perl since very early version 5).

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-19 08:58:09 +01:00
Richard Levitte
70ef905779 VMS: produce dependency files just like you produce object files
We need to do the same dance as when object files are created.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-19 08:57:59 +01:00
Richard Levitte
1576663231 Fix casing on VMS
DCL may be in extended parsing style, which makes it less case
insensitive, so when removing a string from another, make sure to get
casing correctly.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-19 02:32:22 +01:00
Richard Levitte
27f42b4679 Don't use config.timestamp, we already have configdata.pm
The benefit with using configdata.pm is that Configure writes it for
us.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-19 02:30:51 +01:00
Richard Levitte
c058fcd798 Automatic 'make depend' for the unified build scheme
This isn't the fully featured combination of compiler generated
dependency files and Makefile include directives, but a cheaper
variant of the same.

The dependency files are generated automatically, but then we have the
usual "depend" target.  However, we depend on it in the bigger phony
targets that are the most likely to be used.  That make this feature
automatic enough.

A side effect is that we can't use the build file's timestamp to check
if reconfiguring might be in order.  In its place, we use a flag file
that depends on Configure and the build file template and depend on it
in spots where it makes sense to check for the need to reconfigure.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 23:48:52 +01:00
Richard Levitte
f325fba50c Set EXE_EXT environment variable when testing
When cross compiling, we may end up with someting like apps/openssl.exe
and a number of test/*.exe.  However, util/shlib_wrap.sh doesn't know
what the executable extension should be, if any, so we need to make
sure it has access to that information when testing, since
OpenSSL::Test uses that script to execute all programs.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 23:45:44 +01:00
Richard Levitte
ce192ebed0 Remove all special make depend flags, as well as OPENSSL_DOING_MAKEDEPEND
All those flags existed because we had all the dependencies versioned
in the repository, and wanted to have it be consistent, no matter what
the local configuration was.  Now that the dependencies are gone from
the versioned Makefile.ins, it makes much more sense to use the exact
same flags as when compiling the object files.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 23:43:09 +01:00
Richard Levitte
88297284ad Don't treat .d (depend) files separately from object files
.d (.MMS in the VMS world) files with just dependencies are built from
exactly the same conditions as the object files.  Therefore, the rules
for them can be built at the same time as the rules for the
corresponding object files.

This removes the requirement for a src2dep function in the build file
templates, and for common.tmpl to call it.  In the end, the existence
of depend files is entirely up to the build file.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 23:42:09 +01:00
Richard Levitte
7d1037661a Fix the makedepend constructor in unix-Makefile.tmpl
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 23:41:29 +01:00
Rich Salz
e4ef2e25f1 Remove "experimental" in code and comments, too.
Thanks to Viktor for additional review.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-17 21:12:30 -05:00
Richard Levitte
29d0932721 Fix spelling
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 00:32:13 +01:00
Richard Levitte
6ba5dd341b Fix spelling
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 00:11:18 +01:00
Richard Levitte
d9dc3e1d28 Add -lresolv to the Solaris ex_libs
The reason is that we use hstrerror() and other resolver functions.

Reporter: Erik Forsberg <erik@efca.com>

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18 00:07:54 +01:00
Richard Levitte
b0c93ee747 Fix use of add() and add_before() in Configurations/*.conf
These two functions take a separator to concatenat the strings with as
first argument.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-16 02:48:18 +01:00
Richard Levitte
3544091ae0 MANSUFFIX should be left empty
That variable isn't for us, it's for any user, distributor or package
builder that wants one after the section number.  "ssl" seems to be
popular...

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-15 14:16:07 +01:00
Ben Laurie
ecd44a3c1e Address comments.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-15 12:15:45 +00:00
Ben Laurie
18c7e6dda8 Tests depend on everything.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-15 12:09:58 +00:00
Andy Polyakov
6762a14779 Configurations/00-base-templates.conf: typos in [chacha|poly1305]_asm_src.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-14 21:24:25 +01:00
Richard Levitte
ba327ade80 Have dofile.pl say where it was run, for real this time
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-14 08:47:47 +01:00
Richard Levitte
4b799ceaa2 Have dofile.pl say where it was run
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-14 08:33:21 +01:00
Richard Levitte
68a5f1a278 Don't build test programs by default, add convenience targets for unified build
Test programs are now only built when running "make test" or "make
build_tests".

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-13 18:32:01 +01:00
Richard Levitte
dde10ab4d2 Have the same installation directories in unified as in unixmake
unix-Makefile.tmpl was lagging behind on this point.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-13 18:32:01 +01:00
Andy Polyakov
b3214008e4 Configurations: engage PPC ChaCha20 and Poly1305 modules.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-13 17:22:20 +01:00
Richard Levitte
af093bf485 Add SHARED_RCFLAGS in unified Makefile template
Also remove a spurious extra $(LDFLAGS)

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-13 16:03:31 +01:00
Richard Levitte
3af104f3cc The unified build may delete installed manual files
The installation of man files and html files alike didn't properly
check that file names with different casing could be the same on
case-insensitive file systems.  This change fixes that.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-13 15:12:24 +01:00
Richard Levitte
dac494d2a8 In templates, output_on() must be used the same way as output_off()
Otherwise, there will be an unbalance.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-13 13:59:10 +01:00
Andy Polyakov
f4e175e4af C64x+ assembly pack: add ChaCha20 and Poly1305 modules.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-13 12:34:29 +01:00
Andy Polyakov
647097e17d Configurations: engage ARM ChaCha20 and Poly1305 modules.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-13 12:08:25 +01:00
Richard Levitte
03ed5e9906 We need the linked utils after a full build.
We really needs a better util/shlib_wrap.sh, but will have to do for now.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-12 23:06:41 +01:00
Richard Levitte
50e83cdde6 Unified build - fix make depend
There was a catch 22, where 'make depend' directly after configuring
in an otherwise pristine build tree would fail because buildinf.h
didn't exist yet.

This change has the depend building targets depend on the same other
targets as the object file building targets, so the generation of
buildinf.h and similar files would kick in during 'make depend'.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-12 23:05:43 +01:00
Richard Levitte
3c65577f1a Rename INSTALL_PREFIX to DESTDIR, remove option --install_prefix
INSTALL_PREFIX is a confusing name, as there's also --prefix.
Instead, tag along with the rest of the open source world and adopt
the Makefile variable DESTDIR to designate the desired staging
directory.

The Configure option --install_prefix is removed, the only way to
designate a staging directory is with the Makefile variable (this is
also implemented for VMS' descrip.mms et al).

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-12 21:54:07 +01:00
Richard Levitte
fb3e2a88ee Generate progs.h from a bunch of files instead of internal knowledge
apps/progs.pl counted on the caller to provide the exact command
files.  The unified build doesn't have that knowledge, and the easier
and more flexible thing to do is to feed it all the apps/*.c files and
let it figure out the command names by looking inside (looking for
/int ([a-z0-9][a-z0-9_]*)_main\(int argc,/).

Also, add it to the generate command, since it's a versioned file.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-12 04:42:22 +01:00
Richard Levitte
6bb2106e24 Add the generate mechanism from unixmake to unix-Makefile.tmpl
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 20:10:44 +01:00
Rich Salz
f3f1cf8444 Move to REF_DEBUG, for consistency.
Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT
This is also RT 4181

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11 12:40:32 -05:00
Richard Levitte
cedbb1462a Make shared library targets more consistent
On Windows POSIX layers, two files are produced for a shared library,
there's {shlibname}.dll and there's the import library {libname}.dll.a

On some/most Unix platforms, a {shlibname}.{sover}.so and a symlink
{shlibname}.so are produced.

For each of them, unix-Makefile.tmpl was entirely consistent on which
to have as a target when building a shared library or which to use as
dependency.

This change clears this up and makes it consistent, we use the
simplest form possible, {lib}.dll.a on Windows POSIX layers and
{shlibname}.so on Unix platforms.  No exception.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 17:08:38 +01:00
Richard Levitte
64c443e3f0 Add support for shared_rcflag, useful for windres (Cygwin and Mingw)
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 16:50:01 +01:00
Richard Levitte
68ab559a50 Modernise the mingw cflags and ldflags
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 16:50:01 +01:00
Rich Salz
330fad61af BIO_PAIR_DEBUG did nothing; remove it.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-10 15:28:18 -05:00
Richard Levitte
076e596ffb Quote the CFLAG in Unixly Makefiles, for buildinf.h
Because the command line definitions of OPENSSLDIR and ENGINESDIR
contain quotes, we need a variant of CFLAG where backslashes and
quotes are escaped when we produce buildinf.h

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 19:36:48 +01:00
Richard Levitte
e84193e43d unified build scheme: add a "unified" template for VMS descrip.mms
As part of this, change util/mkdef.pl to stop adding libraries to
depend on in its output.  mkdef.pl should ONLY output a symbol
vector.

Because symbol names can't be longer than 31 characters, we use the
compiler to shorten those that are longer down to 23 characters plus
an 8 character CRC.  To make sure users of our header files will pick
up on that automatically, add the DEC C supported extra headers files
__decc_include_prologue.h and __decc_include_epilogue.h.

Furthermore, we add a config.com, so VMS people can configure just as
comfortably as any Unix folks, thusly:

    @config

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:32 +01:00
Richard Levitte
fcf80c469a unified build scheme: add the tweaks to build on Cygwin & Mingw
Cygwin and Mingw name their libraries a bit differently from the rest
of the POSIXly universe, we need to adapt to that.

In Makefile.tmpl, it means that some hunks will only be output
conditionally.

This also means that shared_extension for the Cygwin and Mingw
configurations in Configurations/10-main.conf are changing from .dll.a
to .dll.  Makefile.shared does a fine job without having them
specified, and it's much easier to work with tucking an extra .a at
the end of files in the installation recipes than any amount of name
rewrites, especially with the support of the SHARED_NAME in the top
build.info.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10 14:36:04 +01:00