summaryrefslogtreecommitdiffstats
path: root/Configure
AgeCommit message (Collapse)Author
7 daysConfigure: make absolutedir() use rel2abs() on Windows tooopenssl-3.1Richard Levitte
perl's realpath() seems to be buggy on Windows, so we turn to rel2abs() there as well. Fixes #23593 Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24569) (cherry picked from commit 6e01d3114b77c82cf83a2bfe53f7ba97840fbe36)
2024-06-04Copyright year updatesTomas Mraz
Reviewed-by: Neil Horman <nhorman@openssl.org> Release: yes
2024-02-22Add atexit configuration option to using atexit() in libcrypto at build-time.Randall S. Becker
This fixes an issue with a mix of atexit() usage in DLL and statically linked libcrypto that came out in the test suite on NonStop, which has slightly different DLL unload processing semantics compared to Linux. The change allows a build configuration to select whether to register OPENSSL_cleanup() with atexit() or not, so avoid situations where atexit() registration causes SIGSEGV. INSTALL.md and CHANGES.md have been modified to include and describe this option. Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca> Signed-off-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23642) (cherry picked from commit 0e1989d4c7435809b60f614c23ba8c9a7c0373e8)
2023-12-08Configure: Refuse to make directories in the source treeRichard Levitte
Fixes #22907 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22934)
2023-11-15Configure: do not check for an absolute prefix in cross-buildsViktor Szakats
The check is always made according to the host platform's rules, which may not be true for true when the target platform is different, e.g. when cross-building for Windows on a Linux machine. So skip this check when used together with the `--cross-compile-prefix=` option. Fixes https://github.com/openssl/openssl/issues/9520 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22723) (cherry picked from commit 4ea752997df83c2a694fdb157aab07908303fc90)
2023-07-17no-module should not imply disabling DSO loading supportTomas Mraz
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21459) (cherry picked from commit 3d2f96e2c867fa3e79a453639304b70ba0508076)
2023-03-20Fix Configure test for -mips in CFLAGSMike Gilbert
We want to add -mips2 or -mips3 only if the user hasn't already specified a mips version in CFLAGS. The existing test was a double-negative. CLA: trivial Fixes: https://github.com/openssl/openssl/issues/20214 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20273) (cherry picked from commit 8b399c5e51b4d010650cb344a67a696daf096a05)
2023-03-14Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Release: yes (Merged from https://github.com/openssl/openssl/pull/20508)
2023-02-01Use $config{build_file} instead of $target{build_file}Richard Levitte
If the user specifies an alternative build file than the default, this alternative is recorded in $config{build_file}, not $target{build_file}. Therefore, the former should be used, leaving the latter as a mere default. This is a bug. While fixing it, document it better too. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20173) (cherry picked from commit aa2d7e0ee15d1b7015479c38f370a25ceec690fc)
2022-11-11Configure: don't try to be clever when configuring afalgengRoss Burton
If the afalgeng is enabled then Configure tries to be clever but fails, by only actually building afalgeng if it isn't being cross-compiled and if the current kernel is 4.1+. This means that everyone cross compiling, or whose builder machines are running older kernels (not uncommon for build farms), can't enable afalgeng. Instead remove the cleverness and simply enable/disable as requested. Fixes #7687 CLA: trivial Signed-off-by: Ross Burton <ross.burton@arm.com> Change-Id: I023b6cb535d5b5811823d4814fa939de3f304886 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7688) (cherry picked from commit 9e1a54f4a187195fc417ad0f90e84d208d478968)
2022-11-09Fix typosDimitris Apostolou
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17392) (cherry picked from commit e304aa87b35fac5ea97c405dd3c21549faa45e78)
2022-11-09Add support for BSD-ppc, BSD-ppc64 and BSD-ppc64le configurationspkubaj
OpenSSL assumes AT_HWCAP = 16 (as on Linux), but on FreeBSD AT_HWCAP = 25 Switch to using AT_HWCAP, and setting it to 16 if it is not defined. CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17090) (cherry picked from commit f5485b97b6c9977c0d39c7669b9f97a879312447)
2022-09-19Fix detection of ktls support in cross-compile environment on LinuxTomas Mraz
Fixes #19212 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19213) (cherry picked from commit 9b25f52a4425d03fee1364d3531331d5d37ef742)
2022-08-23Always automatically add -DPEDANTIC with enable-ubsanTomas Mraz
To avoid reports like: #19028 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19029) (cherry picked from commit 83529f07ca66ec288f1c506a673569b9d8de8368)
2022-07-24Don't try to make configuration leanerRichard Levitte
This partially reverts Github PR #16378: commit 764cf5b26306a8712e8b3d41599c44dc5ed07a25, titled "Configuration: only produce a new configdata.pm if it has changed contents" Unfortunately, the attempt to make configuration leaner didn't take into account all the files that may or may not affect the outcome of `configdata.pm`, and most of all, didn't take into account that `Makefile` has clauses of its own to determined when a reconfiguration is needed, all based on time stamps. Something as simple as a changed `Configurations/10-main.conf`, where the change doesn't affect the resulting `configdata.pm` gets `make` into a reconfiguration loop, because `configdata.pm` is older than `10-main.conf`. The lesson to remember is not to try to outsmart `make` in cases like this. We retain the other parts of the PR mentioned, as they are still valid. needed to be taken into account (all the Configurations/*.conf as well as all the build.info) Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/18832) (cherry picked from commit 54a84f02998b72fa63cd5309d915e43cfd85a06b)
2022-06-21Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2022-05-22Building: For the FIPS module checksum, keep track of configuration,hRichard Levitte
The FIPS module checksum needs to know that configuration.h is generated from configuration.h.in, so that information is conserved. To make this possible, it's now possible to have attributes with the GENERATE keyword, and the attribute "skip" is added to make a keyword a no-op, which makes it informative only. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/16378) (cherry picked from commit 4d02d500aac80c136e3d6582b908e0fab77bbf42)
2022-05-22Configuration: produce include/openssl/configuration.h when configuringRichard Levitte
The goal is to avoid having too much of the OpenSSL source rebuilt because include/openssl/configuration.h, or even because it was a Makefile target that was called upon (some make implementations consider the use of a target as an update of that target, even if it wasn't really updated). To resolve this, we move the production of include/openssl/configuration.h to configdata.pm, and only update it if there were any actual changes. Fixes #16377 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/16378) (cherry picked from commit 2522889620446f1e56338367d1b6b028ea952bb4)
2022-05-22Configuration: only produce a new configdata.pm if it has changed contentsRichard Levitte
The goal is to avoid having too much of the OpenSSL source rebuilt because configdata.pm got a new time stamp. The conditions for updating configdata.pm are now: 1. its time stamp is older than Configure's, or... 2. its contents has changed. Fixes #16377 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/16378) (cherry picked from commit 764cf5b26306a8712e8b3d41599c44dc5ed07a25)
2021-12-23Fix Configure variable spillAlexandros Roussos
* Evaluating code-refs in Configure can sometimes set the default variable `$_` * Prevent spillage influencing the target property by using named variable in loop CLA: trivial Fixes gh-17321 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17322) (cherry picked from commit a595e3286ae9f033c56452967b3add2145f9085f)
2021-08-20Replace CONFIG_NOWAIT env var with -w optionRich Salz
And document the -w option Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16325)
2021-07-17config: enable ACVP test case if FIPS is enabled.Pauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16095)
2021-06-23Configure: Reflect that We don't build loader_attic when dynamic-engine is ↵Richard Levitte
disabled Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15858)
2021-06-11Configure: Allow spaces around '=' in all build.info statementsRichard Levitte
This was allowed already for some statements, but not consistently for all. Fixes #15684 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15691)
2021-06-10Enable ssl-trace by defaultArran Cudbard-Bell
There doesn't appear to be a good reason to omit protocol message tracing by default. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15665)
2021-06-02Configure: variable expand GENERATE values tooRichard Levitte
Internal documentation doesn't allow for any exception... Therefore, even GENERATE values should be variable expanded. (there are historical reasons why GENERATE was excepted from variable expansion, that aren't applicable any more) Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15554)
2021-05-28Rework and make DEBUG macros consistent.Rich Salz
Remove unused -DCONF_DEBUG and -DBN_CTX_DEBUG. Rename REF_PRINT to REF_DEBUG for consistency, and add a new tracing category and use it for printing reference counts. Rename -DDEBUG_UNUSED to -DUNUSED_RESULT_DEBUG Fix BN_DEBUG_RAND so it compiles and, when set, force DEBUG_RAND to be set also. Rename engine_debug_ref to be ENGINE_REF_PRINT also for consistency. Fixes #15357 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15353)
2021-05-26Fix -static builds on masterTom Cosgrove
Pull in Todd Short's fix cfd7225fbb from 1.1.1, which moves the disabling of pic, threads and statics to before they are checked. Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15214)
2021-05-22Make it possible to disable the loader_attic engineRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15320)
2021-05-22configure: build list of image filesPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15399)
2021-05-21Clean up the "fips" option to ConfigureMatt Caswell
Don't die if someone says "fips" instead of "enable-fips" Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15346)
2021-05-19build.info: Make it possible to set attributes on SOURCE / SHARED_SOURCE stmtsRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15332)
2021-05-19Rework how a build file (Makefile, ...) is producedRichard Levitte
The memory footprint of how we produced the Makefile was quite... important, because we have all the processing in one perl snippet, and generate the details of the build file by appending to the "magic" variable $OUT. The result is that this variable gets to hold the majority of the build file text, and depending on memory reallocation strategies for strings, the heap may hold multiple (possibly not just a few) copies of this string, almost all of them "freed" but still taking up space. This has resulted in memory exhaustion. We therefore change strategy, and generate the build file in two phases, where the first phase generates the full template using small perl snippets for each detail, and the second phase processes this template. This is much kinder to process memory. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15310)
2021-05-14Add --banner config optionRich Salz
Use it in the automated workflows. Fixes: #15247 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15248)
2021-05-02acvp-test: disable the ACVP testing code by defaultPauli
It's only useful for the FIPS lab and shouldn't be in production. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15092)
2021-04-30acvp: fix the no-acvp_test buildPauli
A pair of the disabled string checks were incorrect. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15082)
2021-04-29Configure: disable fips mode by defaultDr. Matthias St. Pierre
Building the fips provider in addition to the default provider effectively doubles the build time. Since many users will not need fips support, it is now disabled by default. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure: sort the disablables alphabeticallyDr. Matthias St. Pierre
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-23Runchecker: fix failure with no-autoalginit option by disabling FIPSPauli
With this option, the openssl command line tool is not created. Without that it is impossible to create the fipsmodule.cnf file that the tests would otherwise depend upon. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14979)
2021-04-22Avoid the need for Configure time 128-bit int detectionMatt Caswell
We just detect this at compile time instead. This avoids cross-compilation problems where the host platform supports 128-bit ints, but the target platform does not (or vice versa). This was causing a problem on some platforms where, dependent on the CFLAGS, 128 bit ints were either supported or not. Fixes #14804 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14941)
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-08Configure: Check if 128-bit integers are supported by compilerAmitay Isaacs
Add a config variable "use_int128" to indicate if 128-bit integers are supported or not at the configure time. This makes it easier to automatically select 64-bit versus 32-bit implementation for curve448. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14784)
2021-03-23Disable fips-securitychecks if no-fips is configured.Randall S. Becker
Fixes: #14629 Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14634)
2021-03-19Configure: check all DEPEND values against GENERATE, not just .h filesRichard Levitte
All files that are given to DEPEND statements in build.info files are being checked against GENERATE statements, to see if it's reasonable to look for them in the source tree or not. This was only done for .h files, for reasons that are lost in history. We now change that check to look at all files instead. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14598)
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)
2021-02-12Deprecate the low level SRP APIsMatt Caswell
The OTC decided that all low level APIs should be deprecated. This extends to SRP, even though at the current time there is no "EVP" interface to it. This could be added in a future release. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14132)
2021-02-12Add a configure time option to disable the fetch cache.Pauli
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14126)
2021-02-05Stop disabling TLSv1.3 if ec and dh are disabledMatt Caswell
Even if EC and DH are disabled then we may still be able to use TLSv1.3 if we have groups that have been plugged in by an external provider. Fixes #13767 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13916)