asflags => "/c /Cp /Cx /Zi",
asoutflag => "/Fo" };
} else {
- die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
+ $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
+ $vc_win64a_info = { as => "{unknown}",
+ asflags => "",
+ asoutflag => "" };
}
}
return $vc_win64a_info;
asoutflag => "/Fo",
perlasm_scheme => "win32" };
} else {
- die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
+ $die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
+ $vc_win32_info = { as => "{unknown}",
+ asflags => "",
+ asoutflag => "",
+ perlasm_scheme => "win32" };
}
}
return $vc_win32_info;
sub vc_wince_info {
unless (%$vc_wince_info) {
# sanity check
- die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'}));
- die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'}));
- die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'}));
+ $die->('%OSVERSION% is not defined') if (!defined($ENV{'OSVERSION'}));
+ $die->('%PLATFORM% is not defined') if (!defined($ENV{'PLATFORM'}));
+ $die->('%TARGETCPU% is not defined') if (!defined($ENV{'TARGETCPU'}));
#
# Idea behind this is to mimic flags set by eVC++ IDE...
#
my $wcevers = $ENV{'OSVERSION'}; # WCENNN
- die '%OSVERSION% value is insane'
- if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/);
- my $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN
- my $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN
+ my $wcevernum;
+ my $wceverdotnum;
+ if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) {
+ $wcevernum = "$1$2";
+ $wceverdotnum = "$1.$2";
+ } else {
+ $die->('%OSVERSION% value is insane');
+ $wcevernum = "{unknown}";
+ $wceverdotnum = "{unknown}";
+ }
+ my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN
+ my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN
my $wceplatf = $ENV{'PLATFORM'};
my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size";
$vms_info->{disable_warns} = [ ];
+ $vms_info->{pointer_size} = $pointer_size_str;
if ($pointer_size == 64) {
`PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
if ($? == 0) {
threads("-pthread")),
bn_ops => "BN_LLONG",
shared_cflag => "-fPIC",
- shared_ldflag => "-shared",
+ shared_ldflag => "-shared -static-libgcc",
},
"solaris64-x86_64-gcc" => {
# -shared -static-libgcc might appear controversial, but modules
},
#### Solaris x86 with Sun C setups
- "solaris-x86-cc" => {
- inherit_from => [ "solaris-common" ],
- cc => "cc",
- cflags => add_before(picker(default => "-xarch=generic -xstrconst -Xa -DL_ENDIAN",
- debug => "-g",
- release => "-xO5 -xregs=frameptr -xdepend -xbuiltin"),
- threads("-D_REENTRANT")),
- lflags => add(threads("-mt")),
- ex_libs => add(threads("-lpthread")),
- bn_ops => "BN_LLONG RC4_CHAR",
- shared_cflag => "-KPIC",
- shared_ldflag => "-G -dy -z text",
- },
+ # There used to be solaris-x86-cc target, but it was removed,
+ # primarily because vendor assembler can't assemble our modules
+ # with -KPIC flag. As result it, assembly support, was not even
+ # available as option. But its lack means lack of side-channel
+ # resistant code, which is incompatible with security by todays
+ # standards. Fortunately gcc is readily available prepackaged
+ # option, which we can firmly point at...
+ #
+ # On related note, solaris64-x86_64-cc target won't compile code
+ # paths utilizing AVX and post-Haswell instruction extensions.
+ # Consider switching to solaris64-x86_64-gcc even here...
+ #
"solaris64-x86_64-cc" => {
inherit_from => [ "solaris-common", asm("x86_64_asm") ],
cc => "cc",
release => "-xO5 -xdepend -xbuiltin"),
threads("-D_REENTRANT")),
thread_scheme => "pthreads",
- lflags => add(threads("-mt")),
+ lflags => add("-xarch=generic64",threads("-mt")),
ex_libs => add(threads("-lpthread")),
bn_ops => "SIXTY_FOUR_BIT_LONG",
perlasm_scheme => "elf",
"solaris64-sparcv9-cc" => {
inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
cflags => add_before("-xarch=v9 -xtarget=ultra"),
+ lflags => add_before("-xarch=v9"),
bn_ops => "BN_LLONG RC4_CHAR",
shared_ldflag => "-xarch=v9 -G -dy -z text",
multilib => "/64",
# crypto/sha/sha_lcl.h.
# - originally there were 32-bit hpux-parisc2-* targets. They were
# scrapped, because a) they were not interchangeable with other 32-bit
-# targets; a) when critical 32-bit assembly modules detect if they
-# are executed on PA-RISC 2.0 and thus adequate performance is
-# provided.
+# 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.
# <appro@fy.chalmers.se>
"hpux-parisc-gcc" => {
inherit_from => [ "BASE_unix" ],
#
# 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/
+ # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin
#
"android" => {
inherit_from => [ "linux-generic32" ],
inherit_from => [ "android64", asm("aarch64_asm") ],
perlasm_scheme => "linux64",
},
+ "android64-x86_64" => {
+ inherit_from => [ "android64", asm("x86_64_asm") ],
+ perlasm_scheme => "elf",
+ },
+ "android64-mips64" => {
+ ############################################################
+ # You are more than likely have to specify target processor
+ # on ./Configure command line. Trouble is that toolchain's
+ # default is MIPS64r6 (at least in r10d), but there are no
+ # such processors around (or they are too rare to spot one).
+ # Actual problem is that MIPS64r6 is binary incompatible
+ # with previous MIPS ISA versions, in sense that unlike
+ # prior versions original MIPS binary code will fail.
+ #
+ inherit_from => [ "android64", asm("mips64_asm") ],
+ perlasm_scheme => "64",
+ },
#### *BSD
"BSD-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",
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",
},
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",
return [ @defs ];
}),
coutflag => "/Fo",
- rc => "rc",
- rcoutflag => "/fo",
- lib_cflags => add("/Zi /Fdlib"),
- dso_cflags => "/Zi",
+ lib_cflags => add("/Zi /Fdossl_static"),
+ dso_cflags => "/Zi /Fddso",
bin_cflags => "/Zi /Fdapp",
lflags => add("/debug"),
shared_ldflag => "/dll",
shared_target => "win-shared", # meaningless except it gives Configure a hint
thread_scheme => "winthreads",
dso_scheme => "win32",
+ apps_aux_src => add("win32_init.c"),
},
"VC-noCE-common" => {
inherit_from => [ "VC-common" ],
release =>
sub {
($disabled{shared} ? "" : "/MD")
- ." /Ox /O2 /Ob2";
+ ." /O2";
})),
lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
# Following might/should appears controversial, i.e. defining
shared_rcflag => "--target=pe-i386",
shared_extension => ".dll",
multilib => "",
+ apps_aux_src => add("win32_init.c"),
},
"mingw64" => {
# As for OPENSSL_USE_APPLINK. Applink makes it possible to use
shared_rcflag => "--target=pe-x86-64",
shared_extension => ".dll",
multilib => "64",
+ apps_aux_src => add("win32_init.c"),
},
#### UEFI
inherit_from => [ "Cygwin-x86" ]
},
-#### DJGPP
- "DJGPP" => {
- inherit_from => [ asm("x86_asm") ],
- cc => "gcc",
- cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
- sys_id => "MSDOS",
- ex_libs => add("-L/dev/env/WATT_ROOT/lib -lwatt"),
- bn_ops => "BN_LLONG",
- perlasm_scheme => "a.out",
- },
-
##### MacOS X (a.k.a. Darwin) setup
"darwin-common" => {
inherit_from => [ "BASE_unix" ],
dso_scheme => "dlfcn",
shared_target => "linux-shared",
shared_cflag => "-fPIC",
+ shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
},
##### VxWorks for various targets
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
ranlib => "$ENV{'RANLIB'}",
},
- "haiku-common" => {
- template => 1,
- cc => "cc",
- cflags => add_before(picker(default => "-DL_ENDIAN -Wall",
- debug => "-g -O0",
- release => "-O2"),
- threads("-D_REENTRANT")),
- sys_id => "HAIKU",
- lflags => "-lnetwork",
- perlasm_scheme => "elf",
- thread_scheme => "pthreads",
- dso_scheme => "dlfcn",
- shared_target => "haiku-shared",
- shared_cflag => "-fPIC",
- shared_ldflag => "-shared",
- shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- },
- "haiku-x86" => {
- inherit_from => [ "haiku-common", asm("x86_elf_asm") ],
- cflags => add(picker(default => "",
- release => "-fomit-frame-pointer")),
- bn_ops => "BN_LLONG",
- },
- # Haiku builds with no-asm
- "haiku-x86_64" => {
- inherit_from => [ "haiku-common", asm("x86_64_asm") ],
- cflags => add("-m64"),
- bn_ops => "SIXTY_FOUR_BIT_LONG",
- },
-
##### VMS
"vms-generic" => {
lflags => picker(default => "/MAP",
debug => "/DEBUG/TRACEBACK",
release => "/NODEBUG/NOTRACEBACK"),
- lib_cflags => add("/NAMES=(AS_IS,SHORTENED)"),
+ lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
dso_cflags => add("/NAMES=(AS_IS,SHORTENED)"),
shared_target => "vms-shared",
dso_scheme => "vms",
apps_aux_src => "vms_decc_init.c",
},
- # VMS on VAX is *unsupported*
- #"vms-asm" => {
- # template => 1,
- # bn_obj => "[.asm]vms.obj vms-helper.obj"
- #},
- #"vms-vax" => {
- # inherit_from => [ "vms-generic", asm("vms-asm") ],
- # as => "MACRO",
- # debug_aflags => "/NOOPTIMIZE/DEBUG",
- # release_aflags => "/OPTIMIZE/NODEBUG",
- # bn_opts => "THIRTY_TWO_BIT RC4_CHAR RC4_CHUNK DES_PTR BF_PTR",
- #},
"vms-alpha" => {
inherit_from => [ "vms-generic" ],
cflags => add(sub { my @warnings =
? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
}),
ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
+ pointer_size => sub { return vms_info(0)->{pointer_size} },
#as => "???",
#debug_aflags => "/NOOPTIMIZE/DEBUG",
#release_aflags => "/OPTIMIZE/NODEBUG",
- bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
+ bn_opts => "SIXTY_FOUR_BIT RC4_INT",
},
"vms-alpha-p32" => {
inherit_from => [ "vms-generic" ],
? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
}),
ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
+ pointer_size => sub { return vms_info(32)->{pointer_size} },
},
"vms-alpha-p64" => {
inherit_from => [ "vms-generic" ],
? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
}),
ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
+ pointer_size => sub { return vms_info(64)->{pointer_size} },
},
"vms-ia64" => {
inherit_from => [ "vms-generic" ],
? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
}),
ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
+ pointer_size => sub { return vms_info(0)->{pointer_size} },
#as => "I4S",
#debug_aflags => "/NOOPTIMIZE/DEBUG",
#release_aflags => "/OPTIMIZE/NODEBUG",
- bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
+ bn_opts => "SIXTY_FOUR_BIT RC4_INT",
},
"vms-ia64-p32" => {
inherit_from => [ "vms-generic" ],
? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
}),
ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
+ pointer_size => sub { return vms_info(32)->{pointer_size} },
},
"vms-ia64-p64" => {
inherit_from => [ "vms-generic" ],
? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
}),
ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
+ pointer_size => sub { return vms_info(64)->{pointer_size} },
},
);