summaryrefslogtreecommitdiffstats
path: root/Configurations/windows-makefile.tmpl
AgeCommit message (Collapse)Author
2021-05-04Windows build file: add forgotten quotes on POD->html command lineRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15084)
2021-04-29build.info: add the Perl wrapper to build generator programs on WindowsDr. Matthias St. Pierre
Pull request #14320 introduced the ability to use compiled programs as generators in GENERATE rules of build.info files. Those generator calls were wrapped by the Perl wrapper (wrap.pl) in the Unix makefile template, but not on Windows. This commit adds the missing wrapper for Windows, because for the `fipsmodule.cnf` target it is essential that the `openssl fipsinstall` command does not load any preinstalled openssl configuration file. Fixes #13680 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: install the fips provider if it was configuredDr. Matthias St. Pierre
To follow the principle "what you configure is what you install", the `make install` target now includes the installation of the fips provider (`make install_fips`) if (and only if) OpenSSL was configured with fips support (`enable-fips`). The `make install_fips` target exists as well and can be used to install just the fips provider. It requires `enable-fips` and issues an error message if `no-fips` was configured. The anologue holds for the 'uninstall_fips' target. Fixes #13693 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: don't generate a fresh fipsmodule.cnf when installing itDr. Matthias St. Pierre
There is already a `providers/fipsmodule.cnf` target which is required by the tests. Instead of creating another fipsmodule.cnf, the `install_fips` target simply copies that configuration file to its final destination. This commit also restores the minimal dependencies to build the `install_fips` target immediately after configuring, which was broken after the removal of the `install_sw` dependency. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: separate install of the FIPS moduleDr. Matthias St. Pierre
Fixes #13693 Co-authored-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: correct the FIPS module configuration file pathDr. Matthias St. Pierre
According to the OpenSSL 3.0 Wiki, the file should be located at $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf next to the openssl.cnf file. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: use the correct openssl app for FIPS installationDr. Matthias St. Pierre
The `openssl` app was previously called without a path, which would generally invoke the system's copy of the openssl application. Currently, that's most likely an openssl version 1.1.1 application, which does not recognize the `fipsinstall` command and terminates with an error message. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: fix the `-macopt` argument of the fipsinstall commandDr. Matthias St. Pierre
The FIPS hmac key is provided as a hexadezimal string, which needs to be be prefixed with `hexkey:`, not `key:`. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-28Configuration: rework how dependency making is handledRichard Levitte
Previously, we had dependency making pretty much hard coded in the build file templates, with a bit of an exception for Unix family platforms, where we had different cases depending on what dependency making program was found. With the Embarcadero C++ builder, a separate scheme appeared, with a different logic. This change merges the two, and introduces two config target attributes: makedepcmd The program to use, where this is relevant. This replaces the earlier configuration attribute 'makedepprog'. makedep_scheme This is a keyword that can be used by build files templates to produce different sorts of commands, but most importantly, to pass as argument to util/add-depend.pl, which uses this keyword as a "producer" for the dependency lines. If the config target doesn't define the 'makedep_scheme' attribute, Configure tries to figure it out by looking for GCC compatible compilers or for the 'makedepend' command. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/15006)
2021-04-28Windows bulding: Make dependency generation not quite as talkativeRichard Levitte
The modified way to generate .d files had an unfortunate side effect, that it outputs the whole preprocessed file and not just the dependency lines, at least with MSVC's cl. That gave util/add-depends.pl a whole lot more to read through, which impacts greatly on the performance of dependency treatment. We modify the process by adding a config target attribute 'make_depend', which can be any suitable command for generating such lines. All it needs is to also accept C flags and macro definitions. Fixes #14994 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/15006)
2021-04-19Link with .def filesTanzinul Islam
MSVC's `link.exe` automatically finds `__cdecl` C functions (which are decorated with a leading underscore by the compiler) when they are mentioned in a `.def` file without the leading underscore. This is an [under-documented feature][1] of MSVC's `link.exe`. C++Builder's `ilink32.exe` doesn't do this, and thus needs the name-translation in the `.def` file. Then `implib.exe` needs to be told to re-add it. (The Clang-based `bcc32c.exe` doesn't implement the [`-vu` or `-u-`][2] options to skip adding the leading underscore to `__cdecl` C function names, so this is the only way to have things work with non-underscored export names in the DLLs.) [1]: https://github.com/MicrosoftDocs/cpp-docs/issues/2653 [2]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Options_Not_Supported_by_Clang-enhanced_C%2B%2B_Compilers#BCC32_Options_that_Are_Not_Supported_by_Clang-enhanced_C.2B.2B_Compilers Also silence linker warnings on duplicate symbols and ensure that error- case cleanup in link rules work in C++Builder's `make.exe`. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Generate dependency informationTanzinul Islam
The Clang-based `bcc32c.exe` doesn't implement the `-Hp` option, so we have to use [`cpp32.exe`][1] instead. Therefore, change the dependency- emitting command to use `$(CPP)` instead of `$(CC)`, which which also uncovered the [existing bug of `2>&1` before `> $dep`][2]. Also C++Builder's `make.exe` doesn't implement `2>&1` in its command runner, so wrap the whole line in a `cmd /C`. [1]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/CPP32.EXE,_the_C_Compiler_Preprocessor [2]: https://ss64.com/nt/syntax-redirection.html Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Build resource filesTanzinul Islam
We need to compile with [brcc32.exe][1] and link with [ilink32.exe][2]. The latter expects the `.res` files to be given in the final comma- separated section in the command line (after the `.def` file). [1]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/BRCC32.EXE,_the_Resource_Compiler [2]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_ILINK32_and_ILINK64_on_the_Command_Line#Command-Line_Elements Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Support DLL builds + Fix C RTL variantsTanzinul Islam
We need to generate a import library without the version in the filename. MSVC's `link.exe` accommodates this with the [`/implib:` option][1], while C++Builder needs a separate run of [`implib.exe`][2]. Also fix the variants of the [C runtime library and startup objects][3]. [1]: https://docs.microsoft.com/en-us/cpp/build/reference/implib-name-import-library?view=msvc-160 [2]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/IMPLIB.EXE,_the_Import_Library_Tool_for_Win32 [3]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Static_Runtime_Libraries Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Replace "ld_wildcard_args" with "bin_lflags"Tanzinul Islam
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Add explanation + bugtracker link for quoted dependency workaroundsTanzinul Islam
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Use cmd.exe to export env vars before commandsTanzinul Islam
Microsoft NMake runs the entire command block in a single `cmd.exe` session, so environment variables exported with `set` are seen by the following commands. C++Builder's `make.exe` doesn't use `cmd.exe` but executes each command line separately. While it emulates only certain shell features itself, `set` isn't one of them. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Avoid redirection to quoted filenameTanzinul Islam
C++Builder's `make.exe` cannot handle a command output redirection to a quoted filename, saying: "The system cannot find the file specified." Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Generalize link rule in windows-makefile.tmplTanzinul Islam
C++Builder's [`ilink32.exe`][1] expects its different types of input / output files to be in a particular sequence and comma-separated -- even in the response file as experimentation revealed, contrary to what is documented. The lines of the response file need to end with `+`. Also [`setargv.obj`][2] is MSVC-specific. The C++Builder equivalent is [`wildargs.obj`][3]. [1]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_ILINK32_and_ILINK64_on_the_Command_Line [2]: https://docs.microsoft.com/en-us/cpp/c-language/expanding-wildcard-arguments?view=msvc-160 [3]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Wildcard_Arguments Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Ensure at least one command if no dependenciesTanzinul Islam
C++Builder's `make.exe` complains if a target has no dependencies (e.g. after variable expansion) and no lines of commands. Ensure there is a blank command line if the dependency list is entirely made of variables. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Avoid quoting dependency filepaths in build treeTanzinul Islam
C++Builder's `make.exe` has a bug in finding the rule of a quoted dependency that doesn't exist in the filesystem. So for example: A: "src\B" "out\C" touch $@ out\C: mkdir out touch $@ leads to: Fatal: '"out\C"' does not exist - don't know how to make it This happens even with the `-N` option, and is different behavior from Microsoft NMake which documents the feature of [quoted filepaths][1]. Commit cb663908 quoted all dependency filepaths, in case they are used in a out-of-source build. The quoting is not done for target names, however, which implies that the build directory is still expected to not have spaces. It follows that we only need to quote non-generated source files in dependency lists, since generated source files will be created in the build directory. Change the logic accordingly as a workaround, so that it works at least for in-source builds with C++Builder's `make.exe`. [1]: https://docs.microsoft.com/cpp/build/reference/long-filenames-in-a-makefile?view=msvc-160 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Generalize delimiter in archiver response fileTanzinul Islam
While [`lib.exe` of MSVC][1] expects newline-delimited response file lines, [`tlib.exe` of C++Builder][2] expects lines to end with `&` in order to read the next line. [1]: https://docs.microsoft.com/cpp/build/reference/running-lib?view=msvc-160#lib-command-files [2]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/TLIB.EXE,_the_Library_Manager#Response_Files Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Avoid space between "-I" and include directoryTanzinul Islam
The space is problematic with C++Builder (`bcc32.exe`). MSVC (`cl.exe`) doesn't care. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-19Avoid "&&" in windows-makefile.tmplTanzinul Islam
The `make.exe` utility shipped with Embarcadero C++Builder has a special meaning for the [`&&` operator in commands][1]. This meaning is retained even in Microsoft NMake compatibility mode (`make -N`). Split all commands using this shell (`cmd.exe`) operator into two commands. [1]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/MAKE_Rules_(Explicit_and_Implicit)_and_Commands#MAKE_Command_Operators Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
2021-04-13util/wrap.pl: use the apps/openssl.cnf from the source treeDr. Matthias St. Pierre
The `make install_fips` target failed msp@debian:~/src/openssl$ make install_fips *** Installing FIPS module install providers/fips.so -> /opt/openssl-dev/lib/ossl-modules/fips.so *** Installing FIPS module configuration fipsinstall /opt/openssl-dev/ssl/fipsmodule.cnf FATAL: Startup failure (dev note: apps_startup()) for ./apps/openssl ... No such file or directory:crypto/conf/conf_def.c:771:calling stat(fipsmodule.cnf) ... make: *** [Makefile:3341: install_fips] Error 1 because the `openssl fipsinstall` command was loading a previously installed configuration file instead of the copy shipped with the source tree. msp@debian:~/src/openssl$ strace -f make install_fips |& grep openssl.cnf [pid 128683] openat(AT_FDCWD, "/opt/openssl-dev/ssl/openssl.cnf", O_RDONLY) = 3 This issue reveiled a more general problem, which applies to the tests as well: unless openssl is installed, the openssl app must not use any preinstalled configuration file. This holds in particular when the preinstalled configuration file load providers, which caused the above failure. The most consistent way to achieve this behaviour is to set the OPENSSL_CONF environment variable to the correct location in the util/wrap.pl perl wrapper. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14136)
2021-03-03Fix the perl code to get FIPSMODULENAMERichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14320)
2021-03-03build.info: Make it possible to use compiled programs as generatorsRichard Levitte
Our goal is to be able to produce fipsmodule.cnf with the help of 'openssl fipsinstall', using the openssl program that we build. This refactors the generatesrc code in all the build file templates to replace $generator and $generator_incs with $gen0, $gen_args and $gen_incs, which makes it easier and more consistent to manipulate different bits of the generator command, and also keeps the variable names consistent while not overly long. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14320)
2021-03-03build.info: Add the possibility to add dependencies on raw targetsRichard Levitte
We need to add something for the 'tests' target to depend on, so a special syntax for those is introduced: DEPEND[|tests|]=fipsmodule.cnf Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14320)
2020-10-08windows-makefile.tmpl: Add a target to install the FIPS module configRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13032)
2020-08-17Fix broken windows builds.Shane Lontis
A miscellaneous '\' was accidently added to set FIPSKEY=$(FIPSKEY) which was causing some external CI build loops to not produce test results. It looks like it was accidently copied from the unix variant which requires the '\'. Thanks to Wolfgang Beck for tracking down the issue. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12661)
2020-07-15To generate makefile with correct parameters for WinCE.aSoujyuTanaka
Reviewed-by: Mark J. Cox <mark@awe.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11526)
2020-06-29Add --fips-key configuration parameter to fipsinstall application.Rich Salz
Change default FIPS HMAC KEY from all-zero's Use default FIPSKEY if not given on command line. Make all -macopt in fipsinstall optional Make all tests, except fipsinstall, use the default -macopt and -mac_name flags. Define and use FIPSDIR variable on VMS/MMS. Also use SRCDIR/BLDDIR in SRCTOP/BLDTOP. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12235)
2020-04-25Configurations/windows-makefile.tmpl: Fix template code for INSTALL_MODULESRichard Levitte
Fixes #11623 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11629)
2020-04-23Fix a typo in the makefile templatesMatt Caswell
The fips.so and legacy.so providers were not being installed because of a typo in the makefile templates. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11615)
2020-04-19Build files: add module installation targetsRichard Levitte
We only installed engines, now we also install other modules. Fixes #11559 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11566)
2020-03-31Windows makefile generator: Don't delete long lists of files in one goRichard Levitte
The Windows command line has its limits, and we're hitting it hard. We therefore generate one 'del' command for each explicit file for the 'clean' target. Fixes #11163 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/11171)
2020-03-02Build: Generate apps/progs.c and apps/progs.h in build timeRichard Levitte
util/progs.pl depends on the build tree (on configdata.pm, specifically), so it needs to be run from the build tree. But why stop there? We might as well generate apps/progs.c and apps/progs.h when building. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11185)
2020-02-27Build file templates: don't set OPENSSL_{ENGINES,MODULES}Richard Levitte
Since we've now switched to use util/wrap.pl to wrap uninstalled programs everywhere, there's no need to set the environment variables OPENSSL_ENGINES and OPENSSL_MODULES globally for the tests. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/11110)
2020-02-26Use a wrapper for pod2htmlRich Salz
Remove unused util/process_docs.pl Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10856)
2020-02-18TEST: Create test specific output directoriesRichard Levitte
We had all tests run with test/test-runs/ as working directory, and tests cleaned up after themselves... which is well and good, until you want to have a look at what went wrong when a complex test fails, and you have to recreate everything it does manually. To remedy this, we have OpenSSL::Test create the result directory dynamically (and cleaning it up first if it's already there) and let the test recipe have that as working directory. Test recipes are now encouraged to name their diverse output files uniquely, and not to clean them up, to allow a developer to have a look at the files that were produced. With continuous integration that allows this, the result directories could also be archived and be left as a build artifact. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11080)
2020-01-17Build file templates: Use explicit files instead of $< or $? for podsRichard Levitte
When generating html or manpages from POD files, we used $< or $? to get the file name to process. It turns out, though, that some make implementations only define $< with implicit rules, so its expansion remains empty in explicit rules. $? is a fine replacement, but only as long as we have one dependency, so it may cause problems in the future. The final solution seems to be to use explicit POD file names instead. That leaves no doubts. Fixes #10817 Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/10849)
2020-01-08nmake: fix install_html_docs targetDr. Matthias St. Pierre
The nmake rule contains actually two errors: 1. The $< target[1] does not work for regular rules and is expanded to an empty string after issuing the warning NMAKE : warning U4006: special macro undefined : '$<"' Solution: replace $< by $? 2. The substitution regex is not quoted correctly, which leads to the following error message by cmd.exe: 'href' is not recognized as an internal or external command, operable program or batch file. Solution: Quoting arguments for cmd.exe is really a nightmare, but with the help of the excellent description [2] I was able to properly quote the regex. Things were complicated by the fact that a lot of levels of unquoting needed to be considered: * perl (windows-makefile.tmpl -> makefile) * make (reading the makefile) * cmd.exe (executed by make) * perl (scanning command line using CommandLineToArgvW()) The fix works, but the regex has become unmaintainable. It would actually be better to wrap the entire command (including the regex) into a little perl script which can be called by make directly. [1] https://docs.microsoft.com/en-us/cpp/build/reference/filename-macros [2] https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ Fixes #10648 Fixes #10749 [extended tests] Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10719)
2020-01-07Configuration: synchronise the variables on the build file templatesRichard Levitte
For some reason, we didn't use some of the possible target attributes in the Unix Makefile template, and there was a similar but much smaller lack of use in the Windows makefile template as well. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10753)
2019-12-26Configurations/windows-makefile.tmpl: HTMLDOCS are files, not directoriesRichard Levitte
Remove them using "del", not "rmdir" Fixes #10553 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10555)
2019-12-19Make Windows build more robustHaohui Mai
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10586)
2019-12-14Deprecate most of debug-memoryRich Salz
Fixes #8322 The leak-checking (and backtrace option, on some platforms) provided by crypto-mdebug and crypto-mdebug-backtrace have been mostly neutered; only the "make malloc fail" capability remains. OpenSSL recommends using the compiler's leak-detection instead. The OPENSSL_DEBUG_MEMORY environment variable is no longer used. CRYPTO_mem_ctrl(), CRYPTO_set_mem_debug(), CRYPTO_mem_leaks(), CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return a failure code. CRYPTO_mem_debug_{malloc,realloc,free}() have been removed. All of the above are now deprecated. Merge (now really small) mem_dbg.c into mem.c Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10572)
2019-11-29Adapt *.tmpl to generate docs at build timeRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6236)
2019-10-20windows-makefile.tmpl: Convert all /I and /D to -I and -DRichard Levitte
We were not consistently using one or the other, and the perlasm code assumes dashes, which MSVC tolerates. Fixes #10075 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10222)
2019-10-14Building: Add modules with DEPENDs to GENERATEd filesRichard Levitte
For files GENERATEd from templates (.in files), any perl module (.pm file) that the file depends on will automatically be used. This means that these two lines: GENERATE[foo]=foo.in DEPEND[foo]=whatever.pm will emit this command in a Makefile (or corresponding): foo: foo.in whatever.pm configdata.pm $(PERL) -I. -Ipathto -Mwhatever -Mconfigdata $(SRCDIR)/util/dofile.pl \\ foo.in > foo Note that configdata.pm is automatically added, since util/dofile.pl itself depends on it. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10162)
2019-10-10Configure: rework build.info grammar and attributesRichard Levitte
The build.info grammar's regular expressions were a horrible read. By assigning certain sub-expressions to variables, we hope to make it a little more readable. Also, the handling of build.info attributes is reworked to use a common function instead of having copies of the same code. Finally, the attributes are reorganized to specify if they belong with programs, libraries, modules or scripts. This will enable more intricate attribute assignment in changes to come. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10088)