10-main.conf 91 KB

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