Generate dependency information
[openssl.git] / Configurations / 10-main.conf
index 4f5e3636f498bc629680ba078192e613b9952a4a..f5e5754b3a6cdf467b448904643dd0964f2f3fcf 100644 (file)
@@ -211,17 +211,28 @@ my %targets = (
         ex_libs          => add("-lsocket -lnsl -ldl"),
         dso_scheme       => "dlfcn",
         thread_scheme    => "pthreads",
+    },
+#### Solaris common with Sun C setups
+    "solaris-common-cc" => {
+        inherit_from     => [ "solaris-common" ],
+        template         => 1,
         shared_target    => "solaris",
         shared_ldflag    => "-Wl,-Bsymbolic",
         shared_defflag   => "-Wl,-M,",
         shared_sonameflag=> "-Wl,-h,",
     },
+#### Solaris common with GNU C setups
+    "solaris-common-gcc" => {
+        inherit_from     => [ "solaris-common" ],
+        template         => 1,
+        shared_target    => "solaris-gcc-shared", # The rest is on shared_info.pl
+    },
 #### Solaris x86 with GNU C setups
     "solaris-x86-gcc" => {
         # NB. GNU C has to be configured to use GNU assembler, and not
         # /usr/ccs/bin/as. Failure to comply will result in compile
         # failures [at least] in 32-bit build.
-        inherit_from     => [ "solaris-common" ],
+        inherit_from     => [ "solaris-common-gcc" ],
         CC               => "gcc",
         CFLAGS           => add_before(picker(default => "-Wall",
                                               debug   => "-O0 -g",
@@ -244,7 +255,7 @@ my %targets = (
         # code [thanks to inline assembler], I would actually recommend
         # to consider using gcc shared build even with vendor compiler:-)
         #                        -- <appro@openssl.org>
-        inherit_from     => [ "solaris-common" ],
+        inherit_from     => [ "solaris-common-gcc" ],
         CC               => "gcc",
         CFLAGS           => add_before(picker(default => "-Wall",
                                               debug   => "-O0 -g",
@@ -265,7 +276,7 @@ my %targets = (
     # primarily because vendor assembler can't assemble our modules
     # with -KPIC flag. As result it, assembly support, was not even
     # available as option. But its lack means lack of side-channel
-    # resistant code, which is incompatible with security by todays
+    # resistant code, which is incompatible with security by today's
     # standards. Fortunately gcc is readily available prepackaged
     # option, which we can firmly point at...
     #
@@ -274,7 +285,7 @@ my %targets = (
     # Consider switching to solaris64-x86_64-gcc even here...
     #
     "solaris64-x86_64-cc" => {
-        inherit_from     => [ "solaris-common" ],
+        inherit_from     => [ "solaris-common-cc" ],
         CC               => "cc",
         CFLAGS           => add_before(picker(debug   => "-g",
                                               release => "-xO5 -xdepend -xbuiltin")),
@@ -294,7 +305,7 @@ my %targets = (
 
 #### SPARC Solaris with GNU C setups
     "solaris-sparcv7-gcc" => {
-        inherit_from     => [ "solaris-common" ],
+        inherit_from     => [ "solaris-common-gcc" ],
         CC               => "gcc",
         CFLAGS           => add_before(picker(default => "-Wall",
                                               debug   => "-O0 -g",
@@ -332,7 +343,7 @@ my %targets = (
 # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
 # SC5.0 note: Compiler common patch 107357-01 or later is required!
     "solaris-sparcv7-cc" => {
-        inherit_from     => [ "solaris-common" ],
+        inherit_from     => [ "solaris-common-cc" ],
         CC               => "cc",
         CFLAGS           => add_before(picker(debug   => "-g",
                                               release => "-xO5 -xdepend")),
@@ -450,7 +461,7 @@ my %targets = (
 #   32-bit message digests. (For the moment of this writing) HP C
 #   doesn't seem to "digest" too many local variables (they make "him"
 #   chew forever:-). For more details look-up MD32_XARRAY comment in
-#   crypto/sha/sha_lcl.h.
+#   crypto/sha/sha_local.h.
 # - originally there were 32-bit hpux-parisc2-* targets. They were
 #   scrapped, because a) they were not interchangeable with other 32-bit
 #   targets; b) performance-critical 32-bit assembly modules implement
@@ -695,6 +706,7 @@ my %targets = (
         inherit_from     => [ "linux-generic32" ],
         asm_arch         => 'ppc32',
         perlasm_scheme   => "linux32",
+        lib_cppflags     => add("-DB_ENDIAN"),
     },
     "linux-ppc64" => {
         inherit_from     => [ "linux-generic64" ],
@@ -779,7 +791,7 @@ my %targets = (
         inherit_from     => [ "linux-generic32" ],
         cflags           => add("-mabi=n32"),
         cxxflags         => add("-mabi=n32"),
-        bn_ops           => "SIXTY_FOUR_BIT RC4_CHAR",
+        bn_ops           => "RC4_CHAR",
         asm_arch         => 'mips64',
         perlasm_scheme   => "n32",
         multilib         => "32",
@@ -793,6 +805,13 @@ my %targets = (
         multilib         => "64",
     },
 
+    # riscv64 below refers to contemporary RISCV Architecture
+    # specifications,
+    "linux64-riscv64" => {
+        inherit_from     => [ "linux-generic64"],
+        perlasm_scheme   => "linux64",
+    },
+
     #### IA-32 targets...
     #### These two targets are a bit aged and are to be used on older Linux
     #### machines where gcc doesn't understand -m32 and -m64
@@ -993,7 +1012,6 @@ my %targets = (
         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
         lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "BN_LLONG",
-        shared_target    => "bsd-shared",
         asm_arch         => 'x86',
         perlasm_scheme   => "a.out",
     },
@@ -1051,23 +1069,6 @@ my %targets = (
         shared_cflag     => "-fPIC",
     },
 
-    "nextstep" => {
-        inherit_from     => [ "BASE_unix" ],
-        CC               => "cc",
-        CFLAGS           => "-O -Wall",
-        unistd           => "<libc.h>",
-        bn_ops           => "BN_LLONG",
-        thread_scheme    => "(unknown)",
-    },
-    "nextstep3.3" => {
-        inherit_from     => [ "BASE_unix" ],
-        CC               => "cc",
-        CFLAGS           => "-O3 -Wall",
-        unistd           => "<libc.h>",
-        bn_ops           => "BN_LLONG",
-        thread_scheme    => "(unknown)",
-    },
-
 #### SCO/Caldera targets.
 #
 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
@@ -1171,6 +1172,7 @@ my %targets = (
         module_ldflags   => "-Wl,-G,-bsymbolic,-bnoentry",
         shared_ldflag    => "-Wl,-G,-bsymbolic,-bnoentry",
         shared_defflag   => "-Wl,-bE:",
+        shared_fipsflag  => "-Wl,-binitfini:init:cleanup",
         perl_platform    => 'AIX',
     },
     "aix-gcc" => {
@@ -1179,7 +1181,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => add(threads("-pthread")),
-        ex_libs          => threads("-pthread"),
+        ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         asm_arch         => 'ppc32',
         perlasm_scheme   => "aix32",
@@ -1193,7 +1195,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => combine("-maix64", threads("-pthread")),
-        ex_libs          => threads("-pthread"),
+        ex_libs          => add(threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         asm_arch         => 'ppc64',
         perlasm_scheme   => "aix64",
@@ -1210,7 +1212,7 @@ my %targets = (
         cflags           => combine("-q32 -qmaxmem=16384 -qro -qroconst",
                                     threads("-qthreaded")),
         cppflags         => threads("-D_THREAD_SAFE"),
-        ex_libs          => threads("-lpthreads"),
+        ex_libs          => add(threads("-lpthreads")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         asm_arch         => 'ppc32',
         perlasm_scheme   => "aix32",
@@ -1226,7 +1228,7 @@ my %targets = (
         cflags           => combine("-q64 -qmaxmem=16384 -qro -qroconst",
                                     threads("-qthreaded")),
         cppflags         => threads("-D_THREAD_SAFE"),
-        ex_libs          => threads("-lpthreads"),
+        ex_libs          => add(threads("-lpthreads")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         asm_arch         => 'ppc64',
         perlasm_scheme   => "aix64",
@@ -1273,10 +1275,22 @@ my %targets = (
         inherit_from     => [ "BASE_Windows" ],
         template         => 1,
         CC               => "cl",
-        CPP              => '$(CC) /EP /C',
+        CPP              => '"$(CC)" /EP /C',
         CFLAGS           => "/W3 /wd4090 /nologo",
-        LDFLAGS          => add("/debug"),
         coutflag         => "/Fo",
+        cpp_depend_flags => "/Zs /showIncludes",
+        LD               => "link",
+        LDFLAGS          => "/nologo /debug",
+        ldoutflag        => "/out:",
+        ldpostoutflag    => "",
+        ld_resp_delim    => "\n",
+        bin_lflags       => "setargv.obj",
+        AR               => "lib",
+        ARFLAGS          => "/nologo",
+        aroutflag        => "/out:",
+        ar_resp_delim    => "\n",
+        RC               => "rc",
+        rcoutflag        => "/fo",
         defines          => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN",
                                 "UNICODE", "_UNICODE",
                                 "_CRT_SECURE_NO_DEPRECATE",
@@ -1289,9 +1303,11 @@ my %targets = (
         shared_defflag   => '',
         shared_ldflag    => "/dll",
         shared_target    => "win-shared", # meaningless except it gives Configure a hint
+        lddefflag        => "/def:",
+        ldresflag        => " ",
+        ld_implib_flag   => "/implib:",
         thread_scheme    => "winthreads",
         dso_scheme       => "win32",
-        bn_ops           => "EXPORT_VAR_AS_FN",
         perl_platform    => 'Windows::MSVC',
         # additional parameter to build_scheme denotes install-path "flavour"
         build_scheme     => add("VC-common", { separator => undef }),
@@ -1370,7 +1386,6 @@ my %targets = (
     },
     "VC-WIN32" => {
         inherit_from     => [ "VC-noCE-common" ],
-        CFLAGS           => add("/WX"),
         AS               => sub { vc_win32_info()->{AS} },
         ASFLAGS          => sub { vc_win32_info()->{ASFLAGS} },
         asoutflag        => sub { vc_win32_info()->{asoutflag} },
@@ -1425,9 +1440,9 @@ my %targets = (
             }
             push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
                 if (defined(env('PORTSDK_LIBPATH')));
-            push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
-                if (env('TARGETCPU') eq "X86");
-            return @ex_libs;
+            push @ex_libs, '/nodefaultlib coredll.lib corelibc.lib'
+                if (env('TARGETCPU') =~ /^X86|^ARMV4[IT]/);
+            return join(" ", @ex_libs);
         }),
     },
 
@@ -1443,7 +1458,6 @@ my %targets = (
                                     threads("-D_MT")),
         lib_cppflags     => "-DL_ENDIAN",
         ex_libs          => add("-lws2_32 -lgdi32 -lcrypt32"),
-        bn_ops           => "EXPORT_VAR_AS_FN",
         thread_scheme    => "winthreads",
         dso_scheme       => "win32",
         shared_target    => "mingw-shared",
@@ -1492,6 +1506,16 @@ my %targets = (
         lib_cppflags     => "-DL_ENDIAN",
         sys_id           => "UEFI",
     },
+    "UEFI-x86" => {
+        inherit_from     => [ "UEFI" ],
+        asm_arch         => 'x86',
+        perlasm_scheme   => "win32n",
+    },
+    "UEFI-x86_64" => {
+        inherit_from     => [ "UEFI" ],
+        asm_arch         => 'x86_64',
+        perlasm_scheme   => "nasm",
+    },
 
 #### UWIN
     "UWIN" => {
@@ -1562,7 +1586,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O3"),
         cppflags         => threads("-D_REENTRANT"),
-        lflags           => "-Wl,-search_paths_first",
+        lflags           => add("-Wl,-search_paths_first"),
         sys_id           => "MACOSX",
         bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -1576,7 +1600,8 @@ my %targets = (
     # Option "freeze" such as -std=gnu9x can't negatively interfere
     # with future defaults for below two targets, because MacOS X
     # for PPC has no future, it was discontinued by vendor in 2009.
-    "darwin-ppc-cc" => {
+    "darwin-ppc-cc" => { inherit_from => [ "darwin-ppc" ] }, # Historic alias
+    "darwin-ppc" => {
         inherit_from     => [ "darwin-common" ],
         cflags           => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"),
         lib_cppflags     => add("-DB_ENDIAN"),
@@ -1584,7 +1609,8 @@ my %targets = (
         asm_arch         => 'ppc32',
         perlasm_scheme   => "osx32",
     },
-    "darwin64-ppc-cc" => {
+    "darwin64-ppc-cc" => { inherit_from => [ "darwin64-ppc" ] }, # Historic alias
+    "darwin64-ppc" => {
         inherit_from     => [ "darwin-common" ],
         cflags           => add("-arch ppc64 -std=gnu9x"),
         lib_cppflags     => add("-DB_ENDIAN"),
@@ -1592,7 +1618,8 @@ my %targets = (
         asm_arch         => 'ppc64',
         perlasm_scheme   => "osx64",
     },
-    "darwin-i386-cc" => {
+    "darwin-i386-cc" => { inherit_from => [ "darwin-i386" ] }, # Historic alias
+    "darwin-i386" => {
         inherit_from     => [ "darwin-common" ],
         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
         cflags           => add("-arch i386"),
@@ -1601,7 +1628,8 @@ my %targets = (
         asm_arch         => 'x86',
         perlasm_scheme   => "macosx",
     },
-    "darwin64-x86_64-cc" => {
+    "darwin64-x86_64-cc" => { inherit_from => [ "darwin64-x86_64" ] }, # Historic alias
+    "darwin64-x86_64" => {
         inherit_from     => [ "darwin-common" ],
         CFLAGS           => add("-Wall"),
         cflags           => add("-arch x86_64"),
@@ -1610,6 +1638,16 @@ my %targets = (
         asm_arch         => 'x86_64',
         perlasm_scheme   => "macosx",
     },
+    "darwin64-arm64-cc" => { inherit_from => [ "darwin64-arm64" ] }, # "Historic" alias
+    "darwin64-arm64" => {
+        inherit_from     => [ "darwin-common" ],
+        CFLAGS           => add("-Wall"),
+        cflags           => add("-arch arm64"),
+        lib_cppflags     => add("-DL_ENDIAN"),
+        bn_ops           => "SIXTY_FOUR_BIT_LONG",
+        asm_arch         => 'aarch64',
+        perlasm_scheme   => "ios64",
+    },
 
 ##### GNU Hurd
     "hurd-x86" => {
@@ -1785,7 +1823,7 @@ my %targets = (
                                    debug   => "/DEBUG/TRACEBACK",
                                    release => "/NODEBUG/NOTRACEBACK"),
         # Because of dso_cflags below, we can't set the generic |cflags| here,
-        # as it can't be overriden, so we set separate C flags for libraries
+        # as it can't be overridden, so we set separate C flags for libraries
         # and binaries instead.
         bin_cflags       => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
         lib_cflags       => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),