Configurations/10-main.conf: always pass -bsrv4 to AIX linker.
[openssl.git] / Configurations / 10-main.conf
index 6c73d9f4ec8bda12aa8f12433f49531fd0de775f..62b4c9d1474bb98477abab851ff9bfd95f2512ee 100644 (file)
@@ -211,8 +211,11 @@ my %targets = (
         ex_libs          => add("-lsocket -lnsl -ldl"),
         dso_scheme       => "dlfcn",
         thread_scheme    => "pthreads",
-        shared_target    => "solaris-shared",
+        shared_target    => "self",
         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
+        shared_ldflag    => "-Wl,-Bsymbolic",
+        shared_defflag   => "-Wl,-M,",
+        shared_sonameflag=> "-Wl,-h,",
     },
 #### Solaris x86 with GNU C setups
     "solaris-x86-gcc" => {
@@ -229,7 +232,7 @@ my %targets = (
         ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG",
         shared_cflag     => "-fPIC",
-        shared_ldflag    => "-shared -static-libgcc",
+        shared_ldflag    => add_before("-shared -static-libgcc"),
     },
     "solaris64-x86_64-gcc" => {
         # -shared -static-libgcc might appear controversial, but modules
@@ -251,7 +254,7 @@ my %targets = (
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         shared_cflag     => "-fPIC",
-        shared_ldflag    => "-shared -static-libgcc",
+        shared_ldflag    => add_before("-shared -static-libgcc"),
         multilib         => "/64",
     },
 
@@ -282,7 +285,7 @@ my %targets = (
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         shared_cflag     => "-KPIC",
-        shared_ldflag    => "-G -dy -z text",
+        shared_ldflag    => add_before("-G -dy -z text"),
         multilib         => "/64",
     },
 
@@ -298,7 +301,7 @@ my %targets = (
         ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-fPIC",
-        shared_ldflag    => "-shared",
+        shared_ldflag    => add_before("-shared"),
     },
     "solaris-sparcv8-gcc" => {
         inherit_from     => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
@@ -333,7 +336,7 @@ my %targets = (
         ex_libs          => add(threads("-lpthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-KPIC",
-        shared_ldflag    => "-G -dy -z text",
+        shared_ldflag    => add_before("-G -dy -z text"),
     },
 ####
     "solaris-sparcv8-cc" => {
@@ -353,75 +356,60 @@ my %targets = (
 
 #### IRIX 6.x configs
 # Only N32 and N64 ABIs are supported.
+    "irix-common" => {
+        inherit_from     => [ "BASE_unix" ],
+        template         => 1,
+        cppflags         => threads("-D_SGI_MP_SOURCE"),
+        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
+        ex_libs          => add(threads("-lpthread")),
+        thread_scheme    => "pthreads",
+        dso_scheme       => "dlfcn",
+        shared_target    => "self",
+        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
+        shared_ldflag    => "-shared -Wl,-Bsymbolic",
+        shared_sonameflag=> "-Wl,-soname,",
+    },
     "irix-mips3-gcc" => {
-        inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
+        inherit_from     => [ "irix-common", asm("mips64_asm") ],
         CC               => "gcc",
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O3"),
+        LDFLAGS          => "-static-libgcc",
         cflags           => "-mabi=n32",
-        cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
-                                    threads("-D_SGI_MP_SOURCE")),
-        cppflags         => threads("-D_SGI_MP_SOURCE"),
-        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
-        ex_libs          => add(threads("-lpthread")),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
-        thread_scheme    => "pthreads",
         perlasm_scheme   => "n32",
-        dso_scheme       => "dlfcn",
-        shared_target    => "irix-shared",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "32",
     },
     "irix-mips3-cc" => {
-        inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
+        inherit_from     => [ "irix-common", asm("mips64_asm") ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O2"),
         cflags           => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared",
-        cppflags         => threads("-D_SGI_MP_SOURCE"),
-        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
-        ex_libs          => add(threads("-lpthread")),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
-        thread_scheme    => "pthreads",
         perlasm_scheme   => "n32",
-        dso_scheme       => "dlfcn",
-        shared_target    => "irix-shared",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "32",
     },
     # N64 ABI builds.
     "irix64-mips4-gcc" => {
-        inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
+        inherit_from     => [ "irix-common", asm("mips64_asm") ],
         CC               => "gcc",
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O3"),
+        LDFLAGS          => "-static-libgcc",
         cflags           => "-mabi=64 -mips4",
-        cppflags         => threads("-D_SGI_MP_SOURCE"),
-        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
-        ex_libs          => add(threads("-lpthread")),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
-        thread_scheme    => "pthreads",
         perlasm_scheme   => "64",
-        dso_scheme       => "dlfcn",
-        shared_target    => "irix-shared",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "64",
     },
     "irix64-mips4-cc" => {
-        inherit_from     => [ "BASE_unix", asm("mips64_asm") ],
+        inherit_from     => [ "irix-common", asm("mips64_asm") ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O2"),
         cflags           => "-64 -mips4 -use_readonly_const -G0 -rdata_shared",
-        cppflags         => threads("-D_SGI_MP_SOURCE"),
-        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
-        ex_libs          => threads("-lpthread"),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
-        thread_scheme    => "pthreads",
         perlasm_scheme   => "64",
-        dso_scheme       => "dlfcn",
-        shared_target    => "irix-shared",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "64",
     },
 
@@ -452,20 +440,31 @@ my %targets = (
 #   targets; b) performance-critical 32-bit assembly modules implement
 #   even PA-RISC 2.0-specific code paths, which are chosen at run-time,
 #   thus adequate performance is provided even with PA-RISC 1.1 build.
-    "hpux-parisc-gcc" => {
+    "hpux-common" => {
         inherit_from     => [ "BASE_unix" ],
+        template         => 1,
+        defines          => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED",
+                                "_HPUX_ALT_XOPEN_SOCKET_API"),
+        lib_cppflags     => "-DB_ENDIAN",
+        thread_scheme    => "pthreads",
+        dso_scheme       => "dlfcn",    # overridden in 32-bit PA-RISC builds
+        shared_target    => "self",
+        bin_lflags       => "-Wl,+s,+cdp,../:,+cdp,./:",
+        shared_ldflag    => "-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:",
+        shared_sonameflag=> "-Wl,+h,",
+    },
+    "hpux-parisc-gcc" => {
+        inherit_from     => [ "hpux-common" ],
         CC               => "gcc",
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O3"),
         cflags           => add(threads("-pthread")),
-        lib_cppflags     => "-DB_ENDIAN -DBN_DIV2W",
-        ex_libs          => add("-Wl,+s -ldld", threads("-pthread")),
-        bn_ops           => "BN_LLONG",
-        thread_scheme    => "pthreads",
+        lib_cppflags     => add("-DBN_DIV2W"),
+        ex_libs          => add("-ldld", threads("-pthread")),
+        bn_ops           => "BN_LLONG RC4_CHAR",
         dso_scheme       => "dl",
-        shared_target    => "hpux-shared",
         shared_cflag     => "-fPIC",
-        shared_ldflag    => "-shared",
+        shared_ldflag    => add_before("-shared"),
         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
     },
     "hpux-parisc1_1-gcc" => {
@@ -473,39 +472,33 @@ my %targets = (
         multilib         => "/pa1.1",
     },
     "hpux64-parisc2-gcc" => {
-        inherit_from     => [ "BASE_unix", asm("parisc20_64_asm") ],
+        inherit_from     => [ "hpux-common", asm("parisc20_64_asm") ],
         CC               => "gcc",
         CFLAGS           => combine(picker(debug   => "-O0 -g",
                                            release => "-O3")),
-        cppflags         => threads("-D_REENTRANT"),
-        lib_cppflags     => "-DB_ENDIAN",
-        ex_libs          => add("-ldl"),
+        cflags           => add(threads("-pthread")),
+        ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
-        thread_scheme    => "pthreads",
-        dso_scheme       => "dlfcn",
-        shared_target    => "hpux-shared",
         shared_cflag     => "-fpic",
-        shared_ldflag    => "-shared",
+        shared_ldflag    => add_before("-shared"),
         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "/pa20_64",
     },
 
     # More attempts at unified 10.X and 11.X targets for HP C compiler.
     "hpux-parisc-cc" => {
-        inherit_from     => [ "BASE_unix" ],
+        inherit_from     => [ "hpux-common" ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O3"),
         cflags           => "+Optrs_strongly_typed -Ae +ESlit",
         cppflags         => threads("-D_REENTRANT"),
-        lib_cppflags     => "-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
-        ex_libs          => add("-Wl,+s -ldld",threads("-lpthread")),
+        lib_cppflags     => add("-DBN_DIV2W -DMD32_XARRAY"),
+        ex_libs          => add("-ldld", threads("-lpthread")),
         bn_ops           => "RC4_CHAR",
-        thread_scheme    => "pthreads",
         dso_scheme       => "dl",
-        shared_target    => "hpux-shared",
         shared_cflag     => "+Z",
-        shared_ldflag    => "-b",
+        shared_ldflag    => add_before("-b"),
         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
     },
     "hpux-parisc1_1-cc" => {
@@ -514,93 +507,74 @@ my %targets = (
         multilib         => "/pa1.1",
     },
     "hpux64-parisc2-cc" => {
-        inherit_from     => [ "BASE_unix", asm("parisc20_64_asm") ],
+        inherit_from     => [ "hpux-common", asm("parisc20_64_asm") ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O3") ,
         cflags           => "+DD64 +Optrs_strongly_typed -Ae +ESlit",
         cppflags         => threads("-D_REENTRANT") ,
-        lib_cppflags     => "-DB_ENDIAN -DMD32_XARRAY",
-        ex_libs          => add("-ldl",threads("-lpthread")),
+        lib_cppflags     => add("-DMD32_XARRAY"),
+        ex_libs          => add("-ldl", threads("-lpthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
-        thread_scheme    => "pthreads",
-        dso_scheme       => "dlfcn",
-        shared_target    => "hpux-shared",
         shared_cflag     => "+Z",
-        shared_ldflag    => "-b",
+        shared_ldflag    => add_before("-b"),
         shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "/pa20_64",
     },
 
     # HP/UX IA-64 targets
     "hpux-ia64-cc" => {
-        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
+        inherit_from     => [ "hpux-common", asm("ia64_asm") ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O2"),
         cflags           => "-Ae +DD32 +Olit=all -z",
         cppflags         => add(threads("-D_REENTRANT")),
-        lib_cppflags     => "-DB_ENDIAN",
-        ex_libs          => add("-ldl",threads("-lpthread")),
+        ex_libs          => add("-ldl", threads("-lpthread")),
         bn_ops           => "SIXTY_FOUR_BIT",
-        thread_scheme    => "pthreads",
-        dso_scheme       => "dlfcn",
-        shared_target    => "hpux-shared",
         shared_cflag     => "+Z",
-        shared_ldflag    => "-b",
+        shared_ldflag    => add_before("-b"),
         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "/hpux32",
     },
     "hpux64-ia64-cc" => {
-        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
+        inherit_from     => [ "hpux-common", asm("ia64_asm") ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O3"),
         cflags           => "-Ae +DD64 +Olit=all -z",
         cppflags         => threads("-D_REENTRANT"),
-        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl", threads("-lpthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
-        thread_scheme    => "pthreads",
-        dso_scheme       => "dlfcn",
-        shared_target    => "hpux-shared",
         shared_cflag     => "+Z",
-        shared_ldflag    => "-b",
+        shared_ldflag    => add_before("-b"),
         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "/hpux64",
     },
     # GCC builds...
     "hpux-ia64-gcc" => {
-        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
+        inherit_from     => [ "hpux-common", asm("ia64_asm") ],
         CC               => "gcc",
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O3"),
         cflags           => add(threads("-pthread")),
-        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT",
-        thread_scheme    => "pthreads",
-        dso_scheme       => "dlfcn",
-        shared_target    => "hpux-shared",
         shared_cflag     => "-fpic",
-        shared_ldflag    => "-shared",
+        shared_ldflag    => add_before("-shared"),
         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "/hpux32",
     },
     "hpux64-ia64-gcc" => {
-        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
+        inherit_from     => [ "hpux-common", asm("ia64_asm") ],
         CC               => "gcc",
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O3"),
         cflags           => combine("-mlp64", threads("-pthread")),
-        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
-        thread_scheme    => "pthreads",
-        dso_scheme       => "dlfcn",
-        shared_target    => "hpux-shared",
         shared_cflag     => "-fpic",
-        shared_ldflag    => "-shared",
+        shared_ldflag    => add_before("-shared"),
         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
         multilib         => "/hpux64",
     },
@@ -679,6 +653,7 @@ my %targets = (
         shared_cflag     => "-fPIC",
         shared_ldflag    => "-Wl,-znodelete",
         shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
+        enable           => [ "afalgeng" ],
     },
     "linux-generic64" => {
         inherit_from     => [ "linux-generic32" ],
@@ -1039,35 +1014,6 @@ my %targets = (
         thread_scheme    => "(unknown)",
     },
 
-# QNX
-    "qnx4" => {
-        inherit_from     => [ "BASE_unix" ],
-        CC               => "cc",
-        CFLAGS           => "",
-        lib_cppflags     => "-DL_ENDIAN -DTERMIO",
-        thread_scheme    => "(unknown)",
-    },
-    "QNX6" => {
-        inherit_from     => [ "BASE_unix" ],
-        CC               => "gcc",
-        ex_libs          => add("-lsocket"),
-        dso_scheme       => "dlfcn",
-        shared_target    => "bsd-gcc-shared",
-        shared_cflag     => "-fPIC",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
-    },
-    "QNX6-i386" => {
-        inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
-        CC               => "gcc",
-        CFLAGS           => "-O2 -Wall",
-        lib_cppflags     => "-DL_ENDIAN",
-        ex_libs          => add("-lsocket"),
-        dso_scheme       => "dlfcn",
-        shared_target    => "bsd-gcc-shared",
-        shared_cflag     => "-fPIC",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
-    },
-
 #### SCO/Caldera targets.
 #
 # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
@@ -1159,81 +1105,81 @@ my %targets = (
     # variable, then you should know that in OpenSSL case it's considered
     # only in ./config. Once configured, build procedure remains "deaf" to
     # current value of $OBJECT_MODE.
+    "aix-common" => {
+        inherit_from     => [ "BASE_unix" ],
+        template         => 1,
+        sys_id           => "AIX",
+        lib_cppflags     => "-DB_ENDIAN",
+        lflags           => "-Wl,-bsvr4",
+        thread_scheme    => "pthreads",
+        dso_scheme       => "dlfcn",
+        shared_target    => "self",
+        module_ldflags   => "-Wl,-G,-bsymbolic,-bexpall",
+        shared_ldflag    => "-Wl,-G,-bsymbolic",
+        shared_defflag   => "-Wl,-bE:",
+        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
+        dso_extension    => ".so",
+        lib_extension    => shared("_a.a"),
+        shared_extension_simple => shared(".a"),
+    },
     "aix-gcc" => {
-        inherit_from     => [ "BASE_unix", asm("ppc32_asm") ],
+        inherit_from     => [ "aix-common", asm("ppc32_asm") ],
         CC               => "gcc",
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => add(threads("-pthread")),
-        lib_cppflags     => "-DB_ENDIAN",
-        ex_libs          => add(threads("-pthread")),
-        sys_id           => "AIX",
+        ex_libs          => threads("-pthread"),
         bn_ops           => "BN_LLONG RC4_CHAR",
-        thread_scheme    => "pthreads",
         perlasm_scheme   => "aix32",
-        dso_scheme       => "dlfcn",
-        shared_target    => "aix-shared",
-        shared_ldflag    => "-shared -static-libgcc -Wl,-G",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
-        arflags          => "-X32 r",
+        shared_ldflag    => add_before("-shared -static-libgcc"),
+        AR               => add("-X32"),
+        RANLIB           => add("-X32"),
     },
     "aix64-gcc" => {
-        inherit_from     => [ "BASE_unix", asm("ppc64_asm") ],
+        inherit_from     => [ "aix-common", asm("ppc64_asm") ],
         CC               => "gcc",
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => combine("-maix64", threads("-pthread")),
-        lib_cppflags     => "-DB_ENDIAN",
-        ex_libs          => add(threads("-pthread")),
-        sys_id           => "AIX",
+        ex_libs          => threads("-pthread"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
-        thread_scheme    => "pthreads",
         perlasm_scheme   => "aix64",
-        dso_scheme       => "dlfcn",
-        shared_target    => "aix-shared",
-        shared_ldflag    => "-shared -static-libgcc -Wl,-G",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
-        arflags          => "-X64 r",
+        shared_ldflag    => add_before("-shared -static-libgcc"),
+        shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
+        AR               => add("-X64"),
+        RANLIB           => add("-X64"),
     },
     "aix-cc" => {
-        inherit_from     => [ "BASE_unix", asm("ppc32_asm") ],
+        inherit_from     => [ "aix-common", asm("ppc32_asm") ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => combine("-q32 -qmaxmem=16384 -qro -qroconst",
                                     threads("-qthreaded")),
         cppflags         => threads("-D_THREAD_SAFE"),
-        lib_cppflags     => "-DB_ENDIAN",
-        sys_id           => "AIX",
-        bn_ops           => "BN_LLONG RC4_CHAR",
-        thread_scheme    => "pthreads",
         ex_libs          => threads("-lpthreads"),
+        bn_ops           => "BN_LLONG RC4_CHAR",
         perlasm_scheme   => "aix32",
-        dso_scheme       => "dlfcn",
-        shared_target    => "aix-shared",
-        shared_ldflag    => "-G",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
-        arflags          => "-X32 r",
+        shared_cflag     => "-qpic",
+        AR               => add("-X32"),
+        RANLIB           => add("-X32"),
     },
     "aix64-cc" => {
-        inherit_from     => [ "BASE_unix", asm("ppc64_asm") ],
+        inherit_from     => [ "aix-common", asm("ppc64_asm") ],
         CC               => "cc",
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => combine("-q64 -qmaxmem=16384 -qro -qroconst",
                                     threads("-qthreaded")),
         cppflags         => threads("-D_THREAD_SAFE"),
-        lib_cppflags     => "-DB_ENDIAN",
-        sys_id           => "AIX",
-        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
-        thread_scheme    => "pthreads",
         ex_libs          => threads("-lpthreads"),
+        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         perlasm_scheme   => "aix64",
         dso_scheme       => "dlfcn",
-        shared_target    => "aix-shared",
-        shared_ldflag    => "-G",
-        shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
-        arflags          => "-X64 r",
+        shared_cflag     => "-qpic",
+        shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
+        AR               => add("-X64"),
+        RANLIB           => add("-X64"),
     },
 
 # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
@@ -1307,7 +1253,8 @@ my %targets = (
                                        sub {
                                            ($disabled{shared} ? "" : "/MD");
                                        })),
-        defines          => add(picker(debug   => [ "DEBUG", "_DEBUG" ])),
+        defines          => add(picker(default => [], # works as type cast
+                                       debug   => [ "DEBUG", "_DEBUG" ])),
         lib_cflags       => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
         # Following might/should appears controversial, i.e. defining
         # /MDd without evaluating $disabled{shared}. It works in
@@ -1611,43 +1558,6 @@ my %targets = (
         perlasm_scheme   => "macosx",
     },
 
-#### iPhoneOS/iOS
-#
-# It takes three prior-set environment variables to make it work:
-#
-# CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
-# CROSS_TOP=/where/SDKs/are
-# CROSS_SDK=iPhoneOSx.y.sdk
-#
-# Exact paths vary with Xcode releases, but for couple of last ones
-# they would look like this:
-#
-# CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
-# CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
-# CROSS_SDK=iPhoneOS.sdk
-#
-    "iphoneos-cross" => {
-        inherit_from     => [ "darwin-common" ],
-        cflags           => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
-        sys_id           => "iOS",
-    },
-    "ios-cross" => {
-        inherit_from     => [ "darwin-common", asm("armv4_asm") ],
-        # It should be possible to go below iOS 6 and even add -arch armv6,
-        # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
-        # at this point.
-        cflags           => add("-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
-        sys_id           => "iOS",
-        perlasm_scheme   => "ios32",
-    },
-    "ios64-cross" => {
-        inherit_from     => [ "darwin-common", asm("aarch64_asm") ],
-        cflags           => add("-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
-        sys_id           => "iOS",
-        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
-        perlasm_scheme   => "ios64",
-    },
-
 ##### GNU Hurd
     "hurd-x86" => {
         inherit_from     => [ "BASE_unix" ],