summaryrefslogtreecommitdiffstats
path: root/Configurations
AgeCommit message (Collapse)Author
2016-03-16When building DLLs, hack the library name in the .def fileRichard Levitte
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-16DLL object files should not be built with /Zl"Richard Levitte
When building the DLLs, we depend on the correct default C RTL info. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-16We should use $SRCDIR in MakefilesMatt Caswell
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-15poly1305/asm/poly1305-x86_64.pl: make it work with linux-x32.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-15Make the perl dependency post-processor into just one lineRichard Levitte
Make doesn't always treat multiline quoted strings as nicely as one would wish. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-15Not all shells understand !Richard Levitte
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-15Cygwin configs were missing thread_scheme settings, add themRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-14s390x assembly pack: 32-bit fixups.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-14Fix a few Configure errorsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-13Collect the names of generated files and clean them away at target clean:Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-13Use single quotes rather than double quotes when neededRichard Levitte
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-13Harmonize Unix Makefile template with Windows ditoRichard Levitte
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-12Avoid sed for dependency post-processingRichard Levitte
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-11Some sed implementations are not greedy enough, use perl insteadRichard Levitte
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-11Configurations/unix-Makefile.tmpl: don't leave empty .s files behind.Andy Polyakov
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-11Harmonise the two methods to generate dependency filesRichard Levitte
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-10In the recipe using "makedepend", make sure the object file extension is thereRichard Levitte
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-03-10Add cleaning targets to Configurations/windows-makefile.tmplRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-10Pass down inclusion directories to source file generatorsRichard Levitte
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-10When configured "shared", don't build static libraries on WindowsRichard Levitte
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-09Adapt the Windows makefile template to source generationRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Unified - extract settings from util/pl/VC-32.pl and make the config settingsRichard Levitte
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-09Unified - a native Windows makefile templateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Because crypto/build.info demands CFLAGS_Q, descrip.mms.tmpl must deliverRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-09Add missing semiRichard Levitte
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-09Adapt unix Makefile template to 'no-makedepend'Richard Levitte
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-09Adapt descrip.mms.tmpl to 'no-makedepend'Richard Levitte
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-09Redo the Unix source code generatorRichard Levitte
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-08SPARCv9 assembly pack: unify build rules and argument handling.Andy Polyakov
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-08Fix configurations such as 'dist' and tar buildingRichard Levitte
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-08Make unified builds the default on UnixRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-07Unified - Add the build.info command OVERRIDE, to avoid build file clashesRichard Levitte
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-07Unified - Adapt the Unix and VMS templates to support GENERATERichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07Unified - Add the build.info command GENERATE, to generate source filesRichard Levitte
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-05No -fno-common for DarwinRichard Levitte
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-05Change names of ordinals and libs, libeay => libcrypto and ssleay => libsslRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-04Correction, $disabled{shared} rather than $config{no_shared}Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-03Remove overzealous echoingRichard Levitte
This construct in a Makefile is a bit overzealous: @echo FOO @FOO Cleaned up. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-02Document the changes in config settingsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02Don't copy from %target to %config so much, see %config as a complementRichard Levitte
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-02Configure - Get rid of the special thread_cflag, replace with thread_schemeRichard Levitte
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-02Configure - get rid of the special debug_ and release_ settingsRichard Levitte
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-02Minimize copied config settingsRichard Levitte
$target{lflags} and $target{plib_flag} were copied to %config for no good reason. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02Configure - move the addition of the zlib / libz lib to configsRichard Levitte
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-02Configure - Rename BASE to DEFAULTS and add a few inheritable BASEsRichard Levitte
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-02Add a shared_target to the VC-common configRichard Levitte
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-02Make uplink auxiliary source separate from cpuid sourceRichard Levitte
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-01Unified - have configdata.pm depend on a few more thingsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-28VMS - don't exit out of a MMS recipeRichard Levitte
Exiting out of a recipe more than necessary leaves an ugly message. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-28Make generation of dependency files more efficient when possibleRichard Levitte
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>