Path: blob/main/crypto/openssl/Configurations/10-main.conf
34869 views
## -*- mode: perl; -*-1## Standard openssl configuration targets.23# Helper functions for the Windows configs4my $vc_win64a_info = {};5sub vc_win64a_info {6unless (%$vc_win64a_info) {7if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {8$vc_win64a_info = { AS => "nasm",9ASFLAGS => "-g",10asflags => "-Ox -f win64 -DNEAR",11asoutflag => "-o ",12perlasm_scheme => "nasm" };13} elsif ($disabled{asm}) {14# assembler is still used to compile uplink shim15$vc_win64a_info = { AS => "ml64",16ASFLAGS => "/nologo /Zi",17asflags => "/c /Cp /Cx",18asoutflag => "/Fo",19perlasm_scheme => "masm" };20} else {21$die->("NASM not found - make sure it's installed and available on %PATH%\n");22$vc_win64a_info = { AS => "{unknown}",23ASFLAGS => "",24asflags => "",25asoutflag => "",26perlasm_scheme => "auto" };27}28}29return $vc_win64a_info;30}3132my $vc_win32_info = {};33sub vc_win32_info {34unless (%$vc_win32_info) {35my $ver=`nasm -v 2>NUL`;36my $vew=`nasmw -v 2>NUL`;37if ($ver ne "" || $vew ne "") {38$vc_win32_info = { AS => $ver ge $vew ? "nasm" : "nasmw",39ASFLAGS => "",40asflags => "-f win32",41asoutflag => "-o ",42perlasm_scheme => "win32n" };43} elsif ($disabled{asm}) {44# not actually used, uplink shim is inlined into C code45$vc_win32_info = { AS => "ml",46ASFLAGS => "/nologo /Zi",47asflags => "/Cp /coff /c /Cx",48asoutflag => "/Fo",49perlasm_scheme => "win32" };50} else {51$die->("NASM not found - make sure it's installed and available on %PATH%\n");52$vc_win32_info = { AS => "{unknown}",53ASFLAGS => "",54asflags => "",55asoutflag => "",56perlasm_scheme => "win32" };57}58}59return $vc_win32_info;60}6162my $vc_wince_info = {};63sub vc_wince_info {64unless (%$vc_wince_info) {65# sanity check66$die->('%OSVERSION% is not defined') if (!defined(env('OSVERSION')));67$die->('%PLATFORM% is not defined') if (!defined(env('PLATFORM')));68$die->('%TARGETCPU% is not defined') if (!defined(env('TARGETCPU')));6970#71# Idea behind this is to mimic flags set by eVC++ IDE...72#73my $wcevers = env('OSVERSION'); # WCENNN74my $wcevernum;75my $wceverdotnum;76if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) {77$wcevernum = "$1$2";78$wceverdotnum = "$1.$2";79} else {80$die->('%OSVERSION% value is insane');81$wcevernum = "{unknown}";82$wceverdotnum = "{unknown}";83}84my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN85my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN8687my $wceplatf = env('PLATFORM');8889$wceplatf =~ tr/a-z0-9 /A-Z0-9_/;90$wcecdefs .= " -DWCE_PLATFORM_$wceplatf";9192my $wcetgt = env('TARGETCPU'); # just shorter name...93SWITCH: for($wcetgt) {94/^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";95$wcelflag.=" /machine:X86"; last; };96/^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";97$wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);98$wcecdefs.=" -QRarch4T -QRinterwork-return";99$wcelflag.=" /machine:THUMB"; last; };100/^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";101$wcelflag.=" /machine:ARM"; last; };102/^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";103$wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";104$wcelflag.=" /machine:MIPSFPU"; last; };105/^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";106$wcecdefs.=" -DMIPSII -QMmips16";107$wcelflag.=" /machine:MIPS16"; last; };108/^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";109$wcecdefs.=" -QMmips2";110$wcelflag.=" /machine:MIPS"; last; };111/^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";112$wcelflag.=" /machine:MIPS"; last; };113/^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";114$wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);115$wcelflag.=" /machine:$wcetgt"; last; };116{ $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";117$wcelflag.=" /machine:$wcetgt"; last; };118}119120$vc_wince_info = { cppflags => $wcecdefs,121lflags => $wcelflag };122}123return $vc_wince_info;124}125126# Helper functions for the VMS configs127my $vms_info = {};128sub vms_info {129my $pointer_size_str = $config{target} =~ m|-p(\d+)$| ? $1 : "";130131# For the case where Configure iterate through all config targets, such132# as when listing them and their details, we reset info if the pointer133# size changes.134if (%$vms_info && $vms_info->{pointer_size} ne $pointer_size_str) {135$vms_info = {};136}137138unless (%$vms_info) {139$vms_info->{disable_warns} = [140"CXXPRAGMANA", # Shut up about unknown / unsupported pragmas141];142$vms_info->{pointer_size} = $pointer_size_str;143if ($pointer_size_str eq "64") {144`PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;145if ($? == 0) {146push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";147}148}149150unless ($disabled{zlib}) {151my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;152if (defined($disabled{"zlib-dynamic"})) {153$vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";154} else {155$vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;156# In case the --with-zlib-lib value contains something like157# /SHARE or /LIB or so at the end, remove it.158$vms_info->{def_zlib} =~ s|/.*$||g;159}160}161162if ($config{target} =~ /-ia64/) {163`PIPE ias -H 2> NL:`;164if ($? == 0) {165$vms_info->{AS} = "ias";166$vms_info->{ASFLAGS} = '-d debug';167$vms_info->{asflags} = '"-N" vms_upcase';168$vms_info->{asoutflag} = "-o ";169$vms_info->{perlasm_scheme} = "ias";170}171}172}173return $vms_info;174}175176my %targets = (177178#### Basic configs that should work on any 32-bit box179"gcc" => {180inherit_from => [ "BASE_unix" ],181CC => "gcc",182CFLAGS => picker(debug => "-O0 -g",183release => "-O3"),184thread_scheme => "(unknown)",185bn_ops => "BN_LLONG",186},187"cc" => {188inherit_from => [ "BASE_unix" ],189CC => "cc",190CFLAGS => "-O",191thread_scheme => "(unknown)",192},193194#### VOS Configurations195"vos-gcc" => {196inherit_from => [ "BASE_unix" ],197CC => "gcc",198CFLAGS => picker(default => "-Wall",199debug => "-O0 -g",200release => "-O3"),201cppflags => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES",202lib_cppflags => "-DB_ENDIAN",203thread_scheme => "(unknown)",204sys_id => "VOS",205lflags => add("-Wl,-map"),206bn_ops => "BN_LLONG",207shared_extension => ".so",208},209210#### Solaris configurations211"solaris-common" => {212inherit_from => [ "BASE_unix" ],213template => 1,214lib_cppflags => "-DFILIO_H",215ex_libs => add("-lsocket -lnsl -ldl"),216dso_scheme => "dlfcn",217thread_scheme => "pthreads",218},219#### Solaris common with Sun C setups220"solaris-common-cc" => {221inherit_from => [ "solaris-common" ],222template => 1,223shared_target => "solaris",224shared_ldflag => "-Wl,-Bsymbolic",225shared_defflag => "-Wl,-M,",226shared_sonameflag=> "-Wl,-h,",227},228#### Solaris common with GNU C setups229"solaris-common-gcc" => {230inherit_from => [ "solaris-common" ],231template => 1,232shared_target => "solaris-gcc-shared", # The rest is on shared_info.pl233},234#### Solaris x86 with GNU C setups235"solaris-x86-gcc" => {236# NB. GNU C has to be configured to use GNU assembler, and not237# /usr/ccs/bin/as. Failure to comply will result in compile238# failures [at least] in 32-bit build.239inherit_from => [ "solaris-common-gcc" ],240CC => "gcc",241CFLAGS => add_before(picker(default => "-Wall",242debug => "-O0 -g",243release => "-O3 -fomit-frame-pointer")),244lib_cppflags => add("-DL_ENDIAN"),245bn_ops => "BN_LLONG",246shared_cflag => "-fPIC",247shared_ldflag => add_before("-shared -static-libgcc"),248asm_arch => 'x86',249perlasm_scheme => 'elf',250},251"solaris64-x86_64-gcc" => {252# -shared -static-libgcc might appear controversial, but modules253# taken from static libgcc do not have relocations and linking254# them into our shared objects doesn't have any negative side255# effects. On the contrary, doing so makes it possible to use256# gcc shared build with Sun C. Given that gcc generates faster257# code [thanks to inline assembler], I would actually recommend258# to consider using gcc shared build even with vendor compiler:-)259# -- <[email protected]>260inherit_from => [ "solaris-common-gcc" ],261CC => "gcc",262CFLAGS => add_before(picker(default => "-Wall",263debug => "-O0 -g",264release => "-O3")),265cflags => add("-m64"),266lib_cppflags => add("-DL_ENDIAN"),267bn_ops => "SIXTY_FOUR_BIT_LONG",268asm_arch => 'x86_64',269perlasm_scheme => "elf",270shared_cflag => "-fPIC",271shared_ldflag => add_before("-shared -static-libgcc"),272multilib => "/64",273},274275#### Solaris x86 with Sun C setups276# There used to be solaris-x86-cc target, but it was removed,277# primarily because vendor assembler can't assemble our modules278# with -KPIC flag. As result it, assembly support, was not even279# available as option. But its lack means lack of side-channel280# resistant code, which is incompatible with security by today's281# standards. Fortunately gcc is readily available prepackaged282# option, which we can firmly point at...283#284# On related note, solaris64-x86_64-cc target won't compile code285# paths utilizing AVX and post-Haswell instruction extensions.286# Consider switching to solaris64-x86_64-gcc even here...287#288"solaris64-x86_64-cc" => {289inherit_from => [ "solaris-common-cc" ],290CC => "cc",291CFLAGS => add_before(picker(debug => "-g",292release => "-xO5 -xdepend -xbuiltin")),293cflags => add_before("-xarch=generic64 -xstrconst -Xa"),294cppflags => add(threads("-D_REENTRANT")),295lib_cppflags => add("-DL_ENDIAN"),296thread_scheme => "pthreads",297lflags => add(threads("-mt")),298bn_ops => "SIXTY_FOUR_BIT_LONG",299asm_arch => 'x86_64',300perlasm_scheme => "elf",301shared_cflag => "-KPIC",302shared_ldflag => add_before("-G -dy -z text"),303multilib => "/64",304},305306#### SPARC Solaris with GNU C setups307"solaris-sparcv7-gcc" => {308inherit_from => [ "solaris-common-gcc" ],309CC => "gcc",310CFLAGS => add_before(picker(default => "-Wall",311debug => "-O0 -g",312release => "-O3")),313lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),314bn_ops => "BN_LLONG RC4_CHAR",315shared_cflag => "-fPIC",316shared_ldflag => add_before("-shared -static-libgcc"),317},318"solaris-sparcv8-gcc" => {319inherit_from => [ "solaris-sparcv7-gcc" ],320cflags => add_before("-mcpu=v8"),321asm_arch => 'sparcv8',322perlasm_scheme => 'void',323},324"solaris-sparcv9-gcc" => {325# -m32 should be safe to add as long as driver recognizes326# -mcpu=ultrasparc327inherit_from => [ "solaris-sparcv7-gcc" ],328cflags => add_before("-m32 -mcpu=ultrasparc"),329asm_arch => 'sparcv9',330perlasm_scheme => 'void',331},332"solaris64-sparcv9-gcc" => {333inherit_from => [ "solaris-sparcv9-gcc" ],334cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },335bn_ops => "BN_LLONG RC4_CHAR",336multilib => "/64",337},338339#### SPARC Solaris with Sun C setups340# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.341# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8342# SC5.0 note: Compiler common patch 107357-01 or later is required!343"solaris-sparcv7-cc" => {344inherit_from => [ "solaris-common-cc" ],345CC => "cc",346CFLAGS => add_before(picker(debug => "-g",347release => "-xO5 -xdepend")),348cflags => add_before("-xstrconst -Xa"),349cppflags => add(threads("-D_REENTRANT")),350lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),351lflags => add(threads("-mt")),352bn_ops => "BN_LLONG RC4_CHAR",353shared_cflag => "-KPIC",354shared_ldflag => add_before("-G -dy -z text"),355},356####357"solaris-sparcv8-cc" => {358inherit_from => [ "solaris-sparcv7-cc" ],359cflags => add_before("-xarch=v8"),360asm_arch => 'sparcv8',361perlasm_scheme => 'void',362},363"solaris-sparcv9-cc" => {364inherit_from => [ "solaris-sparcv7-cc" ],365cflags => add_before("-xarch=v8plus"),366asm_arch => 'sparcv9',367perlasm_scheme => 'void',368},369"solaris64-sparcv9-cc" => {370inherit_from => [ "solaris-sparcv7-cc" ],371cflags => add_before("-m64 -xarch=sparc"),372bn_ops => "BN_LLONG RC4_CHAR",373asm_arch => 'sparcv9',374perlasm_scheme => 'void',375multilib => "/64",376},377378#### IRIX 6.x configs379# Only N32 and N64 ABIs are supported.380"irix-common" => {381inherit_from => [ "BASE_unix" ],382template => 1,383cppflags => threads("-D_SGI_MP_SOURCE"),384lib_cppflags => "-DB_ENDIAN",385ex_libs => add(threads("-lpthread")),386thread_scheme => "pthreads",387dso_scheme => "dlfcn",388shared_target => "self",389shared_ldflag => "-shared -Wl,-Bsymbolic",390shared_sonameflag=> "-Wl,-soname,",391},392"irix-mips3-gcc" => {393inherit_from => [ "irix-common" ],394CC => "gcc",395CFLAGS => picker(debug => "-g -O0",396release => "-O3"),397LDFLAGS => "-static-libgcc",398cflags => "-mabi=n32",399bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",400asm_arch => 'mips64',401perlasm_scheme => "n32",402multilib => "32",403},404"irix-mips3-cc" => {405inherit_from => [ "irix-common" ],406CC => "cc",407CFLAGS => picker(debug => "-g -O0",408release => "-O2"),409cflags => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared",410bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",411asm_arch => 'mips64',412perlasm_scheme => "n32",413multilib => "32",414},415# N64 ABI builds.416"irix64-mips4-gcc" => {417inherit_from => [ "irix-common" ],418CC => "gcc",419CFLAGS => picker(debug => "-g -O0",420release => "-O3"),421LDFLAGS => "-static-libgcc",422cflags => "-mabi=64 -mips4",423bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",424asm_arch => 'mips64',425perlasm_scheme => "64",426multilib => "64",427},428"irix64-mips4-cc" => {429inherit_from => [ "irix-common" ],430CC => "cc",431CFLAGS => picker(debug => "-g -O0",432release => "-O2"),433cflags => "-64 -mips4 -use_readonly_const -G0 -rdata_shared",434bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",435asm_arch => 'mips64',436perlasm_scheme => "64",437multilib => "64",438},439440#### Unified HP-UX ANSI C configs.441# Special notes:442# - Originally we were optimizing at +O4 level. It should be noted443# that the only difference between +O3 and +O4 is global inter-444# procedural analysis. As it has to be performed during the link445# stage the compiler leaves behind certain pseudo-code in lib*.a446# which might be release or even patch level specific. Generating447# the machine code for and analyzing the *whole* program appears448# to be *extremely* memory demanding while the performance gain is449# actually questionable. The situation is intensified by the default450# HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB451# which is way too low for +O4. In other words, doesn't +O3 make452# more sense?453# - Keep in mind that the HP compiler by default generates code454# suitable for execution on the host you're currently compiling at.455# If the toolkit is meant to be used on various PA-RISC processors456# consider './Configure hpux-parisc-[g]cc +DAportable'.457# - -DMD32_XARRAY triggers workaround for compiler bug we ran into in458# 32-bit message digests. (For the moment of this writing) HP C459# doesn't seem to "digest" too many local variables (they make "him"460# chew forever:-). For more details look-up MD32_XARRAY comment in461# crypto/sha/sha_local.h.462# - originally there were 32-bit hpux-parisc2-* targets. They were463# scrapped, because a) they were not interchangeable with other 32-bit464# targets; b) performance-critical 32-bit assembly modules implement465# even PA-RISC 2.0-specific code paths, which are chosen at run-time,466# thus adequate performance is provided even with PA-RISC 1.1 build.467"hpux-common" => {468inherit_from => [ "BASE_unix" ],469template => 1,470defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED",471"_HPUX_ALT_XOPEN_SOCKET_API"),472lib_cppflags => "-DB_ENDIAN",473thread_scheme => "pthreads",474dso_scheme => "dlfcn", # overridden in 32-bit PA-RISC builds475shared_target => "self",476bin_lflags => "-Wl,+s,+cdp,../:,+cdp,./:",477shared_ldflag => "-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:",478shared_sonameflag=> "-Wl,+h,",479},480"hpux-parisc-gcc" => {481inherit_from => [ "hpux-common" ],482CC => "gcc",483CFLAGS => picker(debug => "-O0 -g",484release => "-O3"),485cflags => add(threads("-pthread")),486lib_cppflags => add("-DBN_DIV2W"),487ex_libs => add("-ldld", threads("-pthread")),488bn_ops => "BN_LLONG RC4_CHAR",489dso_scheme => "dl",490shared_cflag => "-fPIC",491shared_ldflag => add_before("-shared"),492shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",493},494"hpux-parisc1_1-gcc" => {495inherit_from => [ "hpux-parisc-gcc" ],496asm_arch => 'parisc11',497perlasm_scheme => "32",498multilib => "/pa1.1",499},500"hpux64-parisc2-gcc" => {501inherit_from => [ "hpux-common" ],502CC => "gcc",503CFLAGS => combine(picker(debug => "-O0 -g",504release => "-O3")),505cflags => add(threads("-pthread")),506ex_libs => add("-ldl", threads("-pthread")),507bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",508asm_arch => 'parisc20_64',509perlasm_scheme => "64",510shared_cflag => "-fpic",511shared_ldflag => add_before("-shared"),512shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",513multilib => "/pa20_64",514},515516# More attempts at unified 10.X and 11.X targets for HP C compiler.517"hpux-parisc-cc" => {518inherit_from => [ "hpux-common" ],519CC => "cc",520CFLAGS => picker(debug => "+O0 +d -g",521release => "+O3"),522cflags => "+Optrs_strongly_typed -Ae +ESlit",523cppflags => threads("-D_REENTRANT"),524lib_cppflags => add("-DBN_DIV2W -DMD32_XARRAY"),525ex_libs => add("-ldld", threads("-lpthread")),526bn_ops => "RC4_CHAR",527dso_scheme => "dl",528shared_cflag => "+Z",529shared_ldflag => add_before("-b"),530shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",531},532"hpux-parisc1_1-cc" => {533inherit_from => [ "hpux-parisc-cc" ],534cflags => add_before("+DA1.1"),535asm_arch => 'parisc11',536perlasm_scheme => "32",537multilib => "/pa1.1",538},539"hpux64-parisc2-cc" => {540inherit_from => [ "hpux-common" ],541CC => "cc",542CFLAGS => picker(debug => "+O0 +d -g",543release => "+O3") ,544cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit",545cppflags => threads("-D_REENTRANT") ,546lib_cppflags => add("-DMD32_XARRAY"),547ex_libs => add("-ldl", threads("-lpthread")),548bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",549asm_arch => 'parisc20_64',550perlasm_scheme => "64",551shared_cflag => "+Z",552shared_ldflag => add_before("-b"),553shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",554multilib => "/pa20_64",555},556557# HP/UX IA-64 targets558"hpux-ia64-cc" => {559inherit_from => [ "hpux-common" ],560CC => "cc",561CFLAGS => picker(debug => "+O0 +d -g",562release => "+O2"),563cflags => "-Ae +DD32 +Olit=all -z",564cppflags => add(threads("-D_REENTRANT")),565ex_libs => add("-ldl", threads("-lpthread")),566bn_ops => "SIXTY_FOUR_BIT",567asm_arch => 'ia64',568perlasm_scheme => 'void',569shared_cflag => "+Z",570shared_ldflag => add_before("-b"),571multilib => "/hpux32",572},573"hpux64-ia64-cc" => {574inherit_from => [ "hpux-common" ],575CC => "cc",576CFLAGS => picker(debug => "+O0 +d -g",577release => "+O3"),578cflags => "-Ae +DD64 +Olit=all -z",579cppflags => threads("-D_REENTRANT"),580ex_libs => add("-ldl", threads("-lpthread")),581bn_ops => "SIXTY_FOUR_BIT_LONG",582asm_arch => 'ia64',583perlasm_scheme => 'void',584shared_cflag => "+Z",585shared_ldflag => add_before("-b"),586multilib => "/hpux64",587},588# GCC builds...589"hpux-ia64-gcc" => {590inherit_from => [ "hpux-common" ],591CC => "gcc",592CFLAGS => picker(debug => "-O0 -g",593release => "-O3"),594cflags => add(threads("-pthread")),595ex_libs => add("-ldl", threads("-pthread")),596bn_ops => "SIXTY_FOUR_BIT",597asm_arch => 'ia64',598perlasm_scheme => 'void',599shared_cflag => "-fpic",600shared_ldflag => add_before("-shared"),601multilib => "/hpux32",602},603"hpux64-ia64-gcc" => {604inherit_from => [ "hpux-common" ],605CC => "gcc",606CFLAGS => picker(debug => "-O0 -g",607release => "-O3"),608cflags => combine("-mlp64", threads("-pthread")),609ex_libs => add("-ldl", threads("-pthread")),610bn_ops => "SIXTY_FOUR_BIT_LONG",611asm_arch => 'ia64',612perlasm_scheme => 'void',613shared_cflag => "-fpic",614shared_ldflag => add_before("-shared"),615multilib => "/hpux64",616},617618#### HP MPE/iX http://jazz.external.hp.com/src/openssl/619"MPE/iX-gcc" => {620inherit_from => [ "BASE_unix" ],621CC => "gcc",622CFLAGS => "-O3",623cppflags => "-D_POSIX_SOURCE -D_SOCKET_SOURCE",624includes => [ "/SYSLOG/PUB" ],625lib_cppflags => "-DBN_DIV2W",626sys_id => "MPE",627lflags => add("-L/SYSLOG/PUB"),628ex_libs => add("-lsyslog -lsocket -lcurses"),629thread_scheme => "(unknown)",630bn_ops => "BN_LLONG",631},632633#### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4634#### and forward. In reality 'uname -s' still returns "OSF1". Originally635#### there were even osf1-* configs targeting prior versions provided,636#### but not anymore...637"tru64-alpha-gcc" => {638inherit_from => [ "BASE_unix" ],639CC => "gcc",640CFLAGS => "-O3",641cflags => add("-std=c9x", threads("-pthread")),642cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",643ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)644bn_ops => "SIXTY_FOUR_BIT_LONG",645asm_arch => 'alpha',646perlasm_scheme => "void",647thread_scheme => "pthreads",648dso_scheme => "dlfcn",649shared_target => "alpha-osf1-shared",650shared_extension => ".so",651},652"tru64-alpha-cc" => {653inherit_from => [ "BASE_unix" ],654CC => "cc",655CFLAGS => "-tune host -fast",656cflags => add("-std1 -readonly_strings",657threads("-pthread")),658cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",659ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)660bn_ops => "SIXTY_FOUR_BIT_LONG",661asm_arch => 'alpha',662perlasm_scheme => "void",663thread_scheme => "pthreads",664dso_scheme => "dlfcn",665shared_target => "alpha-osf1-shared",666shared_ldflag => "-msym",667shared_extension => ".so",668},669670####671#### Variety of LINUX:-)672####673# *-generic* is endian-neutral target, but ./config is free to674# throw in -D[BL]_ENDIAN, whichever appropriate...675"linux-generic32" => {676inherit_from => [ "BASE_unix" ],677CC => "gcc",678CXX => "g++",679CFLAGS => picker(default => "-Wall",680debug => "-O0 -g",681release => "-O3"),682CXXFLAGS => picker(default => "-Wall",683debug => "-O0 -g",684release => "-O3"),685cflags => threads("-pthread"),686cxxflags => combine("-std=c++11", threads("-pthread")),687lib_cppflags => "-DOPENSSL_USE_NODELETE",688ex_libs => add("-ldl", threads("-pthread")),689bn_ops => "BN_LLONG RC4_CHAR",690thread_scheme => "pthreads",691dso_scheme => "dlfcn",692shared_target => "linux-shared",693shared_cflag => "-fPIC",694shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },695enable => [ "afalgeng" ],696},697"linux-latomic" => {698inherit_from => [ "linux-generic32" ],699ex_libs => add(threads("-latomic")),700},701"linux-generic64" => {702inherit_from => [ "linux-generic32" ],703bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",704},705706"linux-ppc" => {707inherit_from => [ "linux-latomic" ],708asm_arch => 'ppc32',709perlasm_scheme => "linux32",710lib_cppflags => add("-DB_ENDIAN"),711},712"linux-ppc64" => {713inherit_from => [ "linux-generic64" ],714cflags => add("-m64"),715cxxflags => add("-m64"),716lib_cppflags => add("-DB_ENDIAN"),717asm_arch => 'ppc64',718perlasm_scheme => "linux64",719multilib => "64",720},721"linux-ppc64le" => {722inherit_from => [ "linux-generic64" ],723cflags => add("-m64"),724cxxflags => add("-m64"),725lib_cppflags => add("-DL_ENDIAN"),726asm_arch => 'ppc64',727perlasm_scheme => "linux64le",728},729730"linux-armv4" => {731################################################################732# Note that -march is not among compiler options in linux-armv4733# target description. Not specifying one is intentional to give734# you choice to:735#736# a) rely on your compiler default by not specifying one;737# b) specify your target platform explicitly for optimal738# performance, e.g. -march=armv6 or -march=armv7-a;739# c) build "universal" binary that targets *range* of platforms740# by specifying minimum and maximum supported architecture;741#742# As for c) option. It actually makes no sense to specify743# maximum to be less than ARMv7, because it's the least744# requirement for run-time switch between platform-specific745# code paths. And without run-time switch performance would be746# equivalent to one for minimum. Secondly, there are some747# natural limitations that you'd have to accept and respect.748# Most notably you can *not* build "universal" binary for749# big-endian platform. This is because ARMv7 processor always750# picks instructions in little-endian order. Another similar751# limitation is that -mthumb can't "cross" -march=armv6t2752# boundary, because that's where it became Thumb-2. Well, this753# limitation is a bit artificial, because it's not really754# impossible, but it's deemed too tricky to support. And of755# course you have to be sure that your binutils are actually756# up to the task of handling maximum target platform. With all757# this in mind here is an example of how to configure758# "universal" build:759#760# ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8761#762inherit_from => [ "linux-latomic" ],763asm_arch => 'armv4',764perlasm_scheme => "linux32",765},766"linux-aarch64" => {767inherit_from => [ "linux-generic64" ],768asm_arch => 'aarch64',769perlasm_scheme => "linux64",770},771"linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32772inherit_from => [ "linux-generic32" ],773cflags => add("-mabi=ilp32"),774cxxflags => add("-mabi=ilp32"),775bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",776asm_arch => 'aarch64',777perlasm_scheme => "linux64",778},779"linux-arm64ilp32-clang" => { # clang config abi by --target780inherit_from => [ "linux-generic32" ],781CC => "clang",782CXX => "clang++",783bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",784asm_arch => 'aarch64',785perlasm_scheme => "linux64",786},787"linux-mips32" => {788# Configure script adds minimally required -march for assembly789# support, if no -march was specified at command line.790inherit_from => [ "linux-latomic" ],791cflags => add("-mabi=32"),792cxxflags => add("-mabi=32"),793asm_arch => 'mips32',794perlasm_scheme => "o32",795},796# mips32 and mips64 below refer to contemporary MIPS Architecture797# specifications, MIPS32 and MIPS64, rather than to kernel bitness.798"linux-mips64" => {799inherit_from => [ "linux-latomic" ],800cflags => add("-mabi=n32"),801cxxflags => add("-mabi=n32"),802bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",803asm_arch => 'mips64',804perlasm_scheme => "n32",805multilib => "32",806},807"linux64-mips64" => {808inherit_from => [ "linux-generic64" ],809cflags => add("-mabi=64"),810cxxflags => add("-mabi=64"),811asm_arch => 'mips64',812perlasm_scheme => "64",813multilib => "64",814},815816# riscv below refers to contemporary RISCV Architecture817# specifications,818"linux64-riscv64" => {819inherit_from => [ "linux-generic64"],820perlasm_scheme => "linux64",821asm_arch => 'riscv64',822},823824"linux32-riscv32" => {825inherit_from => [ "linux-latomic" ],826perlasm_scheme => "linux32",827asm_arch => 'riscv32',828},829830# loongarch64 below refers to contemporary LoongArch Architecture831# specifications,832"linux64-loongarch64" => {833inherit_from => [ "linux-generic64"],834perlasm_scheme => "linux64",835asm_arch => 'loongarch64',836lib_cppflags => add("-DL_ENDIAN"),837},838839#### IA-32 targets...840#### These two targets are a bit aged and are to be used on older Linux841#### machines where gcc doesn't understand -m32 and -m64842"linux-elf" => {843inherit_from => [ "linux-generic32" ],844CFLAGS => add(picker(release => "-fomit-frame-pointer")),845lib_cppflags => add("-DL_ENDIAN"),846bn_ops => "BN_LLONG",847asm_arch => 'x86',848perlasm_scheme => "elf",849},850"linux-aout" => {851inherit_from => [ "BASE_unix" ],852CC => "gcc",853CFLAGS => add(picker(default => "-Wall",854debug => "-O0 -g",855release => "-O3 -fomit-frame-pointer")),856lib_cppflags => add("-DL_ENDIAN"),857bn_ops => "BN_LLONG",858thread_scheme => "(unknown)",859asm_arch => 'x86',860perlasm_scheme => "a.out",861},862863#### X86 / X86_64 targets864"linux-x86" => {865inherit_from => [ "linux-generic32" ],866CFLAGS => add(picker(release => "-fomit-frame-pointer")),867cflags => add("-m32"),868cxxflags => add("-m32"),869lib_cppflags => add("-DL_ENDIAN"),870bn_ops => "BN_LLONG",871asm_arch => 'x86',872perlasm_scheme => "elf",873},874"linux-x86-latomic" => {875inherit_from => [ "linux-x86" ],876ex_libs => add(threads("-latomic")),877},878"linux-x86-clang" => {879inherit_from => [ "linux-x86" ],880CC => "clang",881CXX => "clang++",882ex_libs => add(threads("-latomic")),883},884"linux-x86_64" => {885inherit_from => [ "linux-generic64" ],886cflags => add("-m64"),887cxxflags => add("-m64"),888lib_cppflags => add("-DL_ENDIAN"),889bn_ops => "SIXTY_FOUR_BIT_LONG",890asm_arch => 'x86_64',891perlasm_scheme => "elf",892multilib => "64",893},894"linux-x86_64-clang" => {895inherit_from => [ "linux-x86_64" ],896CC => "clang",897CXX => "clang++",898},899"linux-x32" => {900inherit_from => [ "linux-generic32" ],901cflags => add("-mx32"),902cxxflags => add("-mx32"),903lib_cppflags => add("-DL_ENDIAN"),904bn_ops => "SIXTY_FOUR_BIT",905asm_arch => 'x86_64',906perlasm_scheme => "elf32",907multilib => "x32",908},909910"linux-ia64" => {911inherit_from => [ "linux-generic64" ],912bn_ops => "SIXTY_FOUR_BIT_LONG",913asm_arch => 'ia64',914perlasm_scheme => 'void',915},916917"linux64-s390x" => {918inherit_from => [ "linux-generic64" ],919cflags => add("-m64"),920cxxflags => add("-m64"),921lib_cppflags => add("-DB_ENDIAN"),922asm_arch => 's390x',923perlasm_scheme => "64",924multilib => "64",925},926"linux32-s390x" => {927#### So called "highgprs" target for z/Architecture CPUs928# "Highgprs" is kernel feature first implemented in Linux929# 2.6.32, see /proc/cpuinfo. The idea is to preserve most930# significant bits of general purpose registers not only931# upon 32-bit process context switch, but even on932# asynchronous signal delivery to such process. This makes933# it possible to deploy 64-bit instructions even in legacy934# application context and achieve better [or should we say935# adequate] performance. The build is binary compatible with936# linux-generic32, and the idea is to be able to install the937# resulting libcrypto.so alongside generic one, e.g. as938# /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time939# linker to autodiscover. Unfortunately it doesn't work just940# yet, because of couple of bugs in glibc941# sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...942#943inherit_from => [ "linux-generic32" ],944cflags => add("-m31 -Wa,-mzarch"),945cxxflags => add("-m31 -Wa,-mzarch"),946lib_cppflags => add("-DB_ENDIAN"),947asm_arch => 's390x',948perlasm_scheme => "31",949multilib => "/highgprs",950},951952#### SPARC Linux setups953"linux-sparcv8" => {954inherit_from => [ "linux-latomic" ],955cflags => add("-mcpu=v8"),956cxxflags => add("-mcpu=v8"),957lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),958asm_arch => 'sparcv8',959perlasm_scheme => 'void',960},961"linux-sparcv9" => {962# it's a real mess with -mcpu=ultrasparc option under Linux,963# but -Wa,-Av8plus should do the trick no matter what.964inherit_from => [ "linux-latomic" ],965cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),966cxxflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),967lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),968asm_arch => 'sparcv9',969perlasm_scheme => 'void',970},971"linux64-sparcv9" => {972# GCC 3.1 is a requirement973inherit_from => [ "linux-generic64" ],974cflags => add("-m64 -mcpu=ultrasparc"),975cxxflags => add("-m64 -mcpu=ultrasparc"),976lib_cppflags => add("-DB_ENDIAN"),977ex_libs => add(threads("-latomic")),978bn_ops => "BN_LLONG RC4_CHAR",979asm_arch => 'sparcv9',980perlasm_scheme => 'void',981multilib => "64",982},983984"linux-alpha-gcc" => {985inherit_from => [ "linux-generic64" ],986lib_cppflags => add("-DL_ENDIAN"),987bn_ops => "SIXTY_FOUR_BIT_LONG",988asm_arch => 'alpha',989perlasm_scheme => "void",990},991"linux-c64xplus" => {992inherit_from => [ "BASE_unix" ],993# TI_CGT_C6000_7.3.x is a requirement994CC => "cl6x",995CFLAGS => "-o2 -ox -ms",996cflags => "--linux -ea=.s -eo=.o -mv6400+ -pden",997cxxflags => "--linux -ea=.s -eo=.o -mv6400+ -pden",998cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT",999threads("-D_REENTRANT")),1000bn_ops => "BN_LLONG",1001thread_scheme => "pthreads",1002asm_arch => 'c64xplus',1003perlasm_scheme => "void",1004dso_scheme => "dlfcn",1005shared_target => "linux-shared",1006shared_cflag => "--pic",1007shared_ldflag => add("-z --sysv --shared"),1008ranlib => "true",1009},10101011#### *BSD1012"BSD-generic32" => {1013# As for thread cflag. Idea is to maintain "collective" set of1014# flags, which would cover all BSD flavors. -pthread applies1015# to them all, but is treated differently. OpenBSD expands is1016# as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x1017# expands it as -lc_r, which has to be accompanied by explicit1018# -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x1019# expands it as -lc_r, which seems to be sufficient?1020inherit_from => [ "BASE_unix" ],1021CC => "cc",1022CFLAGS => picker(default => "-Wall",1023debug => "-O0 -g",1024release => "-O3"),1025cflags => threads("-pthread"),1026cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"),1027ex_libs => add(threads("-pthread")),1028enable => add("devcryptoeng"),1029bn_ops => "BN_LLONG",1030thread_scheme => "pthreads",1031dso_scheme => "dlfcn",1032shared_target => "bsd-gcc-shared",1033shared_cflag => "-fPIC",1034},1035"BSD-generic64" => {1036inherit_from => [ "BSD-generic32" ],1037bn_ops => "SIXTY_FOUR_BIT_LONG",1038},10391040"BSD-x86" => {1041inherit_from => [ "BSD-generic32" ],1042CFLAGS => add(picker(release => "-fomit-frame-pointer")),1043lib_cppflags => add("-DL_ENDIAN"),1044bn_ops => "BN_LLONG",1045asm_arch => 'x86',1046perlasm_scheme => "a.out",1047},1048"BSD-x86-elf" => {1049inherit_from => [ "BSD-x86" ],1050perlasm_scheme => "elf",1051},10521053"BSD-sparcv8" => {1054inherit_from => [ "BSD-generic32" ],1055cflags => add("-mcpu=v8"),1056lib_cppflags => add("-DB_ENDIAN"),1057asm_arch => 'sparcv8',1058perlasm_scheme => 'void',1059},1060"BSD-sparc64" => {1061# -DMD32_REG_T=int doesn't actually belong in sparc64 target, it1062# simply *happens* to work around a compiler bug in gcc 3.3.3,1063# triggered by RIPEMD160 code.1064inherit_from => [ "BSD-generic64" ],1065lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"),1066bn_ops => "BN_LLONG",1067asm_arch => 'sparcv9',1068perlasm_scheme => 'void',1069},10701071"BSD-ia64" => {1072inherit_from => [ "BSD-generic64" ],1073lib_cppflags => add("-DL_ENDIAN"),1074bn_ops => "SIXTY_FOUR_BIT_LONG",1075asm_arch => 'ia64',1076perlasm_scheme => 'void',1077},10781079"BSD-x86_64" => {1080inherit_from => [ "BSD-generic64" ],1081lib_cppflags => add("-DL_ENDIAN"),1082bn_ops => "SIXTY_FOUR_BIT_LONG",1083asm_arch => 'x86_64',1084perlasm_scheme => "elf",1085},10861087"BSD-aarch64" => {1088inherit_from => [ "BSD-generic64" ],1089lib_cppflags => add("-DL_ENDIAN"),1090bn_ops => "SIXTY_FOUR_BIT_LONG",1091asm_arch => 'aarch64',1092perlasm_scheme => "linux64",1093},10941095"BSD-ppc" => {1096inherit_from => [ "BSD-generic32" ],1097asm_arch => 'ppc32',1098perlasm_scheme => "linux32",1099lib_cppflags => add("-DB_ENDIAN"),1100},11011102"BSD-ppc64" => {1103inherit_from => [ "BSD-generic64" ],1104cflags => add("-m64"),1105cxxflags => add("-m64"),1106lib_cppflags => add("-DB_ENDIAN"),1107asm_arch => 'ppc64',1108perlasm_scheme => "linux64",1109},11101111"BSD-ppc64le" => {1112inherit_from => [ "BSD-generic64" ],1113cflags => add("-m64"),1114cxxflags => add("-m64"),1115lib_cppflags => add("-DL_ENDIAN"),1116asm_arch => 'ppc64',1117perlasm_scheme => "linux64le",1118},11191120# riscv below refers to contemporary RISCV Architecture1121# specifications,1122"BSD-riscv64" => {1123inherit_from => [ "BSD-generic64"],1124perlasm_scheme => "linux64",1125asm_arch => 'riscv64',1126},11271128"BSD-riscv32" => {1129inherit_from => [ "BSD-generic32"],1130perlasm_scheme => "linux32",1131asm_arch => 'riscv32',1132},11331134"BSD-armv4" => {1135################################################################1136# Note that -march is not among compiler options in linux-armv41137# target description. Not specifying one is intentional to give1138# you choice to:1139#1140# a) rely on your compiler default by not specifying one;1141# b) specify your target platform explicitly for optimal1142# performance, e.g. -march=armv6 or -march=armv7-a;1143# c) build "universal" binary that targets *range* of platforms1144# by specifying minimum and maximum supported architecture;1145#1146# As for c) option. It actually makes no sense to specify1147# maximum to be less than ARMv7, because it's the least1148# requirement for run-time switch between platform-specific1149# code paths. And without run-time switch performance would be1150# equivalent to one for minimum. Secondly, there are some1151# natural limitations that you'd have to accept and respect.1152# Most notably you can *not* build "universal" binary for1153# big-endian platform. This is because ARMv7 processor always1154# picks instructions in little-endian order. Another similar1155# limitation is that -mthumb can't "cross" -march=armv6t21156# boundary, because that's where it became Thumb-2. Well, this1157# limitation is a bit artificial, because it's not really1158# impossible, but it's deemed too tricky to support. And of1159# course you have to be sure that your binutils are actually1160# up to the task of handling maximum target platform. With all1161# this in mind here is an example of how to configure1162# "universal" build:1163#1164# ./Configure BSD-armv4 -march=armv6 -D__ARM_MAX_ARCH__=81165#1166inherit_from => [ "BSD-generic32" ],1167asm_arch => 'armv4',1168perlasm_scheme => "linux32",1169},11701171"bsdi-elf-gcc" => {1172inherit_from => [ "BASE_unix" ],1173CC => "gcc",1174CFLAGS => "-fomit-frame-pointer -O3 -Wall",1175lib_cppflags => "-DPERL5 -DL_ENDIAN",1176ex_libs => add("-ldl"),1177bn_ops => "BN_LLONG",1178asm_arch => 'x86',1179perlasm_scheme => "elf",1180thread_scheme => "(unknown)",1181dso_scheme => "dlfcn",1182shared_target => "bsd-gcc-shared",1183shared_cflag => "-fPIC",1184},1185#### *BSD-nodef1186"BSD-nodef-generic32" => {1187# As for thread cflag. Idea is to maintain "collective" set of1188# flags, which would cover all BSD flavors. -pthread applies1189# to them all, but is treated differently. OpenBSD expands is1190# as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x1191# expands it as -lc_r, which has to be accompanied by explicit1192# -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x1193# expands it as -lc_r, which seems to be sufficient?1194inherit_from => [ "BASE_unix" ],1195CC => "cc",1196CFLAGS => picker(default => "-Wall",1197debug => "-O0 -g",1198release => "-O3"),1199cflags => threads("-pthread"),1200cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"),1201ex_libs => add(threads("-pthread")),1202enable => add("devcryptoeng"),1203bn_ops => "BN_LLONG",1204thread_scheme => "pthreads",1205dso_scheme => "dlfcn",1206shared_target => "bsd-gcc-nodef-shared",1207shared_cflag => "-fPIC",1208},1209"BSD-nodef-generic64" => {1210inherit_from => [ "BSD-nodef-generic32" ],1211bn_ops => "SIXTY_FOUR_BIT_LONG",1212},12131214"BSD-nodef-x86" => {1215inherit_from => [ "BSD-nodef-generic32" ],1216CFLAGS => add(picker(release => "-fomit-frame-pointer")),1217lib_cppflags => add("-DL_ENDIAN"),1218bn_ops => "BN_LLONG",1219asm_arch => 'x86',1220perlasm_scheme => "a.out",1221},1222"BSD-nodef-x86-elf" => {1223inherit_from => [ "BSD-nodef-x86" ],1224perlasm_scheme => "elf",1225},12261227"BSD-nodef-sparcv8" => {1228inherit_from => [ "BSD-nodef-generic32" ],1229cflags => add("-mcpu=v8"),1230lib_cppflags => add("-DB_ENDIAN"),1231asm_arch => 'sparcv8',1232perlasm_scheme => 'void',1233},1234"BSD-nodef-sparc64" => {1235# -DMD32_REG_T=int doesn't actually belong in sparc64 target, it1236# simply *happens* to work around a compiler bug in gcc 3.3.3,1237# triggered by RIPEMD160 code.1238inherit_from => [ "BSD-nodef-generic64" ],1239lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"),1240bn_ops => "BN_LLONG",1241asm_arch => 'sparcv9',1242perlasm_scheme => 'void',1243},12441245"BSD-nodef-ia64" => {1246inherit_from => [ "BSD-nodef-generic64" ],1247lib_cppflags => add("-DL_ENDIAN"),1248bn_ops => "SIXTY_FOUR_BIT_LONG",1249asm_arch => 'ia64',1250perlasm_scheme => 'void',1251},12521253"BSD-nodef-x86_64" => {1254inherit_from => [ "BSD-nodef-generic64" ],1255lib_cppflags => add("-DL_ENDIAN"),1256bn_ops => "SIXTY_FOUR_BIT_LONG",1257asm_arch => 'x86_64',1258perlasm_scheme => "elf",1259},12601261#### SCO/Caldera targets.1262#1263# Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.1264# Now we only have blended unixware-* as it's the only one used by ./config.1265# If you want to optimize for particular microarchitecture, bypass ./config1266# and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.1267# Note that not all targets include assembler support. Mostly because of1268# lack of motivation to support out-of-date platforms with out-of-date1269# compiler drivers and assemblers.1270#1271# UnixWare 2.0x fails destest with -O.1272"unixware-2.0" => {1273inherit_from => [ "BASE_unix" ],1274CC => "cc",1275cflags => threads("-Kthread"),1276lib_cppflags => "-DFILIO_H -DNO_STRINGS_H",1277ex_libs => add("-lsocket -lnsl -lresolv -lx"),1278thread_scheme => "uithreads",1279},1280"unixware-2.1" => {1281inherit_from => [ "BASE_unix" ],1282CC => "cc",1283CFLAGS => "-O",1284cflags => threads("-Kthread"),1285lib_cppflags => "-DFILIO_H",1286ex_libs => add("-lsocket -lnsl -lresolv -lx"),1287thread_scheme => "uithreads",1288},1289"unixware-7" => {1290inherit_from => [ "BASE_unix" ],1291CC => "cc",1292CFLAGS => "-O",1293cflags => combine("-Kalloca", threads("-Kthread")),1294lib_cppflags => "-DFILIO_H",1295ex_libs => add("-lsocket -lnsl"),1296thread_scheme => "uithreads",1297bn_ops => "BN_LLONG",1298asm_arch => 'x86',1299perlasm_scheme => "elf-1",1300dso_scheme => "dlfcn",1301shared_target => "svr5-shared",1302shared_cflag => "-Kpic",1303},1304"unixware-7-gcc" => {1305inherit_from => [ "BASE_unix" ],1306CC => "gcc",1307CFLAGS => "-O3 -fomit-frame-pointer -Wall",1308cppflags => add(threads("-D_REENTRANT")),1309lib_cppflags => add("-DL_ENDIAN -DFILIO_H"),1310ex_libs => add("-lsocket -lnsl"),1311bn_ops => "BN_LLONG",1312thread_scheme => "pthreads",1313asm_arch => 'x86',1314perlasm_scheme => "elf-1",1315dso_scheme => "dlfcn",1316shared_target => "gnu-shared",1317shared_cflag => "-fPIC",1318},1319# SCO 5 - Ben Laurie says the -O breaks the SCO cc.1320"sco5-cc" => {1321inherit_from => [ "BASE_unix" ],1322cc => "cc",1323cflags => "-belf",1324ex_libs => add("-lsocket -lnsl"),1325thread_scheme => "(unknown)",1326asm_arch => 'x86',1327perlasm_scheme => "elf-1",1328dso_scheme => "dlfcn",1329shared_target => "svr3-shared",1330shared_cflag => "-Kpic",1331},1332"sco5-gcc" => {1333inherit_from => [ "BASE_unix" ],1334cc => "gcc",1335cflags => "-O3 -fomit-frame-pointer",1336ex_libs => add("-lsocket -lnsl"),1337bn_ops => "BN_LLONG",1338thread_scheme => "(unknown)",1339asm_arch => 'x86',1340perlasm_scheme => "elf-1",1341dso_scheme => "dlfcn",1342shared_target => "svr3-shared",1343shared_cflag => "-fPIC",1344},13451346#### IBM's AIX.1347# Below targets assume AIX >=5. Caveat lector. If you are accustomed1348# to control compilation "bitness" by setting $OBJECT_MODE environment1349# variable, then you should know that in OpenSSL case it's considered1350# only in ./config. Once configured, build procedure remains "deaf" to1351# current value of $OBJECT_MODE.1352"aix-common" => {1353inherit_from => [ "BASE_unix" ],1354template => 1,1355sys_id => "AIX",1356lib_cppflags => "-DB_ENDIAN",1357lflags => "-Wl,-bsvr4",1358thread_scheme => "pthreads",1359dso_scheme => "dlfcn",1360shared_target => "aix",1361module_ldflags => "-Wl,-G,-bsymbolic,-bnoentry",1362shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry",1363shared_defflag => "-Wl,-bE:",1364shared_fipsflag => "-Wl,-binitfini:_init:_cleanup",1365perl_platform => 'AIX',1366},1367"aix-gcc" => {1368inherit_from => [ "aix-common" ],1369CC => "gcc",1370CFLAGS => picker(debug => "-O0 -g",1371release => "-O"),1372cflags => add(threads("-pthread")),1373ex_libs => add(threads("-pthread")),1374bn_ops => "BN_LLONG RC4_CHAR",1375asm_arch => 'ppc32',1376perlasm_scheme => "aix32",1377shared_ldflag => add_before("-shared -static-libgcc"),1378AR => add("-X32"),1379RANLIB => add("-X32"),1380},1381"aix64-gcc" => {1382inherit_from => [ "aix-common" ],1383CC => "gcc",1384CFLAGS => picker(debug => "-O0 -g",1385release => "-O"),1386cflags => combine("-maix64", threads("-pthread")),1387ex_libs => add(threads("-pthread")),1388bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",1389asm_arch => 'ppc64',1390perlasm_scheme => "aix64",1391shared_ldflag => add_before("-shared -static-libgcc"),1392shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",1393AR => add("-X64"),1394RANLIB => add("-X64"),1395},1396"aix64-gcc-as" => {1397inherit_from => [ "aix64-gcc" ],1398perlasm_scheme => "aix64-as",1399},1400"aix-cc" => {1401inherit_from => [ "aix-common" ],1402CC => "cc",1403CFLAGS => picker(debug => "-O0 -g",1404release => "-O"),1405cflags => combine("-q32 -qmaxmem=16384 -qro -qroconst",1406threads("-qthreaded")),1407cppflags => threads("-D_THREAD_SAFE"),1408ex_libs => add(threads("-lpthreads")),1409bn_ops => "BN_LLONG RC4_CHAR",1410asm_arch => 'ppc32',1411perlasm_scheme => "aix32",1412shared_cflag => "-qpic",1413AR => add("-X32"),1414RANLIB => add("-X32"),1415},1416# To enable openxl compiler for aix1417# If 17.1 openxl runtime is available, -latomic can be used1418# instead of -DBROKEN_CLANG_ATOMICS1419"aix-clang" => {1420inherit_from => [ "aix-common" ],1421CC => "ibm-clang",1422CFLAGS => picker(debug => "-O0 -g",1423release => "-O"),1424cflags => combine("-Wno-implicit-function-declaration -mcmodel=large -DBROKEN_CLANG_ATOMICS",1425threads("-pthread")),1426ex_libs => add(threads("-pthread")),1427bn_ops => "BN_LLONG RC4_CHAR",1428asm_arch => 'ppc32',1429perlasm_scheme => "aix32",1430shared_cflag => "-fpic",1431shared_ldflag => add("-shared"),1432AR => add("-X32"),1433RANLIB => add("-X32"),1434},1435# shared_target of "aix-solib" builds shared libraries packaged1436# without archives. This improves the behavior of inter-library1437# references (libssl depending on libcrypto) when building with1438# shlib_variant.1439# You'll get: libxxx.so (import library, used when linking applications)1440# libxxx.so.ver (shared object)1441# libxxx.a (static library archive)1442# and for runtime, you only need libxxx.so.ver. libxxx.so and libxxx.a1443# can be installed along with include files to make an SDK1444"aix-cc-solib" => {1445inherit_from => [ "aix-cc" ],1446shared_target => "aix-solib",1447},1448"aix64-cc" => {1449inherit_from => [ "aix-common" ],1450CC => "cc",1451CFLAGS => picker(debug => "-O0 -g",1452release => "-O"),1453cflags => combine("-q64 -qmaxmem=16384 -qro -qroconst",1454threads("-qthreaded")),1455cppflags => threads("-D_THREAD_SAFE"),1456ex_libs => add(threads("-lpthreads")),1457bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",1458asm_arch => 'ppc64',1459perlasm_scheme => "aix64",1460dso_scheme => "dlfcn",1461shared_cflag => "-qpic",1462shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",1463AR => add("-X64"),1464RANLIB => add("-X64"),1465},1466"aix64-clang" => {1467inherit_from => [ "aix-common" ],1468CC => "ibm-clang",1469CFLAGS => picker(debug => "-O0 -g",1470release => "-O"),1471cflags => combine("-maix64 -Wno-implicit-function-declaration -mcmodel=large",1472threads("-pthread")),1473ex_libs => add(threads("-pthread")),1474bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",1475asm_arch => 'ppc64',1476perlasm_scheme => "aix64",1477shared_cflag => "-fpic",1478shared_ldflag => add("-shared"),1479shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",1480AR => add("-X64"),1481RANLIB => add("-X64"),1482},1483"aix64-cc-solib" => {1484inherit_from => [ "aix64-cc" ],1485shared_target => "aix-solib",1486},14871488# SIEMENS BS2000/OSD: an EBCDIC-based mainframe1489"BS2000-OSD" => {1490inherit_from => [ "BASE_unix" ],1491CC => "c89",1492CFLAGS => "-O",1493cflags => "-XLLML -XLLMK -XL",1494cppflags => "-DCHARSET_EBCDIC",1495lib_cppflags => "-DB_ENDIAN",1496ex_libs => add("-lsocket -lnsl"),1497bn_ops => "THIRTY_TWO_BIT RC4_CHAR",1498thread_scheme => "(unknown)",1499},15001501#### Visual C targets1502#1503# Win64 targets, WIN64I denotes IA-64/Itanium and WIN64A - AMD641504#1505# Note about /wd4090, disable warning C4090. This warning returns false1506# positives in some situations. Disabling it altogether masks both1507# legitimate and false cases, but as we compile on multiple platforms,1508# we rely on other compilers to catch legitimate cases.1509#1510# Also note that we force threads no matter what. Configuring "no-threads"1511# is ignored.1512#1513# UNICODE is defined in VC-common and applies to all targets. It used to1514# be an opt-in option for VC-WIN32, but not anymore. The original reason1515# was because ANSI API was *native* system interface for no longer1516# supported Windows 9x. Keep in mind that UNICODE only affects how1517# OpenSSL libraries interact with underlying OS, it doesn't affect API1518# that OpenSSL presents to application.15191520"VC-common" => {1521inherit_from => [ "BASE_Windows" ],1522template => 1,1523CC => "cl",1524CPP => '$(CC) /EP /C',1525CFLAGS => "/W3 /wd4090 /nologo",1526coutflag => "/Fo",1527LD => "link",1528LDFLAGS => "/nologo /debug",1529ldoutflag => "/out:",1530ldpostoutflag => "",1531ld_resp_delim => "\n",1532bin_lflags => "setargv.obj",1533makedepcmd => '$(CC) /Zs /showIncludes',1534makedep_scheme => 'VC',1535AR => "lib",1536ARFLAGS => "/nologo",1537aroutflag => "/out:",1538ar_resp_delim => "\n",1539RC => "rc",1540rcoutflag => "/fo",1541defines => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN",1542"UNICODE", "_UNICODE",1543"_CRT_SECURE_NO_DEPRECATE",1544"_WINSOCK_DEPRECATED_NO_WARNINGS"),1545lib_cflags => add("/Zi /Fdossl_static.pdb"),1546lib_defines => add("L_ENDIAN"),1547dso_cflags => "/Zi /Fddso.pdb",1548bin_cflags => "/Zi /Fdapp.pdb",1549# def_flag made to empty string so a .def file gets generated1550shared_defflag => '',1551shared_ldflag => "/dll",1552shared_target => "win-shared", # meaningless except it gives Configure a hint1553lddefflag => "/def:",1554ldresflag => " ",1555ld_implib_flag => "/implib:",1556thread_scheme => "winthreads",1557dso_scheme => "win32",1558perl_platform => 'Windows::MSVC',1559# additional parameter to build_scheme denotes install-path "flavour"1560build_scheme => add("VC-common", { separator => undef }),1561},1562"VC-noCE-common" => {1563inherit_from => [ "VC-common" ],1564template => 1,1565CFLAGS => add(picker(debug => '/Od',1566release => '/O2')),1567cflags => add(picker(default => '/Gs0 /GF /Gy',1568debug =>1569sub {1570($disabled{shared} ? "" : "/MDd");1571},1572release =>1573sub {1574($disabled{shared} ? "" : "/MD");1575})),1576defines => add(picker(default => [], # works as type cast1577debug => [ "DEBUG", "_DEBUG" ])),1578lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),1579# Following might/should appears controversial, i.e. defining1580# /MDd without evaluating $disabled{shared}. It works in1581# non-shared build because static library is compiled with /Zl1582# and bares no reference to specific RTL. And it works in1583# shared build because multiple /MDd options are not prohibited.1584# But why /MDd in static build? Well, basically this is just a1585# reference point, which allows to catch eventual errors that1586# would prevent those who want to wrap OpenSSL into own .DLL.1587# Why not /MD in release build then? Well, some are likely to1588# prefer [non-debug] openssl.exe to be free from Micorosoft RTL1589# redistributable.1590bin_cflags => add(picker(debug => "/MDd",1591release => sub { $disabled{shared} ? "/MT" : () },1592)),1593bin_lflags => add("/subsystem:console /opt:ref"),1594ex_libs => add(sub {1595my @ex_libs = ();1596push @ex_libs, 'ws2_32.lib' unless $disabled{sock};1597push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';1598return join(" ", @ex_libs);1599}),1600},1601"VC-WIN64-common" => {1602inherit_from => [ "VC-noCE-common" ],1603template => 1,1604ex_libs => add(sub {1605my @ex_libs = ();1606push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);1607return join(" ", @_, @ex_libs);1608}),1609bn_ops => add("SIXTY_FOUR_BIT"),1610},1611"VC-WIN64I" => {1612inherit_from => [ "VC-WIN64-common" ],1613AS => "ias",1614ASFLAGS => "-d debug",1615asoutflag => "-o ",1616sys_id => "WIN64I",1617uplink_arch => 'ia64',1618asm_arch => 'ia64',1619perlasm_scheme => "ias",1620multilib => "-ia64",1621},1622"VC-WIN64A" => {1623inherit_from => [ "VC-WIN64-common" ],1624AS => sub { vc_win64a_info()->{AS} },1625ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} },1626asoutflag => sub { vc_win64a_info()->{asoutflag} },1627asflags => sub { vc_win64a_info()->{asflags} },1628sys_id => "WIN64A",1629uplink_arch => 'x86_64',1630asm_arch => 'x86_64',1631perlasm_scheme => sub { vc_win64a_info()->{perlasm_scheme} },1632multilib => "-x64",1633},1634"VC-WIN32" => {1635inherit_from => [ "VC-noCE-common" ],1636AS => sub { vc_win32_info()->{AS} },1637ASFLAGS => sub { vc_win32_info()->{ASFLAGS} },1638asoutflag => sub { vc_win32_info()->{asoutflag} },1639asflags => sub { vc_win32_info()->{asflags} },1640sys_id => "WIN32",1641bn_ops => add("BN_LLONG"),1642uplink_arch => 'common',1643asm_arch => 'x86',1644perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },1645# "WOW" stands for "Windows on Windows", and "VC-WOW" engages1646# some installation path heuristics in windows-makefile.tmpl...1647build_scheme => add("VC-WOW", { separator => undef }),1648},1649"VC-CE" => {1650inherit_from => [ "VC-common" ],1651CFLAGS => add(picker(debug => "/Od",1652release => "/O1i")),1653CPPDEFINES => picker(debug => [ "DEBUG", "_DEBUG" ]),1654LDFLAGS => add("/nologo /opt:ref"),1655cflags =>1656combine('/GF /Gy',1657sub { vc_wince_info()->{cflags}; },1658sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=141659? ($disabled{shared} ? " /MT" : " /MD")1660: " /MC"; }),1661cppflags => sub { vc_wince_info()->{cppflags}; },1662lib_defines => add("NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT"),1663lib_cppflags => sub { vc_wince_info()->{cppflags}; },1664includes =>1665add(combine(sub { defined(env('WCECOMPAT'))1666? '$(WCECOMPAT)/include' : (); },1667sub { defined(env('PORTSDK_LIBPATH'))1668? '$(PORTSDK_LIBPATH)/../../include'1669: (); })),1670lflags => add(combine(sub { vc_wince_info()->{lflags}; },1671sub { defined(env('PORTSDK_LIBPATH'))1672? "/entry:mainCRTstartup" : (); })),1673sys_id => "WINCE",1674bn_ops => add("BN_LLONG"),1675ex_libs => add(sub {1676my @ex_libs = ();1677push @ex_libs, 'ws2.lib' unless $disabled{sock};1678push @ex_libs, 'crypt32.lib';1679if (defined(env('WCECOMPAT'))) {1680my $x = '$(WCECOMPAT)/lib';1681if (-f "$x/env('TARGETCPU')/wcecompatex.lib") {1682$x .= '/$(TARGETCPU)/wcecompatex.lib';1683} else {1684$x .= '/wcecompatex.lib';1685}1686push @ex_libs, $x;1687}1688push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'1689if (defined(env('PORTSDK_LIBPATH')));1690push @ex_libs, '/nodefaultlib coredll.lib corelibc.lib'1691if (env('TARGETCPU') =~ /^X86|^ARMV4[IT]/);1692return join(" ", @ex_libs);1693}),1694},16951696#### MinGW1697"mingw-common" => {1698inherit_from => [ 'BASE_unix' ],1699template => 1,1700CC => "gcc",1701CFLAGS => picker(default => "-Wall",1702debug => "-g -O0",1703release => "-O3"),1704cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN",1705threads("-D_MT")),1706lib_cppflags => "-DL_ENDIAN",1707ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),1708thread_scheme => "winthreads",1709dso_scheme => "win32",1710shared_target => "mingw-shared",1711shared_cppflags => add("_WINDLL"),1712shared_ldflag => "-static-libgcc",17131714perl_platform => 'mingw',1715},1716"mingw" => {1717inherit_from => [ "mingw-common" ],1718CFLAGS => add(picker(release => "-fomit-frame-pointer")),1719cflags => "-m32",1720sys_id => "MINGW32",1721bn_ops => add("BN_LLONG"),1722asm_arch => 'x86',1723uplink_arch => 'x86',1724perlasm_scheme => "coff",1725shared_rcflag => "--target=pe-i386",1726multilib => "",1727},1728"mingw64" => {1729# As for uplink_arch. Applink makes it possible to use1730# .dll compiled with one compiler with application compiled with1731# another compiler. It's possible to engage Applink support in1732# mingw64 build, but it's not done, because until mingw641733# supports structured exception handling, one can't seriously1734# consider its binaries for using with non-mingw64 run-time1735# environment. And as mingw64 is always consistent with itself,1736# Applink is never engaged and can as well be omitted.1737inherit_from => [ "mingw-common" ],1738cflags => "-m64",1739sys_id => "MINGW64",1740bn_ops => add("SIXTY_FOUR_BIT"),1741asm_arch => 'x86_64',1742uplink_arch => undef,1743perlasm_scheme => "mingw64",1744shared_rcflag => "--target=pe-x86-64",1745multilib => "64",1746},17471748#### UEFI1749"UEFI" => {1750inherit_from => [ "BASE_unix" ],1751CC => "cc",1752CFLAGS => "-O",1753lib_cppflags => "-DL_ENDIAN",1754sys_id => "UEFI",1755},1756"UEFI-x86" => {1757inherit_from => [ "UEFI" ],1758asm_arch => 'x86',1759perlasm_scheme => "win32n",1760},1761"UEFI-x86_64" => {1762inherit_from => [ "UEFI" ],1763asm_arch => 'x86_64',1764perlasm_scheme => "nasm",1765},17661767#### UWIN1768"UWIN" => {1769inherit_from => [ "BASE_unix" ],1770CC => "cc",1771CFLAGS => "-O -Wall",1772lib_cppflags => "-DTERMIOS -DL_ENDIAN",1773sys_id => "UWIN",1774bn_ops => "BN_LLONG",1775dso_scheme => "win32",1776},17771778#### Cygwin1779"Cygwin-common" => {1780inherit_from => [ "BASE_unix" ],1781template => 1,17821783CC => "gcc",1784CFLAGS => picker(default => "-Wall",1785debug => "-g -O0",1786release => "-O3"),1787ex_libs => add("-lcrypt32"),1788lib_cppflags => "-DTERMIOS -DL_ENDIAN",1789sys_id => "CYGWIN",1790thread_scheme => "pthread",1791dso_scheme => "dlfcn",1792shared_target => "cygwin-shared",1793shared_cppflags => "-D_WINDLL",17941795perl_platform => 'Cygwin',1796},1797"Cygwin-x86" => {1798inherit_from => [ "Cygwin-common" ],1799CFLAGS => add(picker(release => "-O3 -fomit-frame-pointer")),1800bn_ops => "BN_LLONG",1801asm_arch => 'x86',1802perlasm_scheme => "coff",1803},1804"Cygwin-x86_64" => {1805inherit_from => [ "Cygwin-common" ],1806CC => "gcc",1807bn_ops => "SIXTY_FOUR_BIT_LONG",1808asm_arch => 'x86_64',1809perlasm_scheme => "mingw64",1810},1811# Backward compatibility for those using this target1812"Cygwin" => {1813inherit_from => [ "Cygwin-x86" ]1814},1815# In case someone constructs the Cygwin target name themself1816"Cygwin-i386" => {1817inherit_from => [ "Cygwin-x86" ]1818},1819"Cygwin-i486" => {1820inherit_from => [ "Cygwin-x86" ]1821},1822"Cygwin-i586" => {1823inherit_from => [ "Cygwin-x86" ]1824},1825"Cygwin-i686" => {1826inherit_from => [ "Cygwin-x86" ]1827},18281829##### MacOS X (a.k.a. Darwin) setup1830"darwin-common" => {1831inherit_from => [ "BASE_unix" ],1832template => 1,1833CC => "cc",1834CFLAGS => picker(debug => "-g -O0",1835release => "-O3"),1836cppflags => threads("-D_REENTRANT"),1837lflags => add("-Wl,-search_paths_first"),1838sys_id => "MACOSX",1839bn_ops => "BN_LLONG RC4_CHAR",1840thread_scheme => "pthreads",1841perlasm_scheme => "osx32",1842dso_scheme => "dlfcn",1843ranlib => "ranlib -c",1844shared_target => "darwin-shared",1845shared_cflag => "-fPIC",1846shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib",1847},1848# Option "freeze" such as -std=gnu9x can't negatively interfere1849# with future defaults for below two targets, because MacOS X1850# for PPC has no future, it was discontinued by vendor in 2009.1851"darwin-ppc-cc" => { inherit_from => [ "darwin-ppc" ] }, # Historic alias1852"darwin-ppc" => {1853inherit_from => [ "darwin-common" ],1854cflags => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"),1855lib_cppflags => add("-DB_ENDIAN"),1856shared_cflag => add("-fno-common"),1857asm_arch => 'ppc32',1858perlasm_scheme => "osx32",1859},1860"darwin64-ppc-cc" => { inherit_from => [ "darwin64-ppc" ] }, # Historic alias1861"darwin64-ppc" => {1862inherit_from => [ "darwin-common" ],1863cflags => add("-arch ppc64 -std=gnu9x"),1864lib_cppflags => add("-DB_ENDIAN"),1865bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",1866asm_arch => 'ppc64',1867perlasm_scheme => "osx64",1868},1869"darwin-i386-cc" => { inherit_from => [ "darwin-i386" ] }, # Historic alias1870"darwin-i386" => {1871inherit_from => [ "darwin-common" ],1872CFLAGS => add(picker(release => "-fomit-frame-pointer")),1873cflags => add("-arch i386"),1874lib_cppflags => add("-DL_ENDIAN"),1875bn_ops => "BN_LLONG RC4_INT",1876asm_arch => 'x86',1877perlasm_scheme => "macosx",1878},1879"darwin64-x86_64-cc" => { inherit_from => [ "darwin64-x86_64" ] }, # Historic alias1880"darwin64-x86_64" => {1881inherit_from => [ "darwin-common" ],1882CFLAGS => add("-Wall"),1883cflags => add("-arch x86_64"),1884lib_cppflags => add("-DL_ENDIAN"),1885bn_ops => "SIXTY_FOUR_BIT_LONG",1886asm_arch => 'x86_64',1887perlasm_scheme => "macosx",1888},1889"darwin64-arm64-cc" => { inherit_from => [ "darwin64-arm64" ] }, # "Historic" alias1890"darwin64-arm64" => {1891inherit_from => [ "darwin-common" ],1892CFLAGS => add("-Wall"),1893cflags => add("-arch arm64"),1894lib_cppflags => add("-DL_ENDIAN"),1895bn_ops => "SIXTY_FOUR_BIT_LONG",1896asm_arch => 'aarch64',1897perlasm_scheme => "ios64",1898},18991900##### GNU Hurd1901"hurd-generic32" => {1902inherit_from => [ "BASE_unix" ],1903CC => "gcc",1904CXX => "g++",1905CFLAGS => picker(default => "-Wall",1906debug => "-O0 -g",1907release => "-O3"),1908CXXFLAGS => picker(default => "-Wall",1909debug => "-O0 -g",1910release => "-O3"),1911cflags => threads("-pthread"),1912cxxflags => combine("-std=c++11", threads("-pthread")),1913ex_libs => add("-ldl", threads("-pthread")),1914bn_ops => "BN_LLONG RC4_CHAR",1915thread_scheme => "pthreads",1916dso_scheme => "dlfcn",1917shared_target => "linux-shared",1918shared_cflag => "-fPIC",1919shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },1920},19211922"hurd-generic64" => {1923inherit_from => [ "hurd-generic32" ],1924bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",1925},19261927#### X86 / X86_64 targets1928"hurd-x86" => {1929inherit_from => [ "hurd-generic32" ],1930CFLAGS => add(picker(release => "-fomit-frame-pointer")),1931cflags => add("-m32"),1932cxxflags => add("-m32"),1933lib_cppflags => add("-DL_ENDIAN"),1934bn_ops => "BN_LLONG",1935asm_arch => 'x86',1936perlasm_scheme => 'elf',1937},19381939"hurd-x86_64" => {1940inherit_from => [ "hurd-generic64" ],1941cflags => add("-m64"),1942cxxflags => add("-m64"),1943lib_cppflags => add("-DL_ENDIAN"),1944bn_ops => "SIXTY_FOUR_BIT_LONG",1945asm_arch => 'x86_64',1946perlasm_scheme => 'elf',1947multilib => "64",1948},19491950##### VxWorks for various targets1951"vxworks-ppc60x" => {1952inherit_from => [ "BASE_unix" ],1953CC => "ccppc",1954CFLAGS => "-O2 -Wall -fstrength-reduce",1955cflags => "-mrtp -mhard-float -mstrict-align -fno-implicit-fp -fno-builtin -fno-strict-aliasing",1956cppflags => combine("-D_REENTRANT -DPPC32_fp60x -DCPU=PPC32",1957"_DTOOL_FAMILY=gnu -DTOOL=gnu",1958"-I\$(WIND_BASE)/target/usr/h",1959"-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),1960sys_id => "VXWORKS",1961lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),1962ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),1963},1964"vxworks-ppcgen" => {1965inherit_from => [ "BASE_unix" ],1966CC => "ccppc",1967CFLAGS => "-O1 -Wall",1968cflags => "-mrtp -msoft-float -mstrict-align -fno-builtin -fno-strict-aliasing",1969cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC32",1970"-DTOOL_FAMILY=gnu -DTOOL=gnu",1971"-I\$(WIND_BASE)/target/usr/h",1972"-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),1973sys_id => "VXWORKS",1974lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),1975ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),1976},1977"vxworks-ppc405" => {1978inherit_from => [ "BASE_unix" ],1979CC => "ccppc",1980CFLAGS => "-g",1981cflags => "-msoft-float -mlongcall",1982cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC405",1983"-DTOOL_FAMILY=gnu -DTOOL=gnu",1984"-I\$(WIND_BASE)/target/h"),1985sys_id => "VXWORKS",1986lflags => add("-r"),1987},1988"vxworks-ppc750" => {1989inherit_from => [ "BASE_unix" ],1990CC => "ccppc",1991CFLAGS => "-ansi -fvolatile -Wall \$(DEBUG_FLAG)",1992cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",1993cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",1994"-I\$(WIND_BASE)/target/h"),1995sys_id => "VXWORKS",1996lflags => add("-r"),1997},1998"vxworks-ppc750-debug" => {1999inherit_from => [ "BASE_unix" ],2000CC => "ccppc",2001CFLAGS => "-ansi -fvolatile -Wall -g",2002cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",2003cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",2004"-DPEDANTIC -DDEBUG",2005"-I\$(WIND_BASE)/target/h"),2006sys_id => "VXWORKS",2007lflags => add("-r"),2008},2009"vxworks-ppc860" => {2010inherit_from => [ "BASE_unix" ],2011CC => "ccppc",2012cflags => "-nostdinc -msoft-float",2013cppflags => combine("-DCPU=PPC860 -DNO_STRINGS_H",2014"-I\$(WIND_BASE)/target/h"),2015sys_id => "VXWORKS",2016lflags => add("-r"),2017},2018"vxworks-simlinux" => {2019inherit_from => [ "BASE_unix" ],2020CC => "ccpentium",2021cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -fno-builtin -fno-defer-pop",2022cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",2023"-DL_ENDIAN -DCPU=SIMLINUX -DNO_STRINGS_H",2024"-DTOOL_FAMILY=gnu -DTOOL=gnu",2025"-DOPENSSL_NO_HW_PADLOCK",2026"-I\$(WIND_BASE)/target/h",2027"-I\$(WIND_BASE)/target/h/wrn/coreip"),2028sys_id => "VXWORKS",2029lflags => add("-r"),2030ranlib => "ranlibpentium",2031},2032"vxworks-mips" => {2033inherit_from => [ "BASE_unix" ],2034CC => "ccmips",2035CFLAGS => "-O -G 0",2036cflags => "-mrtp -mips2 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -msoft-float -mno-branch-likely -fno-builtin -fno-defer-pop",2037cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",2038"-DCPU=MIPS32 -DNO_STRINGS_H",2039"-DTOOL_FAMILY=gnu -DTOOL=gnu",2040"-DOPENSSL_NO_HW_PADLOCK",2041threads("-D_REENTRANT"),2042"-I\$(WIND_BASE)/target/h",2043"-I\$(WIND_BASE)/target/h/wrn/coreip"),2044sys_id => "VXWORKS",2045lflags => add("-L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),2046ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),2047thread_scheme => "pthreads",2048asm_arch => 'mips32',2049perlasm_scheme => "o32",2050ranlib => "ranlibmips",2051},20522053#### uClinux2054"uClinux-dist" => {2055inherit_from => [ "BASE_unix" ],2056CC => sub { env('CC') },2057cppflags => threads("-D_REENTRANT"),2058ex_libs => add("\$(LDLIBS)"),2059bn_ops => "BN_LLONG",2060thread_scheme => "pthreads",2061dso_scheme => sub { env('LIBSSL_dlfcn') },2062shared_target => "linux-shared",2063shared_cflag => "-fPIC",2064ranlib => sub { env('RANLIB') },2065},2066"uClinux-dist64" => {2067inherit_from => [ "BASE_unix" ],2068CC => sub { env('CC') },2069cppflags => threads("-D_REENTRANT"),2070ex_libs => add("\$(LDLIBS)"),2071bn_ops => "SIXTY_FOUR_BIT_LONG",2072thread_scheme => "pthreads",2073dso_scheme => sub { env('LIBSSL_dlfcn') },2074shared_target => "linux-shared",2075shared_cflag => "-fPIC",2076ranlib => sub { env('RANLIB') },2077},20782079##### VMS2080# Most things happen in vms-generic.2081# Note that vms_info extracts the pointer size from the end of2082# the target name, and will assume that anything matching /-p\d+$/2083# indicates the pointer size setting for the desired target.2084"vms-generic" => {2085inherit_from => [ "BASE_VMS" ],2086template => 1,2087CC => "CC/DECC",2088CPP => '$(CC)/PREPROCESS_ONLY=SYS$OUTPUT:',2089CFLAGS =>2090combine(picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL",2091debug => "/NOOPTIMIZE/DEBUG",2092release => "/OPTIMIZE/NODEBUG"),2093sub { my @warnings =2094@{vms_info()->{disable_warns}};2095@warnings2096? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),2097cflag_incfirst => '/FIRST_INCLUDE=',2098lib_defines =>2099add("OPENSSL_USE_NODELETE",2100"_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED=1",2101sub {2102return vms_info()->{def_zlib}2103? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();2104}),2105lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'",2106debug => "/DEBUG/TRACEBACK",2107release => "/NODEBUG/NOTRACEBACK"),2108# Because of dso_cflags below, we can't set the generic |cflags| here,2109# as it can't be overridden, so we set separate C flags for libraries2110# and binaries instead.2111bin_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),2112lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),2113# Strictly speaking, DSOs should not need to have name shortening,2114# as all their exported symbols should be short enough to fit the2115# linker's 31 character per symbol name limit. However, providers2116# may be composed of more than one object file, and internal symbols2117# may and do surpass the 31 character limit.2118dso_cflags => add("/NAMES=(SHORTENED)"),2119ex_libs => add(sub { return vms_info()->{zlib} || (); }),2120shared_target => "vms-shared",2121# def_flag made to empty string so a .opt file gets generated2122shared_defflag => '',2123dso_scheme => "vms",2124thread_scheme => "pthreads",21252126makedep_scheme => 'VMS C',2127AS => sub { vms_info()->{AS} },2128ASFLAGS => sub { vms_info()->{ASFLAGS} },2129asoutflag => sub { vms_info()->{asoutflag} },2130asflags => sub { vms_info()->{asflags} },2131perlasm_scheme => sub { vms_info()->{perlasm_scheme} },21322133disable => add('pinshared', 'loadereng'),21342135},21362137# From HELP CC/POINTER_SIZE:2138#2139# ----------2140# LONG[=ARGV] The compiler assumes 64-bit pointers. If the ARGV option to2141# LONG or 64 is present, the main argument argv will be an2142# array of long pointers instead of an array of short pointers.2143#2144# 64[=ARGV] Same as LONG.2145# ----------2146#2147# We don't want the hassle of dealing with 32-bit pointers with argv, so2148# we force it to have 64-bit pointers, see the added cflags in the -p642149# config targets below.21502151"vms-alpha" => {2152inherit_from => [ "vms-generic" ],2153bn_ops => "SIXTY_FOUR_BIT RC4_INT",2154pointer_size => "",2155},2156"vms-alpha-p32" => {2157inherit_from => [ "vms-alpha" ],2158cflags => add("/POINTER_SIZE=32"),2159pointer_size => "32",2160},2161"vms-alpha-p64" => {2162inherit_from => [ "vms-alpha" ],2163cflags => add("/POINTER_SIZE=64=ARGV"),2164pointer_size => "64",2165},2166"vms-ia64" => {2167inherit_from => [ "vms-generic" ],2168bn_ops => "SIXTY_FOUR_BIT RC4_INT",2169asm_arch => sub { vms_info()->{AS} ? 'ia64' : undef },2170perlasm_scheme => 'ias',2171pointer_size => "",21722173},2174"vms-ia64-p32" => {2175inherit_from => [ "vms-ia64" ],2176cflags => add("/POINTER_SIZE=32"),2177pointer_size => "32",2178},2179"vms-ia64-p64" => {2180inherit_from => [ "vms-ia64" ],2181cflags => add("/POINTER_SIZE=64=ARGV"),2182pointer_size => "64",2183},2184"vms-x86_64" => {2185inherit_from => [ "vms-generic" ],2186bn_ops => "SIXTY_FOUR_BIT",2187pointer_size => "",2188},2189"vms-x86_64-p32" => {2190inherit_from => [ "vms-x86_64" ],2191cflags => add("/POINTER_SIZE=32"),2192pointer_size => "32",2193},2194"vms-x86_64-p64" => {2195inherit_from => [ "vms-x86_64" ],2196cflags => add("/POINTER_SIZE=64=ARGV"),2197pointer_size => "64",2198}2199);220022012202