]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - Configurations/10-main.conf
AIX: Implement shared_target = "aix-solib" support
[thirdparty/openssl.git] / Configurations / 10-main.conf
index 5baab6f306f133d917d279ebcf7dae6fe4cd9ebe..c9db9aac28ebdaebeb8ad77768db1ac10a7245c6 100644 (file)
@@ -9,19 +9,22 @@ sub vc_win64a_info {
             $vc_win64a_info = { AS        => "nasm",
                                 ASFLAGS   => "-g",
                                 asflags   => "-Ox -f win64 -DNEAR",
-                                asoutflag => "-o " };
+                                asoutflag => "-o ",
+                                perlasm_scheme => "nasm" };
         } elsif ($disabled{asm}) {
             # assembler is still used to compile uplink shim
             $vc_win64a_info = { AS        => "ml64",
                                 ASFLAGS   => "/nologo /Zi",
                                 asflags   => "/c /Cp /Cx",
-                                asoutflag => "/Fo" };
+                                asoutflag => "/Fo",
+                                perlasm_scheme => "masm" };
         } else {
             $die->("NASM not found - make sure it's installed and available on %PATH%\n");
             $vc_win64a_info = { AS        => "{unknown}",
                                 ASFLAGS   => "",
                                 asflags   => "",
-                                asoutflag => "" };
+                                asoutflag => "",
+                                perlasm_scheme => "auto" };
         }
     }
     return $vc_win64a_info;
@@ -134,7 +137,9 @@ sub vms_info {
     }
 
     unless (%$vms_info) {
-        $vms_info->{disable_warns} = [ ];
+        $vms_info->{disable_warns} = [
+            "CXXPRAGMANA",      # Shut up about unknown / unsupported pragmas
+        ];
         $vms_info->{pointer_size} = $pointer_size_str;
         if ($pointer_size_str eq "64") {
             `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
@@ -237,9 +242,7 @@ my %targets = (
         CFLAGS           => add_before(picker(default => "-Wall",
                                               debug   => "-O0 -g",
                                               release => "-O3 -fomit-frame-pointer")),
-        cflags           => add(threads("-pthread")),
         lib_cppflags     => add("-DL_ENDIAN"),
-        ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG",
         shared_cflag     => "-fPIC",
         shared_ldflag    => add_before("-shared -static-libgcc"),
@@ -260,9 +263,8 @@ my %targets = (
         CFLAGS           => add_before(picker(default => "-Wall",
                                               debug   => "-O0 -g",
                                               release => "-O3")),
-        cflags           => add_before("-m64", threads("-pthread")),
+        cflags           => add("-m64"),
         lib_cppflags     => add("-DL_ENDIAN"),
-        ex_libs          => add(threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         asm_arch         => 'x86_64',
         perlasm_scheme   => "elf",
@@ -294,7 +296,6 @@ my %targets = (
         lib_cppflags     => add("-DL_ENDIAN"),
         thread_scheme    => "pthreads",
         lflags           => add(threads("-mt")),
-        ex_libs          => add(threads("-lpthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         asm_arch         => 'x86_64',
         perlasm_scheme   => "elf",
@@ -310,12 +311,10 @@ my %targets = (
         CFLAGS           => add_before(picker(default => "-Wall",
                                               debug   => "-O0 -g",
                                               release => "-O3")),
-        cflags           => add(threads("-pthread")),
         lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
-        ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-fPIC",
-        shared_ldflag    => add_before("-shared"),
+        shared_ldflag    => add_before("-shared -static-libgcc"),
     },
     "solaris-sparcv8-gcc" => {
         inherit_from     => [ "solaris-sparcv7-gcc" ],
@@ -351,7 +350,6 @@ my %targets = (
         cppflags         => add(threads("-D_REENTRANT")),
         lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
         lflags           => add(threads("-mt")),
-        ex_libs          => add(threads("-lpthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-KPIC",
         shared_ldflag    => add_before("-G -dy -z text"),
@@ -371,7 +369,7 @@ my %targets = (
     },
     "solaris64-sparcv9-cc" => {
         inherit_from     => [ "solaris-sparcv7-cc" ],
-        cflags           => add_before("-xarch=v9"),
+        cflags           => add_before("-m64 -xarch=sparc"),
         bn_ops           => "BN_LLONG RC4_CHAR",
         asm_arch         => 'sparcv9',
         perlasm_scheme   => 'void',
@@ -697,15 +695,20 @@ my %targets = (
         shared_ldflag    => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
         enable           => [ "afalgeng" ],
     },
+    "linux-latomic" => {
+        inherit_from     => [ "linux-generic32" ],
+        ex_libs          => add(threads("-latomic")),
+    },
     "linux-generic64" => {
         inherit_from     => [ "linux-generic32" ],
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
     },
 
     "linux-ppc" => {
-        inherit_from     => [ "linux-generic32" ],
+        inherit_from     => [ "linux-latomic" ],
         asm_arch         => 'ppc32',
         perlasm_scheme   => "linux32",
+        lib_cppflags     => add("-DB_ENDIAN"),
     },
     "linux-ppc64" => {
         inherit_from     => [ "linux-generic64" ],
@@ -757,7 +760,7 @@ my %targets = (
         #
         # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
         #
-        inherit_from     => [ "linux-generic32" ],
+        inherit_from     => [ "linux-latomic" ],
         asm_arch         => 'armv4',
         perlasm_scheme   => "linux32",
     },
@@ -778,7 +781,7 @@ my %targets = (
     "linux-mips32" => {
         # Configure script adds minimally required -march for assembly
         # support, if no -march was specified at command line.
-        inherit_from     => [ "linux-generic32" ],
+        inherit_from     => [ "linux-latomic" ],
         cflags           => add("-mabi=32"),
         cxxflags         => add("-mabi=32"),
         asm_arch         => 'mips32',
@@ -787,10 +790,10 @@ my %targets = (
     # mips32 and mips64 below refer to contemporary MIPS Architecture
     # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
     "linux-mips64" => {
-        inherit_from     => [ "linux-generic32" ],
+        inherit_from     => [ "linux-latomic" ],
         cflags           => add("-mabi=n32"),
         cxxflags         => add("-mabi=n32"),
-        bn_ops           => "RC4_CHAR",
+        bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
         asm_arch         => 'mips64',
         perlasm_scheme   => "n32",
         multilib         => "32",
@@ -804,6 +807,29 @@ my %targets = (
         multilib         => "64",
     },
 
+    # riscv below refers to contemporary RISCV Architecture
+    # specifications,
+    "linux64-riscv64" => {
+        inherit_from     => [ "linux-generic64"],
+        perlasm_scheme   => "linux64",
+        asm_arch         => 'riscv64',
+    },
+
+    "linux32-riscv32" => {
+        inherit_from     => [ "linux-latomic" ],
+        perlasm_scheme   => "linux32",
+        asm_arch         => 'riscv32',
+    },
+
+    # loongarch64 below refers to contemporary LoongArch Architecture
+    # specifications,
+    "linux64-loongarch64" => {
+        inherit_from     => [ "linux-generic64"],
+        perlasm_scheme   => "linux64",
+        asm_arch         => 'loongarch64',
+        lib_cppflags     => add("-DL_ENDIAN"),
+    },
+
     #### 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
@@ -839,10 +865,15 @@ my %targets = (
         asm_arch         => 'x86',
         perlasm_scheme   => "elf",
     },
+    "linux-x86-latomic" => {
+        inherit_from     => [ "linux-x86" ],
+        ex_libs          => add(threads("-latomic")),
+    },
     "linux-x86-clang" => {
         inherit_from     => [ "linux-x86" ],
         CC               => "clang",
         CXX              => "clang++",
+        ex_libs          => add(threads("-latomic")),
     },
     "linux-x86_64" => {
         inherit_from     => [ "linux-generic64" ],
@@ -914,7 +945,7 @@ my %targets = (
 
     #### SPARC Linux setups
     "linux-sparcv8" => {
-        inherit_from     => [ "linux-generic32" ],
+        inherit_from     => [ "linux-latomic" ],
         cflags           => add("-mcpu=v8"),
         cxxflags         => add("-mcpu=v8"),
         lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
@@ -924,7 +955,7 @@ my %targets = (
     "linux-sparcv9" => {
         # it's a real mess with -mcpu=ultrasparc option under Linux,
         # but -Wa,-Av8plus should do the trick no matter what.
-        inherit_from     => [ "linux-generic32" ],
+        inherit_from     => [ "linux-latomic" ],
         cflags           => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
         cxxflags         => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
         lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
@@ -937,6 +968,7 @@ my %targets = (
         cflags           => add("-m64 -mcpu=ultrasparc"),
         cxxflags         => add("-m64 -mcpu=ultrasparc"),
         lib_cppflags     => add("-DB_ENDIAN"),
+        ex_libs          => add(threads("-latomic")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         asm_arch         => 'sparcv9',
         perlasm_scheme   => 'void',
@@ -1046,6 +1078,90 @@ my %targets = (
         perlasm_scheme   => "elf",
     },
 
+    "BSD-aarch64" => {
+        inherit_from     => [ "BSD-generic64" ],
+        lib_cppflags     => add("-DL_ENDIAN"),
+        bn_ops           => "SIXTY_FOUR_BIT_LONG",
+        asm_arch         => 'aarch64',
+        perlasm_scheme   => "linux64",
+    },
+
+    "BSD-ppc" => {
+        inherit_from     => [ "BSD-generic32" ],
+        asm_arch         => 'ppc32',
+        perlasm_scheme   => "linux32",
+        lib_cppflags     => add("-DB_ENDIAN"),
+    },
+
+    "BSD-ppc64" => {
+        inherit_from     => [ "BSD-generic64" ],
+        cflags           => add("-m64"),
+        cxxflags         => add("-m64"),
+        lib_cppflags     => add("-DB_ENDIAN"),
+        asm_arch         => 'ppc64',
+        perlasm_scheme   => "linux64",
+    },
+
+    "BSD-ppc64le" => {
+        inherit_from     => [ "BSD-generic64" ],
+        cflags           => add("-m64"),
+        cxxflags         => add("-m64"),
+        lib_cppflags     => add("-DL_ENDIAN"),
+        asm_arch         => 'ppc64',
+        perlasm_scheme   => "linux64le",
+    },
+
+    # riscv below refers to contemporary RISCV Architecture
+    # specifications,
+    "BSD-riscv64" => {
+        inherit_from     => [ "BSD-generic64"],
+        perlasm_scheme   => "linux64",
+        asm_arch         => 'riscv64',
+    },
+
+    "BSD-riscv32" => {
+        inherit_from     => [ "BSD-generic32"],
+        perlasm_scheme   => "linux32",
+        asm_arch         => 'riscv32',
+    },
+
+    "BSD-armv4" => {
+        ################################################################
+        # Note that -march is not among compiler options in linux-armv4
+        # target description. Not specifying one is intentional to give
+        # you choice to:
+        #
+        # a) rely on your compiler default by not specifying one;
+        # b) specify your target platform explicitly for optimal
+        # performance, e.g. -march=armv6 or -march=armv7-a;
+        # c) build "universal" binary that targets *range* of platforms
+        # by specifying minimum and maximum supported architecture;
+        #
+        # As for c) option. It actually makes no sense to specify
+        # maximum to be less than ARMv7, because it's the least
+        # requirement for run-time switch between platform-specific
+        # code paths. And without run-time switch performance would be
+        # equivalent to one for minimum. Secondly, there are some
+        # natural limitations that you'd have to accept and respect.
+        # Most notably you can *not* build "universal" binary for
+        # big-endian platform. This is because ARMv7 processor always
+        # picks instructions in little-endian order. Another similar
+        # limitation is that -mthumb can't "cross" -march=armv6t2
+        # boundary, because that's where it became Thumb-2. Well, this
+        # limitation is a bit artificial, because it's not really
+        # impossible, but it's deemed too tricky to support. And of
+        # course you have to be sure that your binutils are actually
+        # up to the task of handling maximum target platform. With all
+        # this in mind here is an example of how to configure
+        # "universal" build:
+        #
+        # ./Configure BSD-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
+        #
+        inherit_from     => [ "BSD-generic32" ],
+        asm_arch         => 'armv4',
+        perlasm_scheme   => "linux32",
+    },
+
     "bsdi-elf-gcc" => {
         inherit_from     => [ "BASE_unix" ],
         CC               => "gcc",
@@ -1060,6 +1176,81 @@ my %targets = (
         shared_target    => "bsd-gcc-shared",
         shared_cflag     => "-fPIC",
     },
+#### *BSD-nodef
+    "BSD-nodef-generic32" => {
+        # As for thread cflag. Idea is to maintain "collective" set of
+        # flags, which would cover all BSD flavors. -pthread applies
+        # to them all, but is treated differently. OpenBSD expands is
+        # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
+        # expands it as -lc_r, which has to be accompanied by explicit
+        # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
+        # expands it as -lc_r, which seems to be sufficient?
+        inherit_from     => [ "BASE_unix" ],
+        CC               => "cc",
+        CFLAGS           => picker(default => "-Wall",
+                                   debug   => "-O0 -g",
+                                   release => "-O3"),
+        cflags           => threads("-pthread"),
+        cppflags         => threads("-D_THREAD_SAFE -D_REENTRANT"),
+        ex_libs          => add(threads("-pthread")),
+        enable           => add("devcryptoeng"),
+        bn_ops           => "BN_LLONG",
+        thread_scheme    => "pthreads",
+        dso_scheme       => "dlfcn",
+        shared_target    => "bsd-gcc-nodef-shared",
+        shared_cflag     => "-fPIC",
+    },
+    "BSD-nodef-generic64" => {
+        inherit_from     => [ "BSD-nodef-generic32" ],
+        bn_ops           => "SIXTY_FOUR_BIT_LONG",
+    },
+
+    "BSD-nodef-x86" => {
+        inherit_from     => [ "BSD-nodef-generic32" ],
+        CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
+        lib_cppflags     => add("-DL_ENDIAN"),
+        bn_ops           => "BN_LLONG",
+        asm_arch         => 'x86',
+        perlasm_scheme   => "a.out",
+    },
+    "BSD-nodef-x86-elf" => {
+        inherit_from     => [ "BSD-nodef-x86" ],
+        perlasm_scheme   => "elf",
+    },
+
+    "BSD-nodef-sparcv8" => {
+        inherit_from     => [ "BSD-nodef-generic32" ],
+        cflags           => add("-mcpu=v8"),
+        lib_cppflags     => add("-DB_ENDIAN"),
+        asm_arch         => 'sparcv8',
+        perlasm_scheme   => 'void',
+    },
+    "BSD-nodef-sparc64" => {
+        # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
+        # simply *happens* to work around a compiler bug in gcc 3.3.3,
+        # triggered by RIPEMD160 code.
+        inherit_from     => [ "BSD-nodef-generic64" ],
+        lib_cppflags     => add("-DB_ENDIAN -DMD32_REG_T=int"),
+        bn_ops           => "BN_LLONG",
+        asm_arch         => 'sparcv9',
+        perlasm_scheme   => 'void',
+    },
+
+    "BSD-nodef-ia64" => {
+        inherit_from     => [ "BSD-nodef-generic64" ],
+        lib_cppflags     => add("-DL_ENDIAN"),
+        bn_ops           => "SIXTY_FOUR_BIT_LONG",
+        asm_arch         => 'ia64',
+        perlasm_scheme   => 'void',
+    },
+
+    "BSD-nodef-x86_64" => {
+        inherit_from     => [ "BSD-nodef-generic64" ],
+        lib_cppflags     => add("-DL_ENDIAN"),
+        bn_ops           => "SIXTY_FOUR_BIT_LONG",
+        asm_arch         => 'x86_64',
+        perlasm_scheme   => "elf",
+    },
 
 #### SCO/Caldera targets.
 #
@@ -1164,7 +1355,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",
+        shared_fipsflag  => "-Wl,-binitfini:_init:_cleanup",
         perl_platform    => 'AIX',
     },
     "aix-gcc" => {
@@ -1196,6 +1387,10 @@ my %targets = (
         AR               => add("-X64"),
         RANLIB           => add("-X64"),
     },
+    "aix64-gcc-as" => {
+        inherit_from     => [ "aix64-gcc" ],
+        perlasm_scheme   => "aix64-as",
+    },
     "aix-cc" => {
         inherit_from     => [ "aix-common" ],
         CC               => "cc",
@@ -1212,6 +1407,19 @@ my %targets = (
         AR               => add("-X32"),
         RANLIB           => add("-X32"),
     },
+    # shared_target of "aix-solib" builds shared libraries packaged
+    # without archives.  This improves the behavior of inter-library
+    # references (libssl depending on libcrypto) when building with
+    # shlib_variant.
+    # You'll get:  libxxx.so (import library, used when linking applications)
+    #              libxxx.so.ver (shared object)
+    #              libxxx.a (static library archive)
+    # and for runtime, you only need libxxx.so.ver.  libxxx.so and libxxx.a
+    # can be installed along with include files to make an SDK
+    "aix-cc-solib" => {
+        inherit_from     => [ "aix-cc" ],
+        shared_target    => "aix-solib",
+    },
     "aix64-cc" => {
         inherit_from     => [ "aix-common" ],
         CC               => "cc",
@@ -1230,6 +1438,10 @@ my %targets = (
         AR               => add("-X64"),
         RANLIB           => add("-X64"),
     },
+    "aix64-cc-solib" => {
+        inherit_from     => [ "aix64-cc" ],
+        shared_target    => "aix-solib",
+    },
 
 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
     "BS2000-OSD" => {
@@ -1269,8 +1481,21 @@ my %targets = (
         CC               => "cl",
         CPP              => '$(CC) /EP /C',
         CFLAGS           => "/W3 /wd4090 /nologo",
-        LDFLAGS          => add("/debug"),
         coutflag         => "/Fo",
+        LD               => "link",
+        LDFLAGS          => "/nologo /debug",
+        ldoutflag        => "/out:",
+        ldpostoutflag    => "",
+        ld_resp_delim    => "\n",
+        bin_lflags       => "setargv.obj",
+        makedepcmd       => '$(CC) /Zs /showIncludes',
+        makedep_scheme   => 'VC',
+        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",
@@ -1283,6 +1508,9 @@ 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",
         perl_platform    => 'Windows::MSVC',
@@ -1358,7 +1586,7 @@ my %targets = (
         sys_id           => "WIN64A",
         uplink_arch      => 'x86_64',
         asm_arch         => 'x86_64',
-        perlasm_scheme   => "auto",
+        perlasm_scheme   => sub { vc_win64a_info()->{perlasm_scheme} },
         multilib         => "-x64",
     },
     "VC-WIN32" => {
@@ -1417,9 +1645,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);
         }),
     },
 
@@ -1514,6 +1742,7 @@ my %targets = (
         CFLAGS           => picker(default => "-Wall",
                                    debug   => "-g -O0",
                                    release => "-O3"),
+        ex_libs          => add("-lcrypt32"),
         lib_cppflags     => "-DTERMIOS -DL_ENDIAN",
         sys_id           => "CYGWIN",
         thread_scheme    => "pthread",
@@ -1563,7 +1792,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",
@@ -1615,22 +1844,65 @@ 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" => {
+    "hurd-generic32" => {
         inherit_from     => [ "BASE_unix" ],
         CC               => "gcc",
-        CFLAGS           => "-O3 -fomit-frame-pointer -Wall",
+        CXX              => "g++",
+        CFLAGS           => picker(default => "-Wall",
+                                   debug   => "-O0 -g",
+                                   release => "-O3"),
+        CXXFLAGS         => picker(default => "-Wall",
+                                   debug   => "-O0 -g",
+                                   release => "-O3"),
         cflags           => threads("-pthread"),
-        lib_cppflags     => "-DL_ENDIAN",
+        cxxflags         => combine("-std=c++11", threads("-pthread")),
         ex_libs          => add("-ldl", threads("-pthread")),
-        bn_ops           => "BN_LLONG",
-        asm_arch         => 'x86',
-        perlasm_scheme   => 'elf',
+        bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
         shared_cflag     => "-fPIC",
+        shared_ldflag    => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
+    },
+
+    "hurd-generic64" => {
+        inherit_from     => [ "hurd-generic32" ],
+        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
+    },
+
+    #### X86 / X86_64 targets
+    "hurd-x86" => {
+        inherit_from     => [ "hurd-generic32" ],
+        CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
+        cflags           => add("-m32"),
+        cxxflags         => add("-m32"),
+        lib_cppflags     => add("-DL_ENDIAN"),
+        bn_ops           => "BN_LLONG",
+        asm_arch         => 'x86',
+        perlasm_scheme   => 'elf',
+    },
+
+    "hurd-x86_64" => {
+        inherit_from     => [ "hurd-generic64" ],
+        cflags           => add("-m64"),
+        cxxflags         => add("-m64"),
+        lib_cppflags     => add("-DL_ENDIAN"),
+        bn_ops           => "SIXTY_FOUR_BIT_LONG",
+        asm_arch         => 'x86_64',
+        perlasm_scheme   => 'elf',
+        multilib         => "64",
     },
 
 ##### VxWorks for various targets
@@ -1780,6 +2052,7 @@ my %targets = (
                               @{vms_info()->{disable_warns}};
                           @warnings
                               ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
+        cflag_incfirst   => '/FIRST_INCLUDE=',
         lib_defines      =>
             add("OPENSSL_USE_NODELETE",
                 sub {
@@ -1794,10 +2067,12 @@ my %targets = (
         # 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"),
-        # For modules specifically, we assume that they only use public
-        # OpenSSL symbols, and therefore don't need to mangle names on
-        # their own.
-        dso_cflags       => "",
+        # Strictly speaking, DSOs should not need to have name shortening,
+        # as all their exported symbols should be short enough to fit the
+        # linker's 31 character per symbol name limit.  However, providers
+        # may be composed of more than one object file, and internal symbols
+        # may and do surpass the 31 character limit.
+        dso_cflags       => add("/NAMES=(SHORTENED)"),
         ex_libs          => add(sub { return vms_info()->{zlib} || (); }),
         shared_target    => "vms-shared",
         # def_flag made to empty string so a .opt file gets generated
@@ -1805,13 +2080,14 @@ my %targets = (
         dso_scheme       => "vms",
         thread_scheme    => "pthreads",
 
+        makedep_scheme   => 'VMS C',
         AS               => sub { vms_info()->{AS} },
         ASFLAGS          => sub { vms_info()->{ASFLAGS} },
         asoutflag        => sub { vms_info()->{asoutflag} },
         asflags          => sub { vms_info()->{asflags} },
         perlasm_scheme   => sub { vms_info()->{perlasm_scheme} },
 
-        disable          => add('pinshared'),
+        disable          => add('pinshared', 'loadereng'),
 
     },
 
@@ -1862,5 +2138,19 @@ my %targets = (
         cflags           => add("/POINTER_SIZE=64=ARGV"),
         pointer_size     => "64",
     },
-
+    "vms-x86_64" => {
+        inherit_from     => [ "vms-generic" ],
+        bn_ops           => "SIXTY_FOUR_BIT",
+        pointer_size     => "",
+    },
+    "vms-x86_64-p32" => {
+        inherit_from     => [ "vms-x86_64" ],
+        cflags           => add("/POINTER_SIZE=32"),
+        pointer_size     => "32",
+    },
+    "vms-x86_64-p64" => {
+        inherit_from     => [ "vms-x86_64" ],
+        cflags           => add("/POINTER_SIZE=64=ARGV"),
+        pointer_size     => "64",
+    }
 );