summaryrefslogtreecommitdiffstats
path: root/util/perl/OpenSSL/config.pm
AgeCommit message (Collapse)Author
2023-12-04Fix detection on HP-UX (IA64)Michael Osipov
HPE has a weird preference to prefix letters and zero-padding. Properly trim them before processing. CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22891) (cherry picked from commit 253c5667a92efbbd1498b2f5b883da23c11b8930)
2023-11-23Adapt C compiler detection for VSI C on x86_64Richard Levitte
VSI C on OpenVMS for x86_64 has a bit more information than on other hardware. This is no doubt because it's based on LLVM which leaves an opening for cross compilation. VSI C on Itanium: $ CC/VERSION VSI C V7.4-001 on OpenVMS IA64 V8.4-2L3 VSI C on x86_64: $ CC/VERSION VSI C x86-64 X7.4-843 (GEM 50XB9) on OpenVMS x86_64 V9.2-1 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22792) (cherry picked from commit df5e72d220d9c8b9316b1ce8e8c8bdf23c7201f0)
2023-05-30Update copyright yearTomas Mraz
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2023-05-22Update VMS configurationsRichard Levitte
A native x86_64 C compiler has appeared. We preserve the previous config target with a new name to indicate that it's for cross compilation, at least for the time being. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20983) (cherry picked from commit d6175dcca746f0996db18ab2b6b37a4152097afe)
2022-11-23Add BSD-armv4 target based on linux-armv4Piotr Kubaj
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18910) (cherry picked from commit a9389c0b75e69ebaf74fdc8fee0c983809e45931)
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-29OpenSSL::config: Fix trivial bugsRichard Levitte
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19285) (cherry picked from commit 2ba5bffa26c0c4677f48e730628c0b54c31c734c)
2022-09-29OpenSSL::config: Fix VMS guessesRichard Levitte
The MACHINE value from POSIX::uname() isn't trustworthy at all. MACHINE names like this has been seen: _HP__VMM___(1.67GHz/9.0MB) Perl's `$Config{archname}` is much more trustworthy, especially since VMS isn't a multiarch operating system, at least yet. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19285) (cherry picked from commit e63f5fdcb2658961f29fe7bed7968c0dcf7328a7)
2022-09-29OpenSSL::config: determine the MSVC target architecture by asking clRichard Levitte
Since cl knows what architecture it builds fore, all depending on what the user set up, it makes sense to ask it, and use that result primarly, and only use the POSIX::uname() MACHINE value as a fallback. Also, this does indeed determine if cl is present or not. We drop the explicit names in .github/workflows/windows.yml as proof of concept. Fixes #19281 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19285) (cherry picked from commit 0747f94b5f7b7f07f21384507ba1adaea6f99e88)
2022-05-05Detect arm64-*-*bsd and enable assembly optimizationsAllan Jude
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17084) (cherry picked from commit 8e22f9d6d956ad583afe10b986519731c113ac80)
2022-03-15Update copyright yearMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2022-02-16Force macOS 10.15 or later to be 64-bitTodd Short
macOS Catalina (10.15) no longer supports 32-bit applications. Do not wait 5 seconds to give the user the option of using KERNEL_BITS=32 Do not accept the KERNEL_BITS=32 option Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17675) (cherry picked from commit b926548b362531e8a64e7482c081611fab7183a8)
2021-12-27Add support for BSD-riscv64 targetPiotr Kubaj
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit c2d1ad0e048dd3bfa60e6aa0b5ee343cc6d97a15) (Merged from https://github.com/openssl/openssl/pull/17333)
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-08-19Set KERNEL_BITS, add CONFIG_NOWAITRich Salz
Avoid perl "undefined variable in regexp" message. Not all uses were changed because I wasn't sure. Add support for CONFIG_NOWAIT environment variable. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16325)
2021-06-27Update config.pmLĹ‘rinczy, Zsigmond
Missing '(' added into a PowerPC-specific command Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15911)
2021-05-25fix Solaris OS detection in config.pmJan Lana
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15439)
2021-04-27Add system guessing for linux64-riscv64 targetAndreas Schwab
CLA: trivial Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15023)
2021-03-11Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14512)
2021-02-23util/perl/OpenSSL/config.pm: Add VMS specific C compiler settingsRichard Levitte
That includes proper compiler version detection. Partially fixes #14247 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14270)
2021-02-23util/perl/OpenSSL/config.pm: Fix determine_compiler_settings()Richard Levitte
There may be times when a compiler can't be detected, in which case determine_compiler_settings() bailed out too early, before platform specific fallbacks have a chance to set the record straight. That bail out has been moved to be done after the platform specific fallbacks. Furthermore, the attempt to check for gcc or clang and get their version number was done even if no compiler had been automatically detected or pre-specified via $CC. It now only does this when there is a compiler specified or detected. The platform specific fallbacks check the versions separately. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14270)
2020-12-02Correct system guessing for darwin64-arm64 targetTim Hudson
Previously the system guessing logic would incorrectly guess i686-apple-darwin as the fallback for any unspecified architecture that is a Darwin target Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13517)
2020-11-06Correct system guessing for solaris64-x86_64-* targetsMatt Caswell
Previously the system guessing script was choosing a target that did not exist for these platforms. Fixes #13323 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13327)
2020-11-06Don't complain about uninitialized values when running ConfigureMatt Caswell
If a system understands `uname -X` then the Configure script will attempt to use uninitialized values. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13327)
2020-10-03Configuration: add initial NonStop values in OpenSSL::configRichard Levitte
This makes Configure work it's automatic config detection, at least for the simple straightforward cases. Fixes #12972 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/12973)
2020-08-27Ignore vendor name in Clang version number.Jung-uk Kim
For example, FreeBSD prepends "FreeBSD" to version string, e.g., FreeBSD clang version 11.0.0 (git@github.com:llvm/llvm-project.git llvmorg-11.0.0-rc2-0-g414f32a9e86) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin This prevented us from properly detecting AVX support, etc. CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/12725)
2020-07-04util/perl/OpenSSL/config.pm: Fix /armv[7-9].*-.*-linux2/Richard Levitte
This entry added the macro B_ENDIAN when it shouldn't have. Fixes #12332 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12335)
2020-07-04util/perl/OpenSSL/config.pm: move misplaced Windows and VMS entriesRichard Levitte
OpenSSL::config::guess_system() is supposed to return system triplets. However, for Windows and VMS, it returned the final OpenSSL config target instead. We move the entries for them to the table that OpenSSL::config::map_guess() uses, so it can properly convert the input triplet to an OpenSSL config target. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12339)
2020-06-28util/perl/OpenSSL/config.pm: refactor guess_system()Richard Levitte
There's no reason to have two different tables, when we can simply detect if the tuple elements are code or scalar. Furthermore, order is important in some cases, and that order is harder not to say impossible when maintaining two tables. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28util/perl/OpenSSL/config.pm: remove expand() and use evalRichard Levitte
The strings we expand contain other variable references than just ${MACHINE}. Instead of having to remember what to expand, we simply evaluate the string as a, well, string. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28util/perl/OpenSSL/config.pm: refactor map_guess()Richard Levitte
map_guess() is now table driven, just like get_system(). Additionally, it now takes a config hash table and returns one of its own. This way, 'Configure' can pass whatever it has already found to OpenSSL::config::get_platform(), and easily merge the returned hash table into its %config. This also gets rid of variables that we no longer need. That includes $PERL and all the $__CNF_ environment variables. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28util/perl/OpenSSL/config.pm, Configure: move check of target with compilerRichard Levitte
Previously, ./config would check if "$target-$CC", then "$target" exists and choose the one that does. This is now moved to Configure. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28util/perl/OpenSSL/config.pm: Rework determining compiler informationRichard Levitte
determine_compiler_settings() has been refactored to: - find a compiler if none has been given by the user - allow platform specific overrides, but only when the user didn't already specify a desired compiler - figure out the compiler vendor and version, making sure that the version number is deterministic - gather platform specific compiler information Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28Remove OpenSSL::config::main(), it's not necessaryRichard Levitte
This also remove all option parsing. We leave that to Configure. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28util/perl/OpenSSL/config.pm: Prefer POSIX::uname() over piping the commandRichard Levitte
POSIX::uname() has the advantage to work on non-POSIX systems as well, such as the Windows command prompt and VMS. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28util/perl/OpenSSL/config.pm: Don't detect removed directories inRichard Levitte
This is much better handled in Configure. [There's another PR moving this to Configure, so this commit should eventually disappear because rebase] Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)
2020-06-28Initial rewrite of config as a Perl moduleRich Salz
- Use $^X; to find perl. - Big re-ordering: Put all variables at the top, move most inline code into functions. The heart of the script now basically just calls functions to do its work. - Unify warning text, add -w option - Don't use needless (subshells) - Ensure Windows gets a VC-xxx option - Make config a perl module - Top-level "config" command-line is a dummy that just calls the module. Added module stuff so that it can be called from Configure. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11230)