Commit 6e301900 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Configurations/10-main.conf: clean up HP-UX targets and add magic macros.



HP-UX provides sockets symbols with incompatible prototypes under same
name. This caused problems in 64-bit builds. Additional macros force
unambiguous symbols with unambiguous prototypes.

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5742)
parent e14795f8
Loading
Loading
Loading
Loading
+21 −14
Original line number Diff line number Diff line
@@ -452,14 +452,19 @@ 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-network" => {
        template         => 1,
        defines          => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED",
                                "_HPUX_ALT_XOPEN_SOCKET_API"),
    },
    "hpux-parisc-gcc" => {
        inherit_from     => [ "BASE_unix" ],
        inherit_from     => [ "BASE_unix", "hpux-network" ],
        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")),
        ex_libs          => add("-ldld", threads("-pthread")),
        bn_ops           => "BN_LLONG",
        thread_scheme    => "pthreads",
        dso_scheme       => "dl",
@@ -473,13 +478,14 @@ my %targets = (
        multilib         => "/pa1.1",
    },
    "hpux64-parisc2-gcc" => {
        inherit_from     => [ "BASE_unix", asm("parisc20_64_asm") ],
        inherit_from     => [ "BASE_unix", "hpux-network",
                              asm("parisc20_64_asm") ],
        CC               => "gcc",
        CFLAGS           => combine(picker(debug   => "-O0 -g",
                                           release => "-O3")),
        cppflags         => threads("-D_REENTRANT"),
        cflags           => add(threads("-pthread")),
        lib_cppflags     => "-DB_ENDIAN",
        ex_libs          => add("-ldl"),
        ex_libs          => add("-ldl", threads("-pthread")),
        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
        thread_scheme    => "pthreads",
        dso_scheme       => "dlfcn",
@@ -492,14 +498,14 @@ my %targets = (

    # More attempts at unified 10.X and 11.X targets for HP C compiler.
    "hpux-parisc-cc" => {
        inherit_from     => [ "BASE_unix" ],
        inherit_from     => [ "BASE_unix", "hpux-network" ],
        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")),
        ex_libs          => add("-ldld", threads("-lpthread")),
        bn_ops           => "RC4_CHAR",
        thread_scheme    => "pthreads",
        dso_scheme       => "dl",
@@ -514,7 +520,8 @@ my %targets = (
        multilib         => "/pa1.1",
    },
    "hpux64-parisc2-cc" => {
        inherit_from     => [ "BASE_unix", asm("parisc20_64_asm") ],
        inherit_from     => [ "BASE_unix", "hpux-network",
                              asm("parisc20_64_asm") ],
        CC               => "cc",
        CFLAGS           => picker(debug   => "+O0 +d -g",
                                   release => "+O3") ,
@@ -534,7 +541,7 @@ my %targets = (

    # HP/UX IA-64 targets
    "hpux-ia64-cc" => {
        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
        inherit_from     => [ "BASE_unix", "hpux-network", asm("ia64_asm") ],
        CC               => "cc",
        CFLAGS           => picker(debug   => "+O0 +d -g",
                                   release => "+O2"),
@@ -552,7 +559,7 @@ my %targets = (
        multilib         => "/hpux32",
    },
    "hpux64-ia64-cc" => {
        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
        inherit_from     => [ "BASE_unix", "hpux-network", asm("ia64_asm") ],
        CC               => "cc",
        CFLAGS           => picker(debug   => "+O0 +d -g",
                                   release => "+O3"),
@@ -571,7 +578,7 @@ my %targets = (
    },
    # GCC builds...
    "hpux-ia64-gcc" => {
        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
        inherit_from     => [ "BASE_unix", "hpux-network", asm("ia64_asm") ],
        CC               => "gcc",
        CFLAGS           => picker(debug   => "-O0 -g",
                                   release => "-O3"),
@@ -588,7 +595,7 @@ my %targets = (
        multilib         => "/hpux32",
    },
    "hpux64-ia64-gcc" => {
        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
        inherit_from     => [ "BASE_unix", "hpux-network", asm("ia64_asm") ],
        CC               => "gcc",
        CFLAGS           => picker(debug   => "-O0 -g",
                                   release => "-O3"),