]> 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 138ad8a6ae0c2c3b1e5471489b87574d34b7cc4a..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;
@@ -239,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"),
@@ -262,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",
@@ -296,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",
@@ -312,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" ],
@@ -353,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"),
@@ -677,7 +673,7 @@ my %targets = (
 ####
 # *-generic* is endian-neutral target, but ./config is free to
 # throw in -D[BL]_ENDIAN, whichever appropriate...
-    "linux-generic" => {
+    "linux-generic32" => {
         inherit_from     => [ "BASE_unix" ],
         CC               => "gcc",
         CXX              => "g++",
@@ -699,18 +695,17 @@ my %targets = (
         shared_ldflag    => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
         enable           => [ "afalgeng" ],
     },
-    "linux-generic32" => {
-        inherit_from     => [ "linux-generic" ],
+    "linux-latomic" => {
+        inherit_from     => [ "linux-generic32" ],
         ex_libs          => add(threads("-latomic")),
-        bn_ops           => "BN_LLONG RC4_CHAR",
     },
     "linux-generic64" => {
-        inherit_from     => [ "linux-generic" ],
+        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"),
@@ -765,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",
     },
@@ -786,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',
@@ -795,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",
@@ -812,11 +807,27 @@ my %targets = (
         multilib         => "64",
     },
 
-    # riscv64 below refers to contemporary RISCV Architecture
+    # 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...
@@ -854,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" ],
@@ -929,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"),
@@ -939,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"),
@@ -1062,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",
@@ -1076,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.
 #
@@ -1212,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",
@@ -1228,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",
@@ -1246,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" => {
@@ -1283,7 +1479,7 @@ my %targets = (
         inherit_from     => [ "BASE_Windows" ],
         template         => 1,
         CC               => "cl",
-        CPP              => '"$(CC)" /EP /C',
+        CPP              => '$(CC) /EP /C',
         CFLAGS           => "/W3 /wd4090 /nologo",
         coutflag         => "/Fo",
         LD               => "link",
@@ -1292,7 +1488,7 @@ my %targets = (
         ldpostoutflag    => "",
         ld_resp_delim    => "\n",
         bin_lflags       => "setargv.obj",
-        makedepcmd       => '"$(CC)" /Zs /showIncludes',
+        makedepcmd       => '$(CC) /Zs /showIncludes',
         makedep_scheme   => 'VC',
         AR               => "lib",
         ARFLAGS          => "/nologo",
@@ -1390,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" => {
@@ -1546,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",
@@ -1659,20 +1856,53 @@ my %targets = (
     },
 
 ##### 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
@@ -1908,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",
+    }
 );