inherit_from => [ "BASE_unix" ],
template => 1,
cflags => "-DFILIO_H",
- ex_libs => add("-lresolv -lsocket -lnsl -ldl"),
+ ex_libs => add("-lsocket -lnsl -ldl"),
dso_scheme => "dlfcn",
thread_scheme => "pthreads",
shared_target => "solaris-shared",
},
#### Solaris x86 with GNU C setups
"solaris-x86-gcc" => {
+ # NB. GNU C has to be configured to use GNU assembler, and not
+ # /usr/ccs/bin/as. Failure to comply will result in compile
+ # failures [at least] in 32-bit build.
+ # [Above statement is in direct contradition with one below.
+ # Latter is kept, because it's formally inappropriate to
+ # modify compile flags in letter release.]
# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
# to do it here because whenever GNU C instantiates an assembler
# template it surrounds it with #APP #NO_APP comment pair which
debug => "-O0 -g",
release => "-O3 -fomit-frame-pointer"),
threads("-pthread")),
+ ex_libs => add(threads("-pthread")),
bn_ops => "BN_LLONG",
shared_cflag => "-fPIC",
shared_ldflag => "-shared -static-libgcc",
debug => "-O0 -g",
release => "-O3"),
threads("-pthread")),
+ ex_libs => add(threads("-pthread")),
bn_ops => "SIXTY_FOUR_BIT_LONG",
perlasm_scheme => "elf",
shared_cflag => "-fPIC",
debug => "-O0 -g",
release => "-O3"),
threads("-pthread")),
+ ex_libs => add(threads("-pthread")),
bn_ops => "BN_LLONG RC4_CHAR",
shared_cflag => "-fPIC",
shared_ldflag => "-shared",
},
"solaris-sparcv9-cc" => {
inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
- cflags => add_before("-xarch=v8plus -xtarget=ultra"),
+ cflags => add_before("-xarch=v8plus"),
},
"solaris64-sparcv9-cc" => {
inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
- cflags => add_before("-xarch=v9 -xtarget=ultra"),
+ cflags => add_before("-xarch=v9"),
lflags => add_before("-xarch=v9"),
bn_ops => "BN_LLONG RC4_CHAR",
shared_ldflag => "-xarch=v9 -G -dy -z text",
debug => "-O0 -g",
release => "-O3"),
threads("-pthread")),
- ex_libs => add("-Wl,+s -ldld"),
+ ex_libs => add("-Wl,+s -ldld", threads("-pthread")),
bn_ops => "BN_LLONG",
thread_scheme => "pthreads",
dso_scheme => "dl",
debug => "-O0 -g",
release => "-O3"),
threads("-pthread")),
- ex_libs => add("-ldl"),
+ ex_libs => add("-ldl", threads("-pthread")),
bn_ops => "SIXTY_FOUR_BIT",
thread_scheme => "pthreads",
dso_scheme => "dlfcn",
debug => "-O0 -g",
release => "-O3"),
threads("-pthread")),
- ex_libs => add("-ldl"),
+ ex_libs => add("-ldl", threads("-pthread")),
bn_ops => "SIXTY_FOUR_BIT_LONG",
thread_scheme => "pthreads",
dso_scheme => "dlfcn",
cc => "gcc",
cflags => combine("-std=c9x -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -O3",
threads("-pthread")),
- ex_libs => "-lrt", # for mlock(2)
+ ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
bn_ops => "SIXTY_FOUR_BIT_LONG",
thread_scheme => "pthreads",
dso_scheme => "dlfcn",
cc => "cc",
cflags => combine("-std1 -D_XOPEN_SOURCE=500 -D_OSF_SOURCE -tune host -fast -readonly_strings",
threads("-pthread")),
- ex_libs => "-lrt", # for mlock(2)
+ ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
bn_ops => "SIXTY_FOUR_BIT_LONG",
thread_scheme => "pthreads",
dso_scheme => "dlfcn",
debug => "-O0 -g",
release => "-O3"),
threads("-pthread")),
- ex_libs => add("-ldl"),
+ ex_libs => add("-ldl", threads("-pthread")),
bn_ops => "BN_LLONG RC4_CHAR",
thread_scheme => "pthreads",
dso_scheme => "dlfcn",
shared_target => "linux-shared",
- shared_cflag => "-fPIC",
+ shared_cflag => "-fPIC -DOPENSSL_USE_NODELETE",
+ shared_ldflag => "-Wl,-znodelete",
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
},
"linux-generic64" => {
inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
cflags => add("-m64 -DB_ENDIAN"),
perlasm_scheme => "linux64",
- shared_ldflag => "-m64",
+ shared_ldflag => add("-m64"),
multilib => "64",
},
"linux-ppc64le" => {
inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
cflags => add("-m64 -DL_ENDIAN"),
perlasm_scheme => "linux64le",
- shared_ldflag => "-m64",
+ shared_ldflag => add("-m64"),
},
"linux-armv4" => {
cflags => add("-mabi=ilp32"),
bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
perlasm_scheme => "linux64",
- shared_ldflag => "-mabi=ilp32",
+ shared_ldflag => add("-mabi=ilp32"),
},
"linux-mips32" => {
inherit_from => [ "linux-generic32", asm("mips32_asm") ],
cflags => add("-mabi=32 -DBN_DIV3W"),
perlasm_scheme => "o32",
- shared_ldflag => "-mabi=32",
+ shared_ldflag => add("-mabi=32"),
},
# mips32 and mips64 below refer to contemporary MIPS Architecture
# specifications, MIPS32 and MIPS64, rather than to kernel bitness.
cflags => add("-mabi=n32 -DBN_DIV3W"),
bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
perlasm_scheme => "n32",
- shared_ldflag => "-mabi=n32",
+ shared_ldflag => add("-mabi=n32"),
multilib => "32",
},
"linux64-mips64" => {
inherit_from => [ "linux-generic64", asm("mips64_asm") ],
cflags => add("-mabi=64 -DBN_DIV3W"),
perlasm_scheme => "64",
- shared_ldflag => "-mabi=64",
+ shared_ldflag => add("-mabi=64"),
multilib => "64",
},
#### 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
"linux-elf" => {
inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
cflags => add(picker(default => "-DL_ENDIAN",
release => "-fomit-frame-pointer")),
- ex_libs => add(picker(debug => "-lefence")),
bn_ops => "BN_LLONG",
},
"linux-aout" => {
perlasm_scheme => "a.out",
},
+ #### X86 / X86_64 targets
+ "linux-x86" => {
+ inherit_from => [ "linux-generic32", asm("x86_asm") ],
+ cflags => add(picker(default => "-m32 -DL_ENDIAN",
+ release => "-fomit-frame-pointer")),
+ bn_ops => "BN_LLONG",
+ perlasm_scheme => "elf",
+ shared_ldflag => add("-m32"),
+ },
+ "linux-x86-clang" => {
+ inherit_from => [ "linux-x86" ],
+ cc => "clang",
+ cxx => "clang++",
+ cflags => add("-Wextra -Qunused-arguments"),
+ },
"linux-x86_64" => {
inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
cflags => add("-m64 -DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG",
perlasm_scheme => "elf",
- shared_ldflag => "-m64",
+ shared_ldflag => add("-m64"),
multilib => "64",
},
"linux-x86_64-clang" => {
cflags => add("-mx32 -DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT",
perlasm_scheme => "elf32",
- shared_ldflag => "-mx32",
+ shared_ldflag => add("-mx32"),
multilib => "x32",
},
inherit_from => [ "linux-generic64", asm("s390x_asm") ],
cflags => add("-m64 -DB_ENDIAN"),
perlasm_scheme => "64",
- shared_ldflag => "-m64",
+ shared_ldflag => add("-m64"),
multilib => "64",
},
"linux32-s390x" => {
cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"),
bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
perlasm_scheme => "31",
- shared_ldflag => "-m31",
+ shared_ldflag => add("-m31"),
multilib => "/highgprs",
},
# but -Wa,-Av8plus should do the trick no matter what.
inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W"),
- shared_ldflag => "-m32",
+ shared_ldflag => add("-m32"),
},
"linux64-sparcv9" => {
# GCC 3.1 is a requirement
inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
cflags => add("-m64 -mcpu=ultrasparc -DB_ENDIAN"),
bn_ops => "BN_LLONG RC4_CHAR",
- shared_ldflag => "-m64",
+ shared_ldflag => add("-m64"),
multilib => "64",
},
dso_scheme => "dlfcn",
shared_target => "linux-shared",
shared_cflag => "--pic",
- shared_ldflag => "-z --sysv --shared",
+ shared_ldflag => add("-z --sysv --shared"),
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
ranlib => "true",
},
#
# It takes pair of prior-set environment variables to make it work:
#
- # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
+ # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<arch>
# CROSS_COMPILE=<prefix>
#
# As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
#
# ANDROID_NDK=/some/where/android-ndk-10d
# CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
- # CROSS_COMPILE=arm-linux-adroideabi-
- # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
+ # CROSS_COMPILE=arm-linux-androideabi-
+ # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin
#
"android" => {
inherit_from => [ "linux-generic32" ],
},
#### IBM's AIX.
+ # Below targets assume AIX >=5. Caveat lector. If you are accustomed
+ # to control compilation "bitness" by setting $OBJECT_MODE environment
+ # 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-gcc" => {
inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
cc => "gcc",
debug => "-O0 -g",
release => "-O"),
threads("-pthread")),
+ ex_libs => add(threads("-pthread")),
sys_id => "AIX",
bn_ops => "BN_LLONG RC4_CHAR",
thread_scheme => "pthreads",
perlasm_scheme => "aix32",
dso_scheme => "dlfcn",
shared_target => "aix-shared",
- shared_ldflag => "-shared -Wl,-G",
+ shared_ldflag => "-shared -static-libgcc -Wl,-G",
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
arflags => "-X32",
},
debug => "-O0 -g",
release => "-O"),
threads("-pthread")),
+ ex_libs => add(threads("-pthread")),
sys_id => "AIX",
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
thread_scheme => "pthreads",
perlasm_scheme => "aix64",
dso_scheme => "dlfcn",
shared_target => "aix-shared",
- shared_ldflag => "-maix64 -shared -Wl,-G",
+ shared_ldflag => "-maix64 -shared -static-libgcc -Wl,-G",
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
arflags => "-X64",
},
- # Below targets assume AIX 5. Idea is to effectively disregard
- # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
- # ./config stage!
"aix-cc" => {
inherit_from => [ "BASE_unix", asm("ppc32_asm") ],
cc => "cc",
sys_id => "AIX",
bn_ops => "BN_LLONG RC4_CHAR",
thread_scheme => "pthreads",
+ ex_libs => threads("-lpthreads"),
perlasm_scheme => "aix32",
dso_scheme => "dlfcn",
shared_target => "aix-shared",
sys_id => "AIX",
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
thread_scheme => "pthreads",
+ ex_libs => threads("-lpthreads"),
perlasm_scheme => "aix64",
dso_scheme => "dlfcn",
shared_target => "aix-shared",
thread_scheme => "(unknown)",
},
-# OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
-# You need to compile using the c89.sh wrapper in the tools directory, because the
-# IBM compiler does not like the -L switch after any object modules.
-#
- "OS390-Unix" => {
- inherit_from => [ "BASE_unix" ],
- cc => "c89.sh",
- cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
- bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
- thread_scheme => "(unknown)",
- },
-
#### Visual C targets
#
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
defines => add(sub { my @defs = ();
unless ($disabled{"zlib-dynamic"}) {
+ my $zlib =
+ $withargs{zlib_lib} // "ZLIB1";
push @defs,
quotify("perl",
- 'LIBZ="' . $withargs{zlib_lib} . '"');
+ 'LIBZ="' . $zlib . '"');
}
return [ @defs ];
}),
},
"VC-noCE-common" => {
inherit_from => [ "VC-common" ],
+ template => 1,
cflags => add(picker(default => "-DUNICODE -D_UNICODE",
debug =>
sub {
},
"VC-WIN64-common" => {
inherit_from => [ "VC-noCE-common" ],
+ template => 1,
ex_libs => add(sub {
my @ex_libs = ();
push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
cc => "gcc",
cflags => combine("-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
threads("-pthread")),
- ex_libs => add("-ldl"),
+ ex_libs => add("-ldl", threads("-pthread")),
bn_ops => "BN_LLONG",
thread_scheme => "pthreads",
dso_scheme => "dlfcn",
"uClinux-dist" => {
inherit_from => [ "BASE_unix" ],
cc => "$ENV{'CC'}",
- cflags => combine("\$(CFLAGS)",
- threads("-D_REENTRANT")),
- plib_lflags => "\$(LDFLAGS)",
+ cflags => combine(threads("-D_REENTRANT")),
ex_libs => add("\$(LDLIBS)"),
bn_ops => "BN_LLONG",
thread_scheme => "pthreads",
"uClinux-dist64" => {
inherit_from => [ "BASE_unix" ],
cc => "$ENV{'CC'}",
- cflags => combine("\$(CFLAGS)",
- threads("-D_REENTRANT")),
- plib_lflags => "\$(LDFLAGS)",
+ cflags => combine(threads("-D_REENTRANT")),
ex_libs => add("\$(LDLIBS)"),
bn_ops => "SIXTY_FOUR_BIT_LONG",
thread_scheme => "pthreads",
inherit_from => [ "BASE_VMS" ],
template => 1,
cc => "CC/DECC",
- cflags => picker(default => "/STANDARD=RELAXED/NOLIST/PREFIX=ALL",
+ cflags => picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL",
debug => "/NOOPTIMIZE/DEBUG",
release => "/OPTIMIZE/NODEBUG"),
+ defines => add("OPENSSL_USE_NODELETE"),
lflags => picker(default => "/MAP",
debug => "/DEBUG/TRACEBACK",
release => "/NODEBUG/NOTRACEBACK"),
dso_scheme => "vms",
thread_scheme => "pthreads",
- apps_aux_src => "vms_decc_init.c",
+ apps_aux_src => "vms_decc_init.c vms_term_sock.c",
},
"vms-alpha" => {