$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;
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"),
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",
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",
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" ],
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"),
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",
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...
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",
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",
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.
#
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",
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" => {
inherit_from => [ "BASE_Windows" ],
template => 1,
CC => "cl",
- CPP => '"$(CC)" /EP /C',
+ CPP => '$(CC) /EP /C',
CFLAGS => "/W3 /wd4090 /nologo",
coutflag => "/Fo",
LD => "link",
ldpostoutflag => "",
ld_resp_delim => "\n",
bin_lflags => "setargv.obj",
- makedepcmd => '"$(CC)" /Zs /showIncludes',
+ makedepcmd => '$(CC) /Zs /showIncludes',
makedep_scheme => 'VC',
AR => "lib",
ARFLAGS => "/nologo",
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" => {
CFLAGS => picker(default => "-Wall",
debug => "-g -O0",
release => "-O3"),
+ ex_libs => add("-lcrypt32"),
lib_cppflags => "-DTERMIOS -DL_ENDIAN",
sys_id => "CYGWIN",
thread_scheme => "pthread",
},
##### 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
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",
+ }
);