10-main.conf 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015
  1. ## -*- mode: perl; -*-
  2. ## Standard openssl configuration targets.
  3. # Helper functions for the Windows configs
  4. my $vc_win64a_info = {};
  5. sub vc_win64a_info {
  6. unless (%$vc_win64a_info) {
  7. if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
  8. $vc_win64a_info = { AS => "nasm",
  9. ASFLAGS => "-g",
  10. asflags => "-Ox -f win64 -DNEAR",
  11. asoutflag => "-o " };
  12. } elsif ($disabled{asm}) {
  13. # assembler is still used to compile uplink shim
  14. $vc_win64a_info = { AS => "ml64",
  15. ASFLAGS => "/nologo /Zi",
  16. asflags => "/c /Cp /Cx",
  17. asoutflag => "/Fo" };
  18. } else {
  19. $die->("NASM not found - make sure it's installed and available on %PATH%\n");
  20. $vc_win64a_info = { AS => "{unknown}",
  21. ASFLAGS => "",
  22. asflags => "",
  23. asoutflag => "" };
  24. }
  25. }
  26. return $vc_win64a_info;
  27. }
  28. my $vc_win32_info = {};
  29. sub vc_win32_info {
  30. unless (%$vc_win32_info) {
  31. my $ver=`nasm -v 2>NUL`;
  32. my $vew=`nasmw -v 2>NUL`;
  33. if ($ver ne "" || $vew ne "") {
  34. $vc_win32_info = { AS => $ver ge $vew ? "nasm" : "nasmw",
  35. ASFLAGS => "",
  36. asflags => "-f win32",
  37. asoutflag => "-o ",
  38. perlasm_scheme => "win32n" };
  39. } elsif ($disabled{asm}) {
  40. # not actually used, uplink shim is inlined into C code
  41. $vc_win32_info = { AS => "ml",
  42. ASFLAGS => "/nologo /Zi",
  43. asflags => "/Cp /coff /c /Cx",
  44. asoutflag => "/Fo",
  45. perlasm_scheme => "win32" };
  46. } else {
  47. $die->("NASM not found - make sure it's installed and available on %PATH%\n");
  48. $vc_win32_info = { AS => "{unknown}",
  49. ASFLAGS => "",
  50. asflags => "",
  51. asoutflag => "",
  52. perlasm_scheme => "win32" };
  53. }
  54. }
  55. return $vc_win32_info;
  56. }
  57. my $vc_wince_info = {};
  58. sub vc_wince_info {
  59. unless (%$vc_wince_info) {
  60. # sanity check
  61. $die->('%OSVERSION% is not defined') if (!defined(env('OSVERSION')));
  62. $die->('%PLATFORM% is not defined') if (!defined(env('PLATFORM')));
  63. $die->('%TARGETCPU% is not defined') if (!defined(env('TARGETCPU')));
  64. #
  65. # Idea behind this is to mimic flags set by eVC++ IDE...
  66. #
  67. my $wcevers = env('OSVERSION'); # WCENNN
  68. my $wcevernum;
  69. my $wceverdotnum;
  70. if ($wcevers =~ /^WCE([1-9])([0-9]{2})$/) {
  71. $wcevernum = "$1$2";
  72. $wceverdotnum = "$1.$2";
  73. } else {
  74. $die->('%OSVERSION% value is insane');
  75. $wcevernum = "{unknown}";
  76. $wceverdotnum = "{unknown}";
  77. }
  78. my $wcecdefs = "-D_WIN32_WCE=$wcevernum -DUNDER_CE=$wcevernum"; # -D_WIN32_WCE=NNN
  79. my $wcelflag = "/subsystem:windowsce,$wceverdotnum"; # ...,N.NN
  80. my $wceplatf = env('PLATFORM');
  81. $wceplatf =~ tr/a-z0-9 /A-Z0-9_/;
  82. $wcecdefs .= " -DWCE_PLATFORM_$wceplatf";
  83. my $wcetgt = env('TARGETCPU'); # just shorter name...
  84. SWITCH: for($wcetgt) {
  85. /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_";
  86. $wcelflag.=" /machine:X86"; last; };
  87. /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
  88. $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/);
  89. $wcecdefs.=" -QRarch4T -QRinterwork-return";
  90. $wcelflag.=" /machine:THUMB"; last; };
  91. /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt";
  92. $wcelflag.=" /machine:ARM"; last; };
  93. /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
  94. $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32";
  95. $wcelflag.=" /machine:MIPSFPU"; last; };
  96. /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
  97. $wcecdefs.=" -DMIPSII -QMmips16";
  98. $wcelflag.=" /machine:MIPS16"; last; };
  99. /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt";
  100. $wcecdefs.=" -QMmips2";
  101. $wcelflag.=" /machine:MIPS"; last; };
  102. /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000";
  103. $wcelflag.=" /machine:MIPS"; last; };
  104. /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_ -DSHx";
  105. $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/);
  106. $wcelflag.=" /machine:$wcetgt"; last; };
  107. { $wcecdefs.=" -D$wcetgt -D_${wcetgt}_";
  108. $wcelflag.=" /machine:$wcetgt"; last; };
  109. }
  110. $vc_wince_info = { cppflags => $wcecdefs,
  111. lflags => $wcelflag };
  112. }
  113. return $vc_wince_info;
  114. }
  115. # Helper functions for the VMS configs
  116. my $vms_info = {};
  117. sub vms_info {
  118. my $pointer_size_str = $config{target} =~ m|-p(\d+)$| ? $1 : "";
  119. # For the case where Configure iterate through all config targets, such
  120. # as when listing them and their details, we reset info if the pointer
  121. # size changes.
  122. if (%$vms_info && $vms_info->{pointer_size} ne $pointer_size_str) {
  123. $vms_info = {};
  124. }
  125. unless (%$vms_info) {
  126. $vms_info->{disable_warns} = [
  127. "CXXPRAGMANA", # Shut up about unknown / unsupported pragmas
  128. ];
  129. $vms_info->{pointer_size} = $pointer_size_str;
  130. if ($pointer_size_str eq "64") {
  131. `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
  132. if ($? == 0) {
  133. push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
  134. }
  135. }
  136. unless ($disabled{zlib}) {
  137. my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
  138. if (defined($disabled{"zlib-dynamic"})) {
  139. $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
  140. } else {
  141. $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
  142. # In case the --with-zlib-lib value contains something like
  143. # /SHARE or /LIB or so at the end, remove it.
  144. $vms_info->{def_zlib} =~ s|/.*$||g;
  145. }
  146. }
  147. if ($config{target} =~ /-ia64/) {
  148. `PIPE ias -H 2> NL:`;
  149. if ($? == 0) {
  150. $vms_info->{AS} = "ias";
  151. $vms_info->{ASFLAGS} = '-d debug';
  152. $vms_info->{asflags} = '"-N" vms_upcase';
  153. $vms_info->{asoutflag} = "-o ";
  154. $vms_info->{perlasm_scheme} = "ias";
  155. }
  156. }
  157. }
  158. return $vms_info;
  159. }
  160. my %targets = (
  161. #### Basic configs that should work on any 32-bit box
  162. "gcc" => {
  163. inherit_from => [ "BASE_unix" ],
  164. CC => "gcc",
  165. CFLAGS => picker(debug => "-O0 -g",
  166. release => "-O3"),
  167. thread_scheme => "(unknown)",
  168. bn_ops => "BN_LLONG",
  169. },
  170. "cc" => {
  171. inherit_from => [ "BASE_unix" ],
  172. CC => "cc",
  173. CFLAGS => "-O",
  174. thread_scheme => "(unknown)",
  175. },
  176. #### VOS Configurations
  177. "vos-gcc" => {
  178. inherit_from => [ "BASE_unix" ],
  179. CC => "gcc",
  180. CFLAGS => picker(default => "-Wall",
  181. debug => "-O0 -g",
  182. release => "-O3"),
  183. cppflags => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES",
  184. lib_cppflags => "-DB_ENDIAN",
  185. thread_scheme => "(unknown)",
  186. sys_id => "VOS",
  187. lflags => add("-Wl,-map"),
  188. bn_ops => "BN_LLONG",
  189. shared_extension => ".so",
  190. },
  191. #### Solaris configurations
  192. "solaris-common" => {
  193. inherit_from => [ "BASE_unix" ],
  194. template => 1,
  195. lib_cppflags => "-DFILIO_H",
  196. ex_libs => add("-lsocket -lnsl -ldl"),
  197. dso_scheme => "dlfcn",
  198. thread_scheme => "pthreads",
  199. },
  200. #### Solaris common with Sun C setups
  201. "solaris-common-cc" => {
  202. inherit_from => [ "solaris-common" ],
  203. template => 1,
  204. shared_target => "solaris",
  205. shared_ldflag => "-Wl,-Bsymbolic",
  206. shared_defflag => "-Wl,-M,",
  207. shared_sonameflag=> "-Wl,-h,",
  208. },
  209. #### Solaris common with GNU C setups
  210. "solaris-common-gcc" => {
  211. inherit_from => [ "solaris-common" ],
  212. template => 1,
  213. shared_target => "solaris-gcc-shared", # The rest is on shared_info.pl
  214. },
  215. #### Solaris x86 with GNU C setups
  216. "solaris-x86-gcc" => {
  217. # NB. GNU C has to be configured to use GNU assembler, and not
  218. # /usr/ccs/bin/as. Failure to comply will result in compile
  219. # failures [at least] in 32-bit build.
  220. inherit_from => [ "solaris-common-gcc" ],
  221. CC => "gcc",
  222. CFLAGS => add_before(picker(default => "-Wall",
  223. debug => "-O0 -g",
  224. release => "-O3 -fomit-frame-pointer")),
  225. cflags => add(threads("-pthread")),
  226. lib_cppflags => add("-DL_ENDIAN"),
  227. ex_libs => add(threads("-pthread")),
  228. bn_ops => "BN_LLONG",
  229. shared_cflag => "-fPIC",
  230. shared_ldflag => add_before("-shared -static-libgcc"),
  231. asm_arch => 'x86',
  232. perlasm_scheme => 'elf',
  233. },
  234. "solaris64-x86_64-gcc" => {
  235. # -shared -static-libgcc might appear controversial, but modules
  236. # taken from static libgcc do not have relocations and linking
  237. # them into our shared objects doesn't have any negative side
  238. # effects. On the contrary, doing so makes it possible to use
  239. # gcc shared build with Sun C. Given that gcc generates faster
  240. # code [thanks to inline assembler], I would actually recommend
  241. # to consider using gcc shared build even with vendor compiler:-)
  242. # -- <appro@openssl.org>
  243. inherit_from => [ "solaris-common-gcc" ],
  244. CC => "gcc",
  245. CFLAGS => add_before(picker(default => "-Wall",
  246. debug => "-O0 -g",
  247. release => "-O3")),
  248. cflags => add_before("-m64", threads("-pthread")),
  249. lib_cppflags => add("-DL_ENDIAN"),
  250. ex_libs => add(threads("-pthread")),
  251. bn_ops => "SIXTY_FOUR_BIT_LONG",
  252. asm_arch => 'x86_64',
  253. perlasm_scheme => "elf",
  254. shared_cflag => "-fPIC",
  255. shared_ldflag => add_before("-shared -static-libgcc"),
  256. multilib => "/64",
  257. },
  258. #### Solaris x86 with Sun C setups
  259. # There used to be solaris-x86-cc target, but it was removed,
  260. # primarily because vendor assembler can't assemble our modules
  261. # with -KPIC flag. As result it, assembly support, was not even
  262. # available as option. But its lack means lack of side-channel
  263. # resistant code, which is incompatible with security by today's
  264. # standards. Fortunately gcc is readily available prepackaged
  265. # option, which we can firmly point at...
  266. #
  267. # On related note, solaris64-x86_64-cc target won't compile code
  268. # paths utilizing AVX and post-Haswell instruction extensions.
  269. # Consider switching to solaris64-x86_64-gcc even here...
  270. #
  271. "solaris64-x86_64-cc" => {
  272. inherit_from => [ "solaris-common-cc" ],
  273. CC => "cc",
  274. CFLAGS => add_before(picker(debug => "-g",
  275. release => "-xO5 -xdepend -xbuiltin")),
  276. cflags => add_before("-xarch=generic64 -xstrconst -Xa"),
  277. cppflags => add(threads("-D_REENTRANT")),
  278. lib_cppflags => add("-DL_ENDIAN"),
  279. thread_scheme => "pthreads",
  280. lflags => add(threads("-mt")),
  281. ex_libs => add(threads("-lpthread")),
  282. bn_ops => "SIXTY_FOUR_BIT_LONG",
  283. asm_arch => 'x86_64',
  284. perlasm_scheme => "elf",
  285. shared_cflag => "-KPIC",
  286. shared_ldflag => add_before("-G -dy -z text"),
  287. multilib => "/64",
  288. },
  289. #### SPARC Solaris with GNU C setups
  290. "solaris-sparcv7-gcc" => {
  291. inherit_from => [ "solaris-common-gcc" ],
  292. CC => "gcc",
  293. CFLAGS => add_before(picker(default => "-Wall",
  294. debug => "-O0 -g",
  295. release => "-O3")),
  296. cflags => add(threads("-pthread")),
  297. lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
  298. ex_libs => add(threads("-pthread")),
  299. bn_ops => "BN_LLONG RC4_CHAR",
  300. shared_cflag => "-fPIC",
  301. shared_ldflag => add_before("-shared -static-libgcc"),
  302. },
  303. "solaris-sparcv8-gcc" => {
  304. inherit_from => [ "solaris-sparcv7-gcc" ],
  305. cflags => add_before("-mcpu=v8"),
  306. asm_arch => 'sparcv8',
  307. perlasm_scheme => 'void',
  308. },
  309. "solaris-sparcv9-gcc" => {
  310. # -m32 should be safe to add as long as driver recognizes
  311. # -mcpu=ultrasparc
  312. inherit_from => [ "solaris-sparcv7-gcc" ],
  313. cflags => add_before("-m32 -mcpu=ultrasparc"),
  314. asm_arch => 'sparcv9',
  315. perlasm_scheme => 'void',
  316. },
  317. "solaris64-sparcv9-gcc" => {
  318. inherit_from => [ "solaris-sparcv9-gcc" ],
  319. cflags => sub { my $f=join(" ",@_); $f =~ s/\-m32/-m64/; $f; },
  320. bn_ops => "BN_LLONG RC4_CHAR",
  321. multilib => "/64",
  322. },
  323. #### SPARC Solaris with Sun C setups
  324. # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
  325. # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
  326. # SC5.0 note: Compiler common patch 107357-01 or later is required!
  327. "solaris-sparcv7-cc" => {
  328. inherit_from => [ "solaris-common-cc" ],
  329. CC => "cc",
  330. CFLAGS => add_before(picker(debug => "-g",
  331. release => "-xO5 -xdepend")),
  332. cflags => add_before("-xstrconst -Xa"),
  333. cppflags => add(threads("-D_REENTRANT")),
  334. lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
  335. lflags => add(threads("-mt")),
  336. ex_libs => add(threads("-lpthread")),
  337. bn_ops => "BN_LLONG RC4_CHAR",
  338. shared_cflag => "-KPIC",
  339. shared_ldflag => add_before("-G -dy -z text"),
  340. },
  341. ####
  342. "solaris-sparcv8-cc" => {
  343. inherit_from => [ "solaris-sparcv7-cc" ],
  344. cflags => add_before("-xarch=v8"),
  345. asm_arch => 'sparcv8',
  346. perlasm_scheme => 'void',
  347. },
  348. "solaris-sparcv9-cc" => {
  349. inherit_from => [ "solaris-sparcv7-cc" ],
  350. cflags => add_before("-xarch=v8plus"),
  351. asm_arch => 'sparcv9',
  352. perlasm_scheme => 'void',
  353. },
  354. "solaris64-sparcv9-cc" => {
  355. inherit_from => [ "solaris-sparcv7-cc" ],
  356. cflags => add_before("-m64 -xarch=sparc"),
  357. bn_ops => "BN_LLONG RC4_CHAR",
  358. asm_arch => 'sparcv9',
  359. perlasm_scheme => 'void',
  360. multilib => "/64",
  361. },
  362. #### IRIX 6.x configs
  363. # Only N32 and N64 ABIs are supported.
  364. "irix-common" => {
  365. inherit_from => [ "BASE_unix" ],
  366. template => 1,
  367. cppflags => threads("-D_SGI_MP_SOURCE"),
  368. lib_cppflags => "-DB_ENDIAN",
  369. ex_libs => add(threads("-lpthread")),
  370. thread_scheme => "pthreads",
  371. dso_scheme => "dlfcn",
  372. shared_target => "self",
  373. shared_ldflag => "-shared -Wl,-Bsymbolic",
  374. shared_sonameflag=> "-Wl,-soname,",
  375. },
  376. "irix-mips3-gcc" => {
  377. inherit_from => [ "irix-common" ],
  378. CC => "gcc",
  379. CFLAGS => picker(debug => "-g -O0",
  380. release => "-O3"),
  381. LDFLAGS => "-static-libgcc",
  382. cflags => "-mabi=n32",
  383. bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
  384. asm_arch => 'mips64',
  385. perlasm_scheme => "n32",
  386. multilib => "32",
  387. },
  388. "irix-mips3-cc" => {
  389. inherit_from => [ "irix-common" ],
  390. CC => "cc",
  391. CFLAGS => picker(debug => "-g -O0",
  392. release => "-O2"),
  393. cflags => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared",
  394. bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
  395. asm_arch => 'mips64',
  396. perlasm_scheme => "n32",
  397. multilib => "32",
  398. },
  399. # N64 ABI builds.
  400. "irix64-mips4-gcc" => {
  401. inherit_from => [ "irix-common" ],
  402. CC => "gcc",
  403. CFLAGS => picker(debug => "-g -O0",
  404. release => "-O3"),
  405. LDFLAGS => "-static-libgcc",
  406. cflags => "-mabi=64 -mips4",
  407. bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
  408. asm_arch => 'mips64',
  409. perlasm_scheme => "64",
  410. multilib => "64",
  411. },
  412. "irix64-mips4-cc" => {
  413. inherit_from => [ "irix-common" ],
  414. CC => "cc",
  415. CFLAGS => picker(debug => "-g -O0",
  416. release => "-O2"),
  417. cflags => "-64 -mips4 -use_readonly_const -G0 -rdata_shared",
  418. bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
  419. asm_arch => 'mips64',
  420. perlasm_scheme => "64",
  421. multilib => "64",
  422. },
  423. #### Unified HP-UX ANSI C configs.
  424. # Special notes:
  425. # - Originally we were optimizing at +O4 level. It should be noted
  426. # that the only difference between +O3 and +O4 is global inter-
  427. # procedural analysis. As it has to be performed during the link
  428. # stage the compiler leaves behind certain pseudo-code in lib*.a
  429. # which might be release or even patch level specific. Generating
  430. # the machine code for and analyzing the *whole* program appears
  431. # to be *extremely* memory demanding while the performance gain is
  432. # actually questionable. The situation is intensified by the default
  433. # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
  434. # which is way too low for +O4. In other words, doesn't +O3 make
  435. # more sense?
  436. # - Keep in mind that the HP compiler by default generates code
  437. # suitable for execution on the host you're currently compiling at.
  438. # If the toolkit is meant to be used on various PA-RISC processors
  439. # consider './Configure hpux-parisc-[g]cc +DAportable'.
  440. # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
  441. # 32-bit message digests. (For the moment of this writing) HP C
  442. # doesn't seem to "digest" too many local variables (they make "him"
  443. # chew forever:-). For more details look-up MD32_XARRAY comment in
  444. # crypto/sha/sha_local.h.
  445. # - originally there were 32-bit hpux-parisc2-* targets. They were
  446. # scrapped, because a) they were not interchangeable with other 32-bit
  447. # targets; b) performance-critical 32-bit assembly modules implement
  448. # even PA-RISC 2.0-specific code paths, which are chosen at run-time,
  449. # thus adequate performance is provided even with PA-RISC 1.1 build.
  450. "hpux-common" => {
  451. inherit_from => [ "BASE_unix" ],
  452. template => 1,
  453. defines => add("_XOPEN_SOURCE", "_XOPEN_SOURCE_EXTENDED",
  454. "_HPUX_ALT_XOPEN_SOCKET_API"),
  455. lib_cppflags => "-DB_ENDIAN",
  456. thread_scheme => "pthreads",
  457. dso_scheme => "dlfcn", # overridden in 32-bit PA-RISC builds
  458. shared_target => "self",
  459. bin_lflags => "-Wl,+s,+cdp,../:,+cdp,./:",
  460. shared_ldflag => "-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:",
  461. shared_sonameflag=> "-Wl,+h,",
  462. },
  463. "hpux-parisc-gcc" => {
  464. inherit_from => [ "hpux-common" ],
  465. CC => "gcc",
  466. CFLAGS => picker(debug => "-O0 -g",
  467. release => "-O3"),
  468. cflags => add(threads("-pthread")),
  469. lib_cppflags => add("-DBN_DIV2W"),
  470. ex_libs => add("-ldld", threads("-pthread")),
  471. bn_ops => "BN_LLONG RC4_CHAR",
  472. dso_scheme => "dl",
  473. shared_cflag => "-fPIC",
  474. shared_ldflag => add_before("-shared"),
  475. shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
  476. },
  477. "hpux-parisc1_1-gcc" => {
  478. inherit_from => [ "hpux-parisc-gcc" ],
  479. asm_arch => 'parisc11',
  480. perlasm_scheme => "32",
  481. multilib => "/pa1.1",
  482. },
  483. "hpux64-parisc2-gcc" => {
  484. inherit_from => [ "hpux-common" ],
  485. CC => "gcc",
  486. CFLAGS => combine(picker(debug => "-O0 -g",
  487. release => "-O3")),
  488. cflags => add(threads("-pthread")),
  489. ex_libs => add("-ldl", threads("-pthread")),
  490. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  491. asm_arch => 'parisc20_64',
  492. perlasm_scheme => "64",
  493. shared_cflag => "-fpic",
  494. shared_ldflag => add_before("-shared"),
  495. shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
  496. multilib => "/pa20_64",
  497. },
  498. # More attempts at unified 10.X and 11.X targets for HP C compiler.
  499. "hpux-parisc-cc" => {
  500. inherit_from => [ "hpux-common" ],
  501. CC => "cc",
  502. CFLAGS => picker(debug => "+O0 +d -g",
  503. release => "+O3"),
  504. cflags => "+Optrs_strongly_typed -Ae +ESlit",
  505. cppflags => threads("-D_REENTRANT"),
  506. lib_cppflags => add("-DBN_DIV2W -DMD32_XARRAY"),
  507. ex_libs => add("-ldld", threads("-lpthread")),
  508. bn_ops => "RC4_CHAR",
  509. dso_scheme => "dl",
  510. shared_cflag => "+Z",
  511. shared_ldflag => add_before("-b"),
  512. shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
  513. },
  514. "hpux-parisc1_1-cc" => {
  515. inherit_from => [ "hpux-parisc-cc" ],
  516. cflags => add_before("+DA1.1"),
  517. asm_arch => 'parisc11',
  518. perlasm_scheme => "32",
  519. multilib => "/pa1.1",
  520. },
  521. "hpux64-parisc2-cc" => {
  522. inherit_from => [ "hpux-common" ],
  523. CC => "cc",
  524. CFLAGS => picker(debug => "+O0 +d -g",
  525. release => "+O3") ,
  526. cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit",
  527. cppflags => threads("-D_REENTRANT") ,
  528. lib_cppflags => add("-DMD32_XARRAY"),
  529. ex_libs => add("-ldl", threads("-lpthread")),
  530. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  531. asm_arch => 'parisc20_64',
  532. perlasm_scheme => "64",
  533. shared_cflag => "+Z",
  534. shared_ldflag => add_before("-b"),
  535. shared_extension => ".sl.\$(SHLIB_VERSION_NUMBER)",
  536. multilib => "/pa20_64",
  537. },
  538. # HP/UX IA-64 targets
  539. "hpux-ia64-cc" => {
  540. inherit_from => [ "hpux-common" ],
  541. CC => "cc",
  542. CFLAGS => picker(debug => "+O0 +d -g",
  543. release => "+O2"),
  544. cflags => "-Ae +DD32 +Olit=all -z",
  545. cppflags => add(threads("-D_REENTRANT")),
  546. ex_libs => add("-ldl", threads("-lpthread")),
  547. bn_ops => "SIXTY_FOUR_BIT",
  548. asm_arch => 'ia64',
  549. perlasm_scheme => 'void',
  550. shared_cflag => "+Z",
  551. shared_ldflag => add_before("-b"),
  552. multilib => "/hpux32",
  553. },
  554. "hpux64-ia64-cc" => {
  555. inherit_from => [ "hpux-common" ],
  556. CC => "cc",
  557. CFLAGS => picker(debug => "+O0 +d -g",
  558. release => "+O3"),
  559. cflags => "-Ae +DD64 +Olit=all -z",
  560. cppflags => threads("-D_REENTRANT"),
  561. ex_libs => add("-ldl", threads("-lpthread")),
  562. bn_ops => "SIXTY_FOUR_BIT_LONG",
  563. asm_arch => 'ia64',
  564. perlasm_scheme => 'void',
  565. shared_cflag => "+Z",
  566. shared_ldflag => add_before("-b"),
  567. multilib => "/hpux64",
  568. },
  569. # GCC builds...
  570. "hpux-ia64-gcc" => {
  571. inherit_from => [ "hpux-common" ],
  572. CC => "gcc",
  573. CFLAGS => picker(debug => "-O0 -g",
  574. release => "-O3"),
  575. cflags => add(threads("-pthread")),
  576. ex_libs => add("-ldl", threads("-pthread")),
  577. bn_ops => "SIXTY_FOUR_BIT",
  578. asm_arch => 'ia64',
  579. perlasm_scheme => 'void',
  580. shared_cflag => "-fpic",
  581. shared_ldflag => add_before("-shared"),
  582. multilib => "/hpux32",
  583. },
  584. "hpux64-ia64-gcc" => {
  585. inherit_from => [ "hpux-common" ],
  586. CC => "gcc",
  587. CFLAGS => picker(debug => "-O0 -g",
  588. release => "-O3"),
  589. cflags => combine("-mlp64", threads("-pthread")),
  590. ex_libs => add("-ldl", threads("-pthread")),
  591. bn_ops => "SIXTY_FOUR_BIT_LONG",
  592. asm_arch => 'ia64',
  593. perlasm_scheme => 'void',
  594. shared_cflag => "-fpic",
  595. shared_ldflag => add_before("-shared"),
  596. multilib => "/hpux64",
  597. },
  598. #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
  599. "MPE/iX-gcc" => {
  600. inherit_from => [ "BASE_unix" ],
  601. CC => "gcc",
  602. CFLAGS => "-O3",
  603. cppflags => "-D_POSIX_SOURCE -D_SOCKET_SOURCE",
  604. includes => [ "/SYSLOG/PUB" ],
  605. lib_cppflags => "-DBN_DIV2W",
  606. sys_id => "MPE",
  607. lflags => add("-L/SYSLOG/PUB"),
  608. ex_libs => add("-lsyslog -lsocket -lcurses"),
  609. thread_scheme => "(unknown)",
  610. bn_ops => "BN_LLONG",
  611. },
  612. #### DEC Alpha Tru64 targets. Tru64 is marketing name for OSF/1 version 4
  613. #### and forward. In reality 'uname -s' still returns "OSF1". Originally
  614. #### there were even osf1-* configs targeting prior versions provided,
  615. #### but not anymore...
  616. "tru64-alpha-gcc" => {
  617. inherit_from => [ "BASE_unix" ],
  618. CC => "gcc",
  619. CFLAGS => "-O3",
  620. cflags => add("-std=c9x", threads("-pthread")),
  621. cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
  622. ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
  623. bn_ops => "SIXTY_FOUR_BIT_LONG",
  624. asm_arch => 'alpha',
  625. perlasm_scheme => "void",
  626. thread_scheme => "pthreads",
  627. dso_scheme => "dlfcn",
  628. shared_target => "alpha-osf1-shared",
  629. shared_extension => ".so",
  630. },
  631. "tru64-alpha-cc" => {
  632. inherit_from => [ "BASE_unix" ],
  633. CC => "cc",
  634. CFLAGS => "-tune host -fast",
  635. cflags => add("-std1 -readonly_strings",
  636. threads("-pthread")),
  637. cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
  638. ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
  639. bn_ops => "SIXTY_FOUR_BIT_LONG",
  640. asm_arch => 'alpha',
  641. perlasm_scheme => "void",
  642. thread_scheme => "pthreads",
  643. dso_scheme => "dlfcn",
  644. shared_target => "alpha-osf1-shared",
  645. shared_ldflag => "-msym",
  646. shared_extension => ".so",
  647. },
  648. ####
  649. #### Variety of LINUX:-)
  650. ####
  651. # *-generic* is endian-neutral target, but ./config is free to
  652. # throw in -D[BL]_ENDIAN, whichever appropriate...
  653. "linux-generic32" => {
  654. inherit_from => [ "BASE_unix" ],
  655. CC => "gcc",
  656. CXX => "g++",
  657. CFLAGS => picker(default => "-Wall",
  658. debug => "-O0 -g",
  659. release => "-O3"),
  660. CXXFLAGS => picker(default => "-Wall",
  661. debug => "-O0 -g",
  662. release => "-O3"),
  663. cflags => threads("-pthread"),
  664. cxxflags => combine("-std=c++11", threads("-pthread")),
  665. lib_cppflags => "-DOPENSSL_USE_NODELETE",
  666. ex_libs => add("-ldl", threads("-pthread")),
  667. bn_ops => "BN_LLONG RC4_CHAR",
  668. thread_scheme => "pthreads",
  669. dso_scheme => "dlfcn",
  670. shared_target => "linux-shared",
  671. shared_cflag => "-fPIC",
  672. shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
  673. enable => [ "afalgeng" ],
  674. },
  675. "linux-latomic" => {
  676. inherit_from => [ "linux-generic32" ],
  677. ex_libs => add(threads("-latomic")),
  678. },
  679. "linux-generic64" => {
  680. inherit_from => [ "linux-generic32" ],
  681. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  682. },
  683. "linux-ppc" => {
  684. inherit_from => [ "linux-latomic" ],
  685. asm_arch => 'ppc32',
  686. perlasm_scheme => "linux32",
  687. lib_cppflags => add("-DB_ENDIAN"),
  688. },
  689. "linux-ppc64" => {
  690. inherit_from => [ "linux-generic64" ],
  691. cflags => add("-m64"),
  692. cxxflags => add("-m64"),
  693. lib_cppflags => add("-DB_ENDIAN"),
  694. asm_arch => 'ppc64',
  695. perlasm_scheme => "linux64",
  696. multilib => "64",
  697. },
  698. "linux-ppc64le" => {
  699. inherit_from => [ "linux-generic64" ],
  700. cflags => add("-m64"),
  701. cxxflags => add("-m64"),
  702. lib_cppflags => add("-DL_ENDIAN"),
  703. asm_arch => 'ppc64',
  704. perlasm_scheme => "linux64le",
  705. },
  706. "linux-armv4" => {
  707. ################################################################
  708. # Note that -march is not among compiler options in linux-armv4
  709. # target description. Not specifying one is intentional to give
  710. # you choice to:
  711. #
  712. # a) rely on your compiler default by not specifying one;
  713. # b) specify your target platform explicitly for optimal
  714. # performance, e.g. -march=armv6 or -march=armv7-a;
  715. # c) build "universal" binary that targets *range* of platforms
  716. # by specifying minimum and maximum supported architecture;
  717. #
  718. # As for c) option. It actually makes no sense to specify
  719. # maximum to be less than ARMv7, because it's the least
  720. # requirement for run-time switch between platform-specific
  721. # code paths. And without run-time switch performance would be
  722. # equivalent to one for minimum. Secondly, there are some
  723. # natural limitations that you'd have to accept and respect.
  724. # Most notably you can *not* build "universal" binary for
  725. # big-endian platform. This is because ARMv7 processor always
  726. # picks instructions in little-endian order. Another similar
  727. # limitation is that -mthumb can't "cross" -march=armv6t2
  728. # boundary, because that's where it became Thumb-2. Well, this
  729. # limitation is a bit artificial, because it's not really
  730. # impossible, but it's deemed too tricky to support. And of
  731. # course you have to be sure that your binutils are actually
  732. # up to the task of handling maximum target platform. With all
  733. # this in mind here is an example of how to configure
  734. # "universal" build:
  735. #
  736. # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
  737. #
  738. inherit_from => [ "linux-latomic" ],
  739. asm_arch => 'armv4',
  740. perlasm_scheme => "linux32",
  741. },
  742. "linux-aarch64" => {
  743. inherit_from => [ "linux-generic64" ],
  744. asm_arch => 'aarch64',
  745. perlasm_scheme => "linux64",
  746. },
  747. "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32
  748. inherit_from => [ "linux-generic32" ],
  749. cflags => add("-mabi=ilp32"),
  750. cxxflags => add("-mabi=ilp32"),
  751. bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
  752. asm_arch => 'aarch64',
  753. perlasm_scheme => "linux64",
  754. },
  755. "linux-mips32" => {
  756. # Configure script adds minimally required -march for assembly
  757. # support, if no -march was specified at command line.
  758. inherit_from => [ "linux-latomic" ],
  759. cflags => add("-mabi=32"),
  760. cxxflags => add("-mabi=32"),
  761. asm_arch => 'mips32',
  762. perlasm_scheme => "o32",
  763. },
  764. # mips32 and mips64 below refer to contemporary MIPS Architecture
  765. # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
  766. "linux-mips64" => {
  767. inherit_from => [ "linux-latomic" ],
  768. cflags => add("-mabi=n32"),
  769. cxxflags => add("-mabi=n32"),
  770. bn_ops => "RC4_CHAR SIXTY_FOUR_BIT",
  771. asm_arch => 'mips64',
  772. perlasm_scheme => "n32",
  773. multilib => "32",
  774. },
  775. "linux64-mips64" => {
  776. inherit_from => [ "linux-generic64" ],
  777. cflags => add("-mabi=64"),
  778. cxxflags => add("-mabi=64"),
  779. asm_arch => 'mips64',
  780. perlasm_scheme => "64",
  781. multilib => "64",
  782. },
  783. # riscv below refers to contemporary RISCV Architecture
  784. # specifications,
  785. "linux64-riscv64" => {
  786. inherit_from => [ "linux-generic64"],
  787. perlasm_scheme => "linux64",
  788. asm_arch => 'riscv64',
  789. },
  790. "linux32-riscv32" => {
  791. inherit_from => [ "linux-generic32"],
  792. perlasm_scheme => "linux32",
  793. asm_arch => 'riscv32',
  794. },
  795. # loongarch64 below refers to contemporary LOONGARCH Architecture
  796. # specifications,
  797. "linux64-loongarch64" => {
  798. inherit_from => [ "linux-generic64"],
  799. perlasm_scheme => "linux64",
  800. asm_arch => 'loongarch64',
  801. },
  802. #### IA-32 targets...
  803. #### These two targets are a bit aged and are to be used on older Linux
  804. #### machines where gcc doesn't understand -m32 and -m64
  805. "linux-elf" => {
  806. inherit_from => [ "linux-generic32" ],
  807. CFLAGS => add(picker(release => "-fomit-frame-pointer")),
  808. lib_cppflags => add("-DL_ENDIAN"),
  809. bn_ops => "BN_LLONG",
  810. asm_arch => 'x86',
  811. perlasm_scheme => "elf",
  812. },
  813. "linux-aout" => {
  814. inherit_from => [ "BASE_unix" ],
  815. CC => "gcc",
  816. CFLAGS => add(picker(default => "-Wall",
  817. debug => "-O0 -g",
  818. release => "-O3 -fomit-frame-pointer")),
  819. lib_cppflags => add("-DL_ENDIAN"),
  820. bn_ops => "BN_LLONG",
  821. thread_scheme => "(unknown)",
  822. asm_arch => 'x86',
  823. perlasm_scheme => "a.out",
  824. },
  825. #### X86 / X86_64 targets
  826. "linux-x86" => {
  827. inherit_from => [ "linux-generic32" ],
  828. CFLAGS => add(picker(release => "-fomit-frame-pointer")),
  829. cflags => add("-m32"),
  830. cxxflags => add("-m32"),
  831. lib_cppflags => add("-DL_ENDIAN"),
  832. bn_ops => "BN_LLONG",
  833. asm_arch => 'x86',
  834. perlasm_scheme => "elf",
  835. },
  836. "linux-x86-clang" => {
  837. inherit_from => [ "linux-x86" ],
  838. CC => "clang",
  839. CXX => "clang++",
  840. ex_libs => add(threads("-latomic")),
  841. },
  842. "linux-x86_64" => {
  843. inherit_from => [ "linux-generic64" ],
  844. cflags => add("-m64"),
  845. cxxflags => add("-m64"),
  846. lib_cppflags => add("-DL_ENDIAN"),
  847. bn_ops => "SIXTY_FOUR_BIT_LONG",
  848. asm_arch => 'x86_64',
  849. perlasm_scheme => "elf",
  850. multilib => "64",
  851. },
  852. "linux-x86_64-clang" => {
  853. inherit_from => [ "linux-x86_64" ],
  854. CC => "clang",
  855. CXX => "clang++",
  856. },
  857. "linux-x32" => {
  858. inherit_from => [ "linux-generic32" ],
  859. cflags => add("-mx32"),
  860. cxxflags => add("-mx32"),
  861. lib_cppflags => add("-DL_ENDIAN"),
  862. bn_ops => "SIXTY_FOUR_BIT",
  863. asm_arch => 'x86_64',
  864. perlasm_scheme => "elf32",
  865. multilib => "x32",
  866. },
  867. "linux-ia64" => {
  868. inherit_from => [ "linux-generic64" ],
  869. bn_ops => "SIXTY_FOUR_BIT_LONG",
  870. asm_arch => 'ia64',
  871. perlasm_scheme => 'void',
  872. },
  873. "linux64-s390x" => {
  874. inherit_from => [ "linux-generic64" ],
  875. cflags => add("-m64"),
  876. cxxflags => add("-m64"),
  877. lib_cppflags => add("-DB_ENDIAN"),
  878. asm_arch => 's390x',
  879. perlasm_scheme => "64",
  880. multilib => "64",
  881. },
  882. "linux32-s390x" => {
  883. #### So called "highgprs" target for z/Architecture CPUs
  884. # "Highgprs" is kernel feature first implemented in Linux
  885. # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
  886. # significant bits of general purpose registers not only
  887. # upon 32-bit process context switch, but even on
  888. # asynchronous signal delivery to such process. This makes
  889. # it possible to deploy 64-bit instructions even in legacy
  890. # application context and achieve better [or should we say
  891. # adequate] performance. The build is binary compatible with
  892. # linux-generic32, and the idea is to be able to install the
  893. # resulting libcrypto.so alongside generic one, e.g. as
  894. # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
  895. # linker to autodiscover. Unfortunately it doesn't work just
  896. # yet, because of couple of bugs in glibc
  897. # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
  898. #
  899. inherit_from => [ "linux-generic32" ],
  900. cflags => add("-m31 -Wa,-mzarch"),
  901. cxxflags => add("-m31 -Wa,-mzarch"),
  902. lib_cppflags => add("-DB_ENDIAN"),
  903. asm_arch => 's390x',
  904. perlasm_scheme => "31",
  905. multilib => "/highgprs",
  906. },
  907. #### SPARC Linux setups
  908. "linux-sparcv8" => {
  909. inherit_from => [ "linux-latomic" ],
  910. cflags => add("-mcpu=v8"),
  911. cxxflags => add("-mcpu=v8"),
  912. lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
  913. asm_arch => 'sparcv8',
  914. perlasm_scheme => 'void',
  915. },
  916. "linux-sparcv9" => {
  917. # it's a real mess with -mcpu=ultrasparc option under Linux,
  918. # but -Wa,-Av8plus should do the trick no matter what.
  919. inherit_from => [ "linux-latomic" ],
  920. cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
  921. cxxflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
  922. lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
  923. asm_arch => 'sparcv9',
  924. perlasm_scheme => 'void',
  925. },
  926. "linux64-sparcv9" => {
  927. # GCC 3.1 is a requirement
  928. inherit_from => [ "linux-generic64" ],
  929. cflags => add("-m64 -mcpu=ultrasparc"),
  930. cxxflags => add("-m64 -mcpu=ultrasparc"),
  931. lib_cppflags => add("-DB_ENDIAN"),
  932. ex_libs => add(threads("-latomic")),
  933. bn_ops => "BN_LLONG RC4_CHAR",
  934. asm_arch => 'sparcv9',
  935. perlasm_scheme => 'void',
  936. multilib => "64",
  937. },
  938. "linux-alpha-gcc" => {
  939. inherit_from => [ "linux-generic64" ],
  940. lib_cppflags => add("-DL_ENDIAN"),
  941. bn_ops => "SIXTY_FOUR_BIT_LONG",
  942. asm_arch => 'alpha',
  943. perlasm_scheme => "void",
  944. },
  945. "linux-c64xplus" => {
  946. inherit_from => [ "BASE_unix" ],
  947. # TI_CGT_C6000_7.3.x is a requirement
  948. CC => "cl6x",
  949. CFLAGS => "-o2 -ox -ms",
  950. cflags => "--linux -ea=.s -eo=.o -mv6400+ -pden",
  951. cxxflags => "--linux -ea=.s -eo=.o -mv6400+ -pden",
  952. cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT",
  953. threads("-D_REENTRANT")),
  954. bn_ops => "BN_LLONG",
  955. thread_scheme => "pthreads",
  956. asm_arch => 'c64xplus',
  957. perlasm_scheme => "void",
  958. dso_scheme => "dlfcn",
  959. shared_target => "linux-shared",
  960. shared_cflag => "--pic",
  961. shared_ldflag => add("-z --sysv --shared"),
  962. ranlib => "true",
  963. },
  964. #### *BSD
  965. "BSD-generic32" => {
  966. # As for thread cflag. Idea is to maintain "collective" set of
  967. # flags, which would cover all BSD flavors. -pthread applies
  968. # to them all, but is treated differently. OpenBSD expands is
  969. # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
  970. # expands it as -lc_r, which has to be accompanied by explicit
  971. # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
  972. # expands it as -lc_r, which seems to be sufficient?
  973. inherit_from => [ "BASE_unix" ],
  974. CC => "cc",
  975. CFLAGS => picker(default => "-Wall",
  976. debug => "-O0 -g",
  977. release => "-O3"),
  978. cflags => threads("-pthread"),
  979. cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"),
  980. ex_libs => add(threads("-pthread")),
  981. enable => add("devcryptoeng"),
  982. bn_ops => "BN_LLONG",
  983. thread_scheme => "pthreads",
  984. dso_scheme => "dlfcn",
  985. shared_target => "bsd-gcc-shared",
  986. shared_cflag => "-fPIC",
  987. },
  988. "BSD-generic64" => {
  989. inherit_from => [ "BSD-generic32" ],
  990. bn_ops => "SIXTY_FOUR_BIT_LONG",
  991. },
  992. "BSD-x86" => {
  993. inherit_from => [ "BSD-generic32" ],
  994. CFLAGS => add(picker(release => "-fomit-frame-pointer")),
  995. lib_cppflags => add("-DL_ENDIAN"),
  996. bn_ops => "BN_LLONG",
  997. asm_arch => 'x86',
  998. perlasm_scheme => "a.out",
  999. },
  1000. "BSD-x86-elf" => {
  1001. inherit_from => [ "BSD-x86" ],
  1002. perlasm_scheme => "elf",
  1003. },
  1004. "BSD-sparcv8" => {
  1005. inherit_from => [ "BSD-generic32" ],
  1006. cflags => add("-mcpu=v8"),
  1007. lib_cppflags => add("-DB_ENDIAN"),
  1008. asm_arch => 'sparcv8',
  1009. perlasm_scheme => 'void',
  1010. },
  1011. "BSD-sparc64" => {
  1012. # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
  1013. # simply *happens* to work around a compiler bug in gcc 3.3.3,
  1014. # triggered by RIPEMD160 code.
  1015. inherit_from => [ "BSD-generic64" ],
  1016. lib_cppflags => add("-DB_ENDIAN -DMD32_REG_T=int"),
  1017. bn_ops => "BN_LLONG",
  1018. asm_arch => 'sparcv9',
  1019. perlasm_scheme => 'void',
  1020. },
  1021. "BSD-ia64" => {
  1022. inherit_from => [ "BSD-generic64" ],
  1023. lib_cppflags => add("-DL_ENDIAN"),
  1024. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1025. asm_arch => 'ia64',
  1026. perlasm_scheme => 'void',
  1027. },
  1028. "BSD-x86_64" => {
  1029. inherit_from => [ "BSD-generic64" ],
  1030. lib_cppflags => add("-DL_ENDIAN"),
  1031. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1032. asm_arch => 'x86_64',
  1033. perlasm_scheme => "elf",
  1034. },
  1035. "BSD-aarch64" => {
  1036. inherit_from => [ "BSD-generic64" ],
  1037. lib_cppflags => add("-DL_ENDIAN"),
  1038. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1039. asm_arch => 'aarch64',
  1040. perlasm_scheme => "linux64",
  1041. },
  1042. "BSD-ppc" => {
  1043. inherit_from => [ "BSD-generic32" ],
  1044. asm_arch => 'ppc32',
  1045. perlasm_scheme => "linux32",
  1046. lib_cppflags => add("-DB_ENDIAN"),
  1047. },
  1048. "BSD-ppc64" => {
  1049. inherit_from => [ "BSD-generic64" ],
  1050. cflags => add("-m64"),
  1051. cxxflags => add("-m64"),
  1052. lib_cppflags => add("-DB_ENDIAN"),
  1053. asm_arch => 'ppc64',
  1054. perlasm_scheme => "linux64",
  1055. },
  1056. "BSD-ppc64le" => {
  1057. inherit_from => [ "BSD-generic64" ],
  1058. cflags => add("-m64"),
  1059. cxxflags => add("-m64"),
  1060. lib_cppflags => add("-DL_ENDIAN"),
  1061. asm_arch => 'ppc64',
  1062. perlasm_scheme => "linux64le",
  1063. },
  1064. # riscv below refers to contemporary RISCV Architecture
  1065. # specifications,
  1066. "BSD-riscv64" => {
  1067. inherit_from => [ "BSD-generic64"],
  1068. perlasm_scheme => "linux64",
  1069. asm_arch => 'riscv64',
  1070. },
  1071. "BSD-riscv32" => {
  1072. inherit_from => [ "BSD-generic32"],
  1073. perlasm_scheme => "linux32",
  1074. asm_arch => 'riscv32',
  1075. },
  1076. "BSD-armv4" => {
  1077. ################################################################
  1078. # Note that -march is not among compiler options in linux-armv4
  1079. # target description. Not specifying one is intentional to give
  1080. # you choice to:
  1081. #
  1082. # a) rely on your compiler default by not specifying one;
  1083. # b) specify your target platform explicitly for optimal
  1084. # performance, e.g. -march=armv6 or -march=armv7-a;
  1085. # c) build "universal" binary that targets *range* of platforms
  1086. # by specifying minimum and maximum supported architecture;
  1087. #
  1088. # As for c) option. It actually makes no sense to specify
  1089. # maximum to be less than ARMv7, because it's the least
  1090. # requirement for run-time switch between platform-specific
  1091. # code paths. And without run-time switch performance would be
  1092. # equivalent to one for minimum. Secondly, there are some
  1093. # natural limitations that you'd have to accept and respect.
  1094. # Most notably you can *not* build "universal" binary for
  1095. # big-endian platform. This is because ARMv7 processor always
  1096. # picks instructions in little-endian order. Another similar
  1097. # limitation is that -mthumb can't "cross" -march=armv6t2
  1098. # boundary, because that's where it became Thumb-2. Well, this
  1099. # limitation is a bit artificial, because it's not really
  1100. # impossible, but it's deemed too tricky to support. And of
  1101. # course you have to be sure that your binutils are actually
  1102. # up to the task of handling maximum target platform. With all
  1103. # this in mind here is an example of how to configure
  1104. # "universal" build:
  1105. #
  1106. # ./Configure BSD-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
  1107. #
  1108. inherit_from => [ "BSD-generic32" ],
  1109. asm_arch => 'armv4',
  1110. perlasm_scheme => "linux32",
  1111. },
  1112. "bsdi-elf-gcc" => {
  1113. inherit_from => [ "BASE_unix" ],
  1114. CC => "gcc",
  1115. CFLAGS => "-fomit-frame-pointer -O3 -Wall",
  1116. lib_cppflags => "-DPERL5 -DL_ENDIAN",
  1117. ex_libs => add("-ldl"),
  1118. bn_ops => "BN_LLONG",
  1119. asm_arch => 'x86',
  1120. perlasm_scheme => "elf",
  1121. thread_scheme => "(unknown)",
  1122. dso_scheme => "dlfcn",
  1123. shared_target => "bsd-gcc-shared",
  1124. shared_cflag => "-fPIC",
  1125. },
  1126. #### SCO/Caldera targets.
  1127. #
  1128. # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
  1129. # Now we only have blended unixware-* as it's the only one used by ./config.
  1130. # If you want to optimize for particular microarchitecture, bypass ./config
  1131. # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
  1132. # Note that not all targets include assembler support. Mostly because of
  1133. # lack of motivation to support out-of-date platforms with out-of-date
  1134. # compiler drivers and assemblers.
  1135. #
  1136. # UnixWare 2.0x fails destest with -O.
  1137. "unixware-2.0" => {
  1138. inherit_from => [ "BASE_unix" ],
  1139. CC => "cc",
  1140. cflags => threads("-Kthread"),
  1141. lib_cppflags => "-DFILIO_H -DNO_STRINGS_H",
  1142. ex_libs => add("-lsocket -lnsl -lresolv -lx"),
  1143. thread_scheme => "uithreads",
  1144. },
  1145. "unixware-2.1" => {
  1146. inherit_from => [ "BASE_unix" ],
  1147. CC => "cc",
  1148. CFLAGS => "-O",
  1149. cflags => threads("-Kthread"),
  1150. lib_cppflags => "-DFILIO_H",
  1151. ex_libs => add("-lsocket -lnsl -lresolv -lx"),
  1152. thread_scheme => "uithreads",
  1153. },
  1154. "unixware-7" => {
  1155. inherit_from => [ "BASE_unix" ],
  1156. CC => "cc",
  1157. CFLAGS => "-O",
  1158. cflags => combine("-Kalloca", threads("-Kthread")),
  1159. lib_cppflags => "-DFILIO_H",
  1160. ex_libs => add("-lsocket -lnsl"),
  1161. thread_scheme => "uithreads",
  1162. bn_ops => "BN_LLONG",
  1163. asm_arch => 'x86',
  1164. perlasm_scheme => "elf-1",
  1165. dso_scheme => "dlfcn",
  1166. shared_target => "svr5-shared",
  1167. shared_cflag => "-Kpic",
  1168. },
  1169. "unixware-7-gcc" => {
  1170. inherit_from => [ "BASE_unix" ],
  1171. CC => "gcc",
  1172. CFLAGS => "-O3 -fomit-frame-pointer -Wall",
  1173. cppflags => add(threads("-D_REENTRANT")),
  1174. lib_cppflags => add("-DL_ENDIAN -DFILIO_H"),
  1175. ex_libs => add("-lsocket -lnsl"),
  1176. bn_ops => "BN_LLONG",
  1177. thread_scheme => "pthreads",
  1178. asm_arch => 'x86',
  1179. perlasm_scheme => "elf-1",
  1180. dso_scheme => "dlfcn",
  1181. shared_target => "gnu-shared",
  1182. shared_cflag => "-fPIC",
  1183. },
  1184. # SCO 5 - Ben Laurie says the -O breaks the SCO cc.
  1185. "sco5-cc" => {
  1186. inherit_from => [ "BASE_unix" ],
  1187. cc => "cc",
  1188. cflags => "-belf",
  1189. ex_libs => add("-lsocket -lnsl"),
  1190. thread_scheme => "(unknown)",
  1191. asm_arch => 'x86',
  1192. perlasm_scheme => "elf-1",
  1193. dso_scheme => "dlfcn",
  1194. shared_target => "svr3-shared",
  1195. shared_cflag => "-Kpic",
  1196. },
  1197. "sco5-gcc" => {
  1198. inherit_from => [ "BASE_unix" ],
  1199. cc => "gcc",
  1200. cflags => "-O3 -fomit-frame-pointer",
  1201. ex_libs => add("-lsocket -lnsl"),
  1202. bn_ops => "BN_LLONG",
  1203. thread_scheme => "(unknown)",
  1204. asm_arch => 'x86',
  1205. perlasm_scheme => "elf-1",
  1206. dso_scheme => "dlfcn",
  1207. shared_target => "svr3-shared",
  1208. shared_cflag => "-fPIC",
  1209. },
  1210. #### IBM's AIX.
  1211. # Below targets assume AIX >=5. Caveat lector. If you are accustomed
  1212. # to control compilation "bitness" by setting $OBJECT_MODE environment
  1213. # variable, then you should know that in OpenSSL case it's considered
  1214. # only in ./config. Once configured, build procedure remains "deaf" to
  1215. # current value of $OBJECT_MODE.
  1216. "aix-common" => {
  1217. inherit_from => [ "BASE_unix" ],
  1218. template => 1,
  1219. sys_id => "AIX",
  1220. lib_cppflags => "-DB_ENDIAN",
  1221. lflags => "-Wl,-bsvr4",
  1222. thread_scheme => "pthreads",
  1223. dso_scheme => "dlfcn",
  1224. shared_target => "aix",
  1225. module_ldflags => "-Wl,-G,-bsymbolic,-bnoentry",
  1226. shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry",
  1227. shared_defflag => "-Wl,-bE:",
  1228. shared_fipsflag => "-Wl,-binitfini:_init:_cleanup",
  1229. perl_platform => 'AIX',
  1230. },
  1231. "aix-gcc" => {
  1232. inherit_from => [ "aix-common" ],
  1233. CC => "gcc",
  1234. CFLAGS => picker(debug => "-O0 -g",
  1235. release => "-O"),
  1236. cflags => add(threads("-pthread")),
  1237. ex_libs => add(threads("-pthread")),
  1238. bn_ops => "BN_LLONG RC4_CHAR",
  1239. asm_arch => 'ppc32',
  1240. perlasm_scheme => "aix32",
  1241. shared_ldflag => add_before("-shared -static-libgcc"),
  1242. AR => add("-X32"),
  1243. RANLIB => add("-X32"),
  1244. },
  1245. "aix64-gcc" => {
  1246. inherit_from => [ "aix-common" ],
  1247. CC => "gcc",
  1248. CFLAGS => picker(debug => "-O0 -g",
  1249. release => "-O"),
  1250. cflags => combine("-maix64", threads("-pthread")),
  1251. ex_libs => add(threads("-pthread")),
  1252. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  1253. asm_arch => 'ppc64',
  1254. perlasm_scheme => "aix64",
  1255. shared_ldflag => add_before("-shared -static-libgcc"),
  1256. shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
  1257. AR => add("-X64"),
  1258. RANLIB => add("-X64"),
  1259. },
  1260. "aix64-gcc-as" => {
  1261. inherit_from => [ "aix64-gcc" ],
  1262. perlasm_scheme => "aix64-as",
  1263. },
  1264. "aix-cc" => {
  1265. inherit_from => [ "aix-common" ],
  1266. CC => "cc",
  1267. CFLAGS => picker(debug => "-O0 -g",
  1268. release => "-O"),
  1269. cflags => combine("-q32 -qmaxmem=16384 -qro -qroconst",
  1270. threads("-qthreaded")),
  1271. cppflags => threads("-D_THREAD_SAFE"),
  1272. ex_libs => add(threads("-lpthreads")),
  1273. bn_ops => "BN_LLONG RC4_CHAR",
  1274. asm_arch => 'ppc32',
  1275. perlasm_scheme => "aix32",
  1276. shared_cflag => "-qpic",
  1277. AR => add("-X32"),
  1278. RANLIB => add("-X32"),
  1279. },
  1280. "aix64-cc" => {
  1281. inherit_from => [ "aix-common" ],
  1282. CC => "cc",
  1283. CFLAGS => picker(debug => "-O0 -g",
  1284. release => "-O"),
  1285. cflags => combine("-q64 -qmaxmem=16384 -qro -qroconst",
  1286. threads("-qthreaded")),
  1287. cppflags => threads("-D_THREAD_SAFE"),
  1288. ex_libs => add(threads("-lpthreads")),
  1289. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  1290. asm_arch => 'ppc64',
  1291. perlasm_scheme => "aix64",
  1292. dso_scheme => "dlfcn",
  1293. shared_cflag => "-qpic",
  1294. shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)",
  1295. AR => add("-X64"),
  1296. RANLIB => add("-X64"),
  1297. },
  1298. # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
  1299. "BS2000-OSD" => {
  1300. inherit_from => [ "BASE_unix" ],
  1301. CC => "c89",
  1302. CFLAGS => "-O",
  1303. cflags => "-XLLML -XLLMK -XL",
  1304. cppflags => "-DCHARSET_EBCDIC",
  1305. lib_cppflags => "-DB_ENDIAN",
  1306. ex_libs => add("-lsocket -lnsl"),
  1307. bn_ops => "THIRTY_TWO_BIT RC4_CHAR",
  1308. thread_scheme => "(unknown)",
  1309. },
  1310. #### Visual C targets
  1311. #
  1312. # Win64 targets, WIN64I denotes IA-64/Itanium and WIN64A - AMD64
  1313. #
  1314. # Note about /wd4090, disable warning C4090. This warning returns false
  1315. # positives in some situations. Disabling it altogether masks both
  1316. # legitimate and false cases, but as we compile on multiple platforms,
  1317. # we rely on other compilers to catch legitimate cases.
  1318. #
  1319. # Also note that we force threads no matter what. Configuring "no-threads"
  1320. # is ignored.
  1321. #
  1322. # UNICODE is defined in VC-common and applies to all targets. It used to
  1323. # be an opt-in option for VC-WIN32, but not anymore. The original reason
  1324. # was because ANSI API was *native* system interface for no longer
  1325. # supported Windows 9x. Keep in mind that UNICODE only affects how
  1326. # OpenSSL libraries interact with underlying OS, it doesn't affect API
  1327. # that OpenSSL presents to application.
  1328. "VC-common" => {
  1329. inherit_from => [ "BASE_Windows" ],
  1330. template => 1,
  1331. CC => "cl",
  1332. CPP => '$(CC) /EP /C',
  1333. CFLAGS => "/W3 /wd4090 /nologo",
  1334. coutflag => "/Fo",
  1335. LD => "link",
  1336. LDFLAGS => "/nologo /debug",
  1337. ldoutflag => "/out:",
  1338. ldpostoutflag => "",
  1339. ld_resp_delim => "\n",
  1340. bin_lflags => "setargv.obj",
  1341. makedepcmd => '$(CC) /Zs /showIncludes',
  1342. makedep_scheme => 'VC',
  1343. AR => "lib",
  1344. ARFLAGS => "/nologo",
  1345. aroutflag => "/out:",
  1346. ar_resp_delim => "\n",
  1347. RC => "rc",
  1348. rcoutflag => "/fo",
  1349. defines => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN",
  1350. "UNICODE", "_UNICODE",
  1351. "_CRT_SECURE_NO_DEPRECATE",
  1352. "_WINSOCK_DEPRECATED_NO_WARNINGS"),
  1353. lib_cflags => add("/Zi /Fdossl_static.pdb"),
  1354. lib_defines => add("L_ENDIAN"),
  1355. dso_cflags => "/Zi /Fddso.pdb",
  1356. bin_cflags => "/Zi /Fdapp.pdb",
  1357. # def_flag made to empty string so a .def file gets generated
  1358. shared_defflag => '',
  1359. shared_ldflag => "/dll",
  1360. shared_target => "win-shared", # meaningless except it gives Configure a hint
  1361. lddefflag => "/def:",
  1362. ldresflag => " ",
  1363. ld_implib_flag => "/implib:",
  1364. thread_scheme => "winthreads",
  1365. dso_scheme => "win32",
  1366. perl_platform => 'Windows::MSVC',
  1367. # additional parameter to build_scheme denotes install-path "flavour"
  1368. build_scheme => add("VC-common", { separator => undef }),
  1369. },
  1370. "VC-noCE-common" => {
  1371. inherit_from => [ "VC-common" ],
  1372. template => 1,
  1373. CFLAGS => add(picker(debug => '/Od',
  1374. release => '/O2')),
  1375. cflags => add(picker(default => '/Gs0 /GF /Gy',
  1376. debug =>
  1377. sub {
  1378. ($disabled{shared} ? "" : "/MDd");
  1379. },
  1380. release =>
  1381. sub {
  1382. ($disabled{shared} ? "" : "/MD");
  1383. })),
  1384. defines => add(picker(default => [], # works as type cast
  1385. debug => [ "DEBUG", "_DEBUG" ])),
  1386. lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
  1387. # Following might/should appears controversial, i.e. defining
  1388. # /MDd without evaluating $disabled{shared}. It works in
  1389. # non-shared build because static library is compiled with /Zl
  1390. # and bares no reference to specific RTL. And it works in
  1391. # shared build because multiple /MDd options are not prohibited.
  1392. # But why /MDd in static build? Well, basically this is just a
  1393. # reference point, which allows to catch eventual errors that
  1394. # would prevent those who want to wrap OpenSSL into own .DLL.
  1395. # Why not /MD in release build then? Well, some are likely to
  1396. # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
  1397. # redistributable.
  1398. bin_cflags => add(picker(debug => "/MDd",
  1399. release => sub { $disabled{shared} ? "/MT" : () },
  1400. )),
  1401. bin_lflags => add("/subsystem:console /opt:ref"),
  1402. ex_libs => add(sub {
  1403. my @ex_libs = ();
  1404. push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
  1405. push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
  1406. return join(" ", @ex_libs);
  1407. }),
  1408. },
  1409. "VC-WIN64-common" => {
  1410. inherit_from => [ "VC-noCE-common" ],
  1411. template => 1,
  1412. ex_libs => add(sub {
  1413. my @ex_libs = ();
  1414. push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
  1415. return join(" ", @_, @ex_libs);
  1416. }),
  1417. bn_ops => add("SIXTY_FOUR_BIT"),
  1418. },
  1419. "VC-WIN64I" => {
  1420. inherit_from => [ "VC-WIN64-common" ],
  1421. AS => "ias",
  1422. ASFLAGS => "-d debug",
  1423. asoutflag => "-o ",
  1424. sys_id => "WIN64I",
  1425. uplink_arch => 'ia64',
  1426. asm_arch => 'ia64',
  1427. perlasm_scheme => "ias",
  1428. multilib => "-ia64",
  1429. },
  1430. "VC-WIN64A" => {
  1431. inherit_from => [ "VC-WIN64-common" ],
  1432. AS => sub { vc_win64a_info()->{AS} },
  1433. ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} },
  1434. asoutflag => sub { vc_win64a_info()->{asoutflag} },
  1435. asflags => sub { vc_win64a_info()->{asflags} },
  1436. sys_id => "WIN64A",
  1437. uplink_arch => 'x86_64',
  1438. asm_arch => 'x86_64',
  1439. perlasm_scheme => "auto",
  1440. multilib => "-x64",
  1441. },
  1442. "VC-WIN32" => {
  1443. inherit_from => [ "VC-noCE-common" ],
  1444. AS => sub { vc_win32_info()->{AS} },
  1445. ASFLAGS => sub { vc_win32_info()->{ASFLAGS} },
  1446. asoutflag => sub { vc_win32_info()->{asoutflag} },
  1447. asflags => sub { vc_win32_info()->{asflags} },
  1448. sys_id => "WIN32",
  1449. bn_ops => add("BN_LLONG"),
  1450. uplink_arch => 'common',
  1451. asm_arch => 'x86',
  1452. perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
  1453. # "WOW" stands for "Windows on Windows", and "VC-WOW" engages
  1454. # some installation path heuristics in windows-makefile.tmpl...
  1455. build_scheme => add("VC-WOW", { separator => undef }),
  1456. },
  1457. "VC-CE" => {
  1458. inherit_from => [ "VC-common" ],
  1459. CFLAGS => add(picker(debug => "/Od",
  1460. release => "/O1i")),
  1461. CPPDEFINES => picker(debug => [ "DEBUG", "_DEBUG" ]),
  1462. LDFLAGS => add("/nologo /opt:ref"),
  1463. cflags =>
  1464. combine('/GF /Gy',
  1465. sub { vc_wince_info()->{cflags}; },
  1466. sub { `cl 2>&1` =~ /Version ([0-9]+)\./ && $1>=14
  1467. ? ($disabled{shared} ? " /MT" : " /MD")
  1468. : " /MC"; }),
  1469. cppflags => sub { vc_wince_info()->{cppflags}; },
  1470. lib_defines => add("NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT"),
  1471. lib_cppflags => sub { vc_wince_info()->{cppflags}; },
  1472. includes =>
  1473. add(combine(sub { defined(env('WCECOMPAT'))
  1474. ? '$(WCECOMPAT)/include' : (); },
  1475. sub { defined(env('PORTSDK_LIBPATH'))
  1476. ? '$(PORTSDK_LIBPATH)/../../include'
  1477. : (); })),
  1478. lflags => add(combine(sub { vc_wince_info()->{lflags}; },
  1479. sub { defined(env('PORTSDK_LIBPATH'))
  1480. ? "/entry:mainCRTstartup" : (); })),
  1481. sys_id => "WINCE",
  1482. bn_ops => add("BN_LLONG"),
  1483. ex_libs => add(sub {
  1484. my @ex_libs = ();
  1485. push @ex_libs, 'ws2.lib' unless $disabled{sock};
  1486. push @ex_libs, 'crypt32.lib';
  1487. if (defined(env('WCECOMPAT'))) {
  1488. my $x = '$(WCECOMPAT)/lib';
  1489. if (-f "$x/env('TARGETCPU')/wcecompatex.lib") {
  1490. $x .= '/$(TARGETCPU)/wcecompatex.lib';
  1491. } else {
  1492. $x .= '/wcecompatex.lib';
  1493. }
  1494. push @ex_libs, $x;
  1495. }
  1496. push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
  1497. if (defined(env('PORTSDK_LIBPATH')));
  1498. push @ex_libs, '/nodefaultlib coredll.lib corelibc.lib'
  1499. if (env('TARGETCPU') =~ /^X86|^ARMV4[IT]/);
  1500. return join(" ", @ex_libs);
  1501. }),
  1502. },
  1503. #### MinGW
  1504. "mingw-common" => {
  1505. inherit_from => [ 'BASE_unix' ],
  1506. template => 1,
  1507. CC => "gcc",
  1508. CFLAGS => picker(default => "-Wall",
  1509. debug => "-g -O0",
  1510. release => "-O3"),
  1511. cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN",
  1512. threads("-D_MT")),
  1513. lib_cppflags => "-DL_ENDIAN",
  1514. ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
  1515. thread_scheme => "winthreads",
  1516. dso_scheme => "win32",
  1517. shared_target => "mingw-shared",
  1518. shared_cppflags => add("_WINDLL"),
  1519. shared_ldflag => "-static-libgcc",
  1520. perl_platform => 'mingw',
  1521. },
  1522. "mingw" => {
  1523. inherit_from => [ "mingw-common" ],
  1524. CFLAGS => add(picker(release => "-fomit-frame-pointer")),
  1525. cflags => "-m32",
  1526. sys_id => "MINGW32",
  1527. bn_ops => add("BN_LLONG"),
  1528. asm_arch => 'x86',
  1529. uplink_arch => 'x86',
  1530. perlasm_scheme => "coff",
  1531. shared_rcflag => "--target=pe-i386",
  1532. multilib => "",
  1533. },
  1534. "mingw64" => {
  1535. # As for uplink_arch. Applink makes it possible to use
  1536. # .dll compiled with one compiler with application compiled with
  1537. # another compiler. It's possible to engage Applink support in
  1538. # mingw64 build, but it's not done, because until mingw64
  1539. # supports structured exception handling, one can't seriously
  1540. # consider its binaries for using with non-mingw64 run-time
  1541. # environment. And as mingw64 is always consistent with itself,
  1542. # Applink is never engaged and can as well be omitted.
  1543. inherit_from => [ "mingw-common" ],
  1544. cflags => "-m64",
  1545. sys_id => "MINGW64",
  1546. bn_ops => add("SIXTY_FOUR_BIT"),
  1547. asm_arch => 'x86_64',
  1548. uplink_arch => undef,
  1549. perlasm_scheme => "mingw64",
  1550. shared_rcflag => "--target=pe-x86-64",
  1551. multilib => "64",
  1552. },
  1553. #### UEFI
  1554. "UEFI" => {
  1555. inherit_from => [ "BASE_unix" ],
  1556. CC => "cc",
  1557. CFLAGS => "-O",
  1558. lib_cppflags => "-DL_ENDIAN",
  1559. sys_id => "UEFI",
  1560. },
  1561. "UEFI-x86" => {
  1562. inherit_from => [ "UEFI" ],
  1563. asm_arch => 'x86',
  1564. perlasm_scheme => "win32n",
  1565. },
  1566. "UEFI-x86_64" => {
  1567. inherit_from => [ "UEFI" ],
  1568. asm_arch => 'x86_64',
  1569. perlasm_scheme => "nasm",
  1570. },
  1571. #### UWIN
  1572. "UWIN" => {
  1573. inherit_from => [ "BASE_unix" ],
  1574. CC => "cc",
  1575. CFLAGS => "-O -Wall",
  1576. lib_cppflags => "-DTERMIOS -DL_ENDIAN",
  1577. sys_id => "UWIN",
  1578. bn_ops => "BN_LLONG",
  1579. dso_scheme => "win32",
  1580. },
  1581. #### Cygwin
  1582. "Cygwin-common" => {
  1583. inherit_from => [ "BASE_unix" ],
  1584. template => 1,
  1585. CC => "gcc",
  1586. CFLAGS => picker(default => "-Wall",
  1587. debug => "-g -O0",
  1588. release => "-O3"),
  1589. lib_cppflags => "-DTERMIOS -DL_ENDIAN",
  1590. sys_id => "CYGWIN",
  1591. thread_scheme => "pthread",
  1592. dso_scheme => "dlfcn",
  1593. shared_target => "cygwin-shared",
  1594. shared_cppflags => "-D_WINDLL",
  1595. perl_platform => 'Cygwin',
  1596. },
  1597. "Cygwin-x86" => {
  1598. inherit_from => [ "Cygwin-common" ],
  1599. CFLAGS => add(picker(release => "-O3 -fomit-frame-pointer")),
  1600. bn_ops => "BN_LLONG",
  1601. asm_arch => 'x86',
  1602. perlasm_scheme => "coff",
  1603. },
  1604. "Cygwin-x86_64" => {
  1605. inherit_from => [ "Cygwin-common" ],
  1606. CC => "gcc",
  1607. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1608. asm_arch => 'x86_64',
  1609. perlasm_scheme => "mingw64",
  1610. },
  1611. # Backward compatibility for those using this target
  1612. "Cygwin" => {
  1613. inherit_from => [ "Cygwin-x86" ]
  1614. },
  1615. # In case someone constructs the Cygwin target name themself
  1616. "Cygwin-i386" => {
  1617. inherit_from => [ "Cygwin-x86" ]
  1618. },
  1619. "Cygwin-i486" => {
  1620. inherit_from => [ "Cygwin-x86" ]
  1621. },
  1622. "Cygwin-i586" => {
  1623. inherit_from => [ "Cygwin-x86" ]
  1624. },
  1625. "Cygwin-i686" => {
  1626. inherit_from => [ "Cygwin-x86" ]
  1627. },
  1628. ##### MacOS X (a.k.a. Darwin) setup
  1629. "darwin-common" => {
  1630. inherit_from => [ "BASE_unix" ],
  1631. template => 1,
  1632. CC => "cc",
  1633. CFLAGS => picker(debug => "-g -O0",
  1634. release => "-O3"),
  1635. cppflags => threads("-D_REENTRANT"),
  1636. lflags => add("-Wl,-search_paths_first"),
  1637. sys_id => "MACOSX",
  1638. bn_ops => "BN_LLONG RC4_CHAR",
  1639. thread_scheme => "pthreads",
  1640. perlasm_scheme => "osx32",
  1641. dso_scheme => "dlfcn",
  1642. ranlib => "ranlib -c",
  1643. shared_target => "darwin-shared",
  1644. shared_cflag => "-fPIC",
  1645. shared_extension => ".\$(SHLIB_VERSION_NUMBER).dylib",
  1646. },
  1647. # Option "freeze" such as -std=gnu9x can't negatively interfere
  1648. # with future defaults for below two targets, because MacOS X
  1649. # for PPC has no future, it was discontinued by vendor in 2009.
  1650. "darwin-ppc-cc" => { inherit_from => [ "darwin-ppc" ] }, # Historic alias
  1651. "darwin-ppc" => {
  1652. inherit_from => [ "darwin-common" ],
  1653. cflags => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"),
  1654. lib_cppflags => add("-DB_ENDIAN"),
  1655. shared_cflag => add("-fno-common"),
  1656. asm_arch => 'ppc32',
  1657. perlasm_scheme => "osx32",
  1658. },
  1659. "darwin64-ppc-cc" => { inherit_from => [ "darwin64-ppc" ] }, # Historic alias
  1660. "darwin64-ppc" => {
  1661. inherit_from => [ "darwin-common" ],
  1662. cflags => add("-arch ppc64 -std=gnu9x"),
  1663. lib_cppflags => add("-DB_ENDIAN"),
  1664. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  1665. asm_arch => 'ppc64',
  1666. perlasm_scheme => "osx64",
  1667. },
  1668. "darwin-i386-cc" => { inherit_from => [ "darwin-i386" ] }, # Historic alias
  1669. "darwin-i386" => {
  1670. inherit_from => [ "darwin-common" ],
  1671. CFLAGS => add(picker(release => "-fomit-frame-pointer")),
  1672. cflags => add("-arch i386"),
  1673. lib_cppflags => add("-DL_ENDIAN"),
  1674. bn_ops => "BN_LLONG RC4_INT",
  1675. asm_arch => 'x86',
  1676. perlasm_scheme => "macosx",
  1677. },
  1678. "darwin64-x86_64-cc" => { inherit_from => [ "darwin64-x86_64" ] }, # Historic alias
  1679. "darwin64-x86_64" => {
  1680. inherit_from => [ "darwin-common" ],
  1681. CFLAGS => add("-Wall"),
  1682. cflags => add("-arch x86_64"),
  1683. lib_cppflags => add("-DL_ENDIAN"),
  1684. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1685. asm_arch => 'x86_64',
  1686. perlasm_scheme => "macosx",
  1687. },
  1688. "darwin64-arm64-cc" => { inherit_from => [ "darwin64-arm64" ] }, # "Historic" alias
  1689. "darwin64-arm64" => {
  1690. inherit_from => [ "darwin-common" ],
  1691. CFLAGS => add("-Wall"),
  1692. cflags => add("-arch arm64"),
  1693. lib_cppflags => add("-DL_ENDIAN"),
  1694. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1695. asm_arch => 'aarch64',
  1696. perlasm_scheme => "ios64",
  1697. },
  1698. ##### GNU Hurd
  1699. "hurd-x86" => {
  1700. inherit_from => [ "BASE_unix" ],
  1701. CC => "gcc",
  1702. CFLAGS => "-O3 -fomit-frame-pointer -Wall",
  1703. cflags => threads("-pthread"),
  1704. lib_cppflags => "-DL_ENDIAN",
  1705. ex_libs => add("-ldl", threads("-pthread")),
  1706. bn_ops => "BN_LLONG",
  1707. asm_arch => 'x86',
  1708. perlasm_scheme => 'elf',
  1709. thread_scheme => "pthreads",
  1710. dso_scheme => "dlfcn",
  1711. shared_target => "linux-shared",
  1712. shared_cflag => "-fPIC",
  1713. },
  1714. ##### VxWorks for various targets
  1715. "vxworks-ppc60x" => {
  1716. inherit_from => [ "BASE_unix" ],
  1717. CC => "ccppc",
  1718. CFLAGS => "-O2 -Wall -fstrength-reduce",
  1719. cflags => "-mrtp -mhard-float -mstrict-align -fno-implicit-fp -fno-builtin -fno-strict-aliasing",
  1720. cppflags => combine("-D_REENTRANT -DPPC32_fp60x -DCPU=PPC32",
  1721. "_DTOOL_FAMILY=gnu -DTOOL=gnu",
  1722. "-I\$(WIND_BASE)/target/usr/h",
  1723. "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),
  1724. sys_id => "VXWORKS",
  1725. lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
  1726. ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
  1727. },
  1728. "vxworks-ppcgen" => {
  1729. inherit_from => [ "BASE_unix" ],
  1730. CC => "ccppc",
  1731. CFLAGS => "-O1 -Wall",
  1732. cflags => "-mrtp -msoft-float -mstrict-align -fno-builtin -fno-strict-aliasing",
  1733. cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC32",
  1734. "-DTOOL_FAMILY=gnu -DTOOL=gnu",
  1735. "-I\$(WIND_BASE)/target/usr/h",
  1736. "-I\$(WIND_BASE)/target/usr/h/wrn/coreip"),
  1737. sys_id => "VXWORKS",
  1738. lflags => add("-L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
  1739. ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
  1740. },
  1741. "vxworks-ppc405" => {
  1742. inherit_from => [ "BASE_unix" ],
  1743. CC => "ccppc",
  1744. CFLAGS => "-g",
  1745. cflags => "-msoft-float -mlongcall",
  1746. cppflags => combine("-D_REENTRANT -DPPC32 -DCPU=PPC405",
  1747. "-DTOOL_FAMILY=gnu -DTOOL=gnu",
  1748. "-I\$(WIND_BASE)/target/h"),
  1749. sys_id => "VXWORKS",
  1750. lflags => add("-r"),
  1751. },
  1752. "vxworks-ppc750" => {
  1753. inherit_from => [ "BASE_unix" ],
  1754. CC => "ccppc",
  1755. CFLAGS => "-ansi -fvolatile -Wall \$(DEBUG_FLAG)",
  1756. cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",
  1757. cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",
  1758. "-I\$(WIND_BASE)/target/h"),
  1759. sys_id => "VXWORKS",
  1760. lflags => add("-r"),
  1761. },
  1762. "vxworks-ppc750-debug" => {
  1763. inherit_from => [ "BASE_unix" ],
  1764. CC => "ccppc",
  1765. CFLAGS => "-ansi -fvolatile -Wall -g",
  1766. cflags => "-nostdinc -fno-builtin -fno-for-scope -fsigned-char -msoft-float -mlongcall",
  1767. cppflags => combine("-DPPC750 -D_REENTRANT -DCPU=PPC604",
  1768. "-DPEDANTIC -DDEBUG",
  1769. "-I\$(WIND_BASE)/target/h"),
  1770. sys_id => "VXWORKS",
  1771. lflags => add("-r"),
  1772. },
  1773. "vxworks-ppc860" => {
  1774. inherit_from => [ "BASE_unix" ],
  1775. CC => "ccppc",
  1776. cflags => "-nostdinc -msoft-float",
  1777. cppflags => combine("-DCPU=PPC860 -DNO_STRINGS_H",
  1778. "-I\$(WIND_BASE)/target/h"),
  1779. sys_id => "VXWORKS",
  1780. lflags => add("-r"),
  1781. },
  1782. "vxworks-simlinux" => {
  1783. inherit_from => [ "BASE_unix" ],
  1784. CC => "ccpentium",
  1785. cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -fno-builtin -fno-defer-pop",
  1786. cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",
  1787. "-DL_ENDIAN -DCPU=SIMLINUX -DNO_STRINGS_H",
  1788. "-DTOOL_FAMILY=gnu -DTOOL=gnu",
  1789. "-DOPENSSL_NO_HW_PADLOCK",
  1790. "-I\$(WIND_BASE)/target/h",
  1791. "-I\$(WIND_BASE)/target/h/wrn/coreip"),
  1792. sys_id => "VXWORKS",
  1793. lflags => add("-r"),
  1794. ranlib => "ranlibpentium",
  1795. },
  1796. "vxworks-mips" => {
  1797. inherit_from => [ "BASE_unix" ],
  1798. CC => "ccmips",
  1799. CFLAGS => "-O -G 0",
  1800. cflags => "-mrtp -mips2 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -msoft-float -mno-branch-likely -fno-builtin -fno-defer-pop",
  1801. cppflags => combine("-D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\"",
  1802. "-DCPU=MIPS32 -DNO_STRINGS_H",
  1803. "-DTOOL_FAMILY=gnu -DTOOL=gnu",
  1804. "-DOPENSSL_NO_HW_PADLOCK",
  1805. threads("-D_REENTRANT"),
  1806. "-I\$(WIND_BASE)/target/h",
  1807. "-I\$(WIND_BASE)/target/h/wrn/coreip"),
  1808. sys_id => "VXWORKS",
  1809. lflags => add("-L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
  1810. ex_libs => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000"),
  1811. thread_scheme => "pthreads",
  1812. asm_arch => 'mips32',
  1813. perlasm_scheme => "o32",
  1814. ranlib => "ranlibmips",
  1815. },
  1816. #### uClinux
  1817. "uClinux-dist" => {
  1818. inherit_from => [ "BASE_unix" ],
  1819. CC => sub { env('CC') },
  1820. cppflags => threads("-D_REENTRANT"),
  1821. ex_libs => add("\$(LDLIBS)"),
  1822. bn_ops => "BN_LLONG",
  1823. thread_scheme => "pthreads",
  1824. dso_scheme => sub { env('LIBSSL_dlfcn') },
  1825. shared_target => "linux-shared",
  1826. shared_cflag => "-fPIC",
  1827. ranlib => sub { env('RANLIB') },
  1828. },
  1829. "uClinux-dist64" => {
  1830. inherit_from => [ "BASE_unix" ],
  1831. CC => sub { env('CC') },
  1832. cppflags => threads("-D_REENTRANT"),
  1833. ex_libs => add("\$(LDLIBS)"),
  1834. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1835. thread_scheme => "pthreads",
  1836. dso_scheme => sub { env('LIBSSL_dlfcn') },
  1837. shared_target => "linux-shared",
  1838. shared_cflag => "-fPIC",
  1839. ranlib => sub { env('RANLIB') },
  1840. },
  1841. ##### VMS
  1842. # Most things happen in vms-generic.
  1843. # Note that vms_info extracts the pointer size from the end of
  1844. # the target name, and will assume that anything matching /-p\d+$/
  1845. # indicates the pointer size setting for the desired target.
  1846. "vms-generic" => {
  1847. inherit_from => [ "BASE_VMS" ],
  1848. template => 1,
  1849. CC => "CC/DECC",
  1850. CPP => '$(CC)/PREPROCESS_ONLY=SYS$OUTPUT:',
  1851. CFLAGS =>
  1852. combine(picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL",
  1853. debug => "/NOOPTIMIZE/DEBUG",
  1854. release => "/OPTIMIZE/NODEBUG"),
  1855. sub { my @warnings =
  1856. @{vms_info()->{disable_warns}};
  1857. @warnings
  1858. ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
  1859. cflag_incfirst => '/FIRST_INCLUDE=',
  1860. lib_defines =>
  1861. add("OPENSSL_USE_NODELETE",
  1862. sub {
  1863. return vms_info()->{def_zlib}
  1864. ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();
  1865. }),
  1866. lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'",
  1867. debug => "/DEBUG/TRACEBACK",
  1868. release => "/NODEBUG/NOTRACEBACK"),
  1869. # Because of dso_cflags below, we can't set the generic |cflags| here,
  1870. # as it can't be overridden, so we set separate C flags for libraries
  1871. # and binaries instead.
  1872. bin_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
  1873. lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
  1874. # Strictly speaking, DSOs should not need to have name shortening,
  1875. # as all their exported symbols should be short enough to fit the
  1876. # linker's 31 character per symbol name limit. However, providers
  1877. # may be composed of more than one object file, and internal symbols
  1878. # may and do surpass the 31 character limit.
  1879. dso_cflags => add("/NAMES=(SHORTENED)"),
  1880. ex_libs => add(sub { return vms_info()->{zlib} || (); }),
  1881. shared_target => "vms-shared",
  1882. # def_flag made to empty string so a .opt file gets generated
  1883. shared_defflag => '',
  1884. dso_scheme => "vms",
  1885. thread_scheme => "pthreads",
  1886. makedep_scheme => 'VMS C',
  1887. AS => sub { vms_info()->{AS} },
  1888. ASFLAGS => sub { vms_info()->{ASFLAGS} },
  1889. asoutflag => sub { vms_info()->{asoutflag} },
  1890. asflags => sub { vms_info()->{asflags} },
  1891. perlasm_scheme => sub { vms_info()->{perlasm_scheme} },
  1892. disable => add('pinshared', 'loadereng'),
  1893. },
  1894. # From HELP CC/POINTER_SIZE:
  1895. #
  1896. # ----------
  1897. # LONG[=ARGV] The compiler assumes 64-bit pointers. If the ARGV option to
  1898. # LONG or 64 is present, the main argument argv will be an
  1899. # array of long pointers instead of an array of short pointers.
  1900. #
  1901. # 64[=ARGV] Same as LONG.
  1902. # ----------
  1903. #
  1904. # We don't want the hassle of dealing with 32-bit pointers with argv, so
  1905. # we force it to have 64-bit pointers, see the added cflags in the -p64
  1906. # config targets below.
  1907. "vms-alpha" => {
  1908. inherit_from => [ "vms-generic" ],
  1909. bn_ops => "SIXTY_FOUR_BIT RC4_INT",
  1910. pointer_size => "",
  1911. },
  1912. "vms-alpha-p32" => {
  1913. inherit_from => [ "vms-alpha" ],
  1914. cflags => add("/POINTER_SIZE=32"),
  1915. pointer_size => "32",
  1916. },
  1917. "vms-alpha-p64" => {
  1918. inherit_from => [ "vms-alpha" ],
  1919. cflags => add("/POINTER_SIZE=64=ARGV"),
  1920. pointer_size => "64",
  1921. },
  1922. "vms-ia64" => {
  1923. inherit_from => [ "vms-generic" ],
  1924. bn_ops => "SIXTY_FOUR_BIT RC4_INT",
  1925. asm_arch => sub { vms_info()->{AS} ? 'ia64' : undef },
  1926. perlasm_scheme => 'ias',
  1927. pointer_size => "",
  1928. },
  1929. "vms-ia64-p32" => {
  1930. inherit_from => [ "vms-ia64" ],
  1931. cflags => add("/POINTER_SIZE=32"),
  1932. pointer_size => "32",
  1933. },
  1934. "vms-ia64-p64" => {
  1935. inherit_from => [ "vms-ia64" ],
  1936. cflags => add("/POINTER_SIZE=64=ARGV"),
  1937. pointer_size => "64",
  1938. },
  1939. );