Commit bda1af6d authored by Richard Levitte's avatar Richard Levitte
Browse files

Configure: try to make sure every config target name is unique



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5047)

(cherry picked from commit 225f980d)
parent 7d22f2e0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -18,10 +18,14 @@ configuration in diverse ways:
Configurations of OpenSSL target platforms
==========================================

Target configurations are a collection of facts that we know about
Configuration targets are a collection of facts that we know about
different platforms and their capabilities.  We organise them in a
hash table, where each entry represent a specific target.

Note that configuration target names must be unique across all config
files.  The Configure script does check that a config file doesn't
have config targets that shadow config targets from other files.

In each table entry, the following keys are significant:

        inherit_from    => Other targets to inherit values from.
+11 −0
Original line number Diff line number Diff line
@@ -2271,6 +2271,17 @@ sub read_config {
	eval $content;
	warn $@ if $@;
    }
    my %preexisting = ();
    foreach (sort keys %targets) {
        $preexisting{$_} = 1 if $table{$_};
    }
    die <<"EOF",
The following config targets from $fname
shadow pre-existing config targets with the same name:
EOF
        map { "  $_\n" } sort keys %preexisting
        if %preexisting;


    # For each target, check that it's configured with a hash table.
    foreach (keys %targets) {