10-main.conf 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505
  1. ## Standard openssl configuration targets.
  2. ##
  3. ## If you edit this file, run this command before committing
  4. ## make -f Makefile.org TABLE
  5. ## This file is interpolated by the Configure script.
  6. %targets = (
  7. #### Basic configs that should work on any 32-bit box
  8. "gcc" => {
  9. cc => "gcc",
  10. cflags => "",
  11. debug_cflags => "-O0 -g",
  12. release_cflags => "-O3",
  13. thread_cflag => "(unknown)",
  14. bn_ops => "BN_LLONG",
  15. },
  16. "cc" => {
  17. cc => "cc",
  18. cflags => "-O",
  19. thread_cflag => "(unknown)",
  20. },
  21. #### VOS Configurations
  22. "vos-gcc" => {
  23. cc => "gcc",
  24. cflags => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
  25. debug_cflags => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG",
  26. release_cflags => "-O3",
  27. thread_cflag => "(unknown)",
  28. sys_id => "VOS",
  29. lflags => "-Wl,-map",
  30. bn_ops => "BN_LLONG",
  31. shared_extension => ".so",
  32. },
  33. #### Solaris x86 with GNU C setups
  34. "solaris-x86-gcc" => {
  35. # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have
  36. # to do it here because whenever GNU C instantiates an assembler
  37. # template it surrounds it with #APP #NO_APP comment pair which
  38. # (at least Solaris 7_x86) /usr/ccs/bin/as fails to assemble
  39. # with "Illegal mnemonic" error message.
  40. inherit_from => [ asm("x86_elf_asm") ],
  41. cc => "gcc",
  42. cflags => "-march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM",
  43. debug_cflags => "-O0 -g",
  44. release_cflags => "-O3 -fomit-frame-pointer",
  45. thread_cflag => "-D_REENTRANT",
  46. lflags => "-lsocket -lnsl -ldl",
  47. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  48. dso_scheme => "dlfcn",
  49. shared_target => "solaris-shared",
  50. shared_cflag => "-fPIC",
  51. shared_ldflag => "-shared",
  52. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  53. },
  54. "solaris64-x86_64-gcc" => {
  55. # -shared -static-libgcc might appear controversial, but modules
  56. # taken from static libgcc do not have relocations and linking
  57. # them into our shared objects doesn't have any negative side
  58. # effects. On the contrary, doing so makes it possible to use
  59. # gcc shared build with Sun C. Given that gcc generates faster
  60. # code [thanks to inline assembler], I would actually recommend
  61. # to consider using gcc shared build even with vendor compiler:-)
  62. # <appro@fy.chalmers.se>
  63. inherit_from => [ asm("x86_64_asm") ],
  64. cc => "gcc",
  65. cflags => "-m64 -Wall -DL_ENDIAN",
  66. debug_cflags => "-O0 -g",
  67. release_cflags => "-O3",
  68. thread_cflag => "-D_REENTRANT",
  69. lflags => "-lsocket -lnsl -ldl",
  70. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
  71. perlasm_scheme => "elf",
  72. dso_scheme => "dlfcn",
  73. shared_target => "solaris-shared",
  74. shared_cflag => "-fPIC",
  75. shared_ldflag => "-m64 -shared -static-libgcc",
  76. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  77. multilib => "/64",
  78. },
  79. #### Solaris x86 with Sun C setups
  80. "solaris-x86-cc" => {
  81. cc => "cc",
  82. cflags => "-xarch=generic -xstrconst -Xa -DL_ENDIAN",
  83. debug_cflags => "-g",
  84. release_cflags => "-xO5 -xregs=frameptr -xdepend -xbuiltin",
  85. thread_cflag => "-D_REENTRANT",
  86. lflags => "-lsocket -lnsl -ldl",
  87. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR",
  88. dso_scheme => "dlfcn",
  89. shared_target => "solaris-shared",
  90. shared_cflag => "-KPIC",
  91. shared_ldflag => "-G -dy -z text",
  92. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  93. },
  94. "solaris64-x86_64-cc" => {
  95. inherit_from => [ asm("x86_64_asm") ],
  96. cc => "cc",
  97. cflags => "-xarch=generic64 -xstrconst -Xa -DL_ENDIAN",
  98. debug_cflags => "-g",
  99. release_cflags => "-xO5 -xdepend -xbuiltin",
  100. thread_cflag => "-D_REENTRANT",
  101. lflags => "-lsocket -lnsl -ldl",
  102. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
  103. perlasm_scheme => "elf",
  104. dso_scheme => "dlfcn",
  105. shared_target => "solaris-shared",
  106. shared_cflag => "-KPIC",
  107. shared_ldflag => "-xarch=generic64 -G -dy -z text",
  108. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  109. multilib => "/64",
  110. },
  111. #### SPARC Solaris with GNU C setups
  112. "solaris-sparcv7-gcc" => {
  113. cc => "gcc",
  114. cflags => "-Wall -DB_ENDIAN -DBN_DIV2W",
  115. debug_cflags => "-O0 -g",
  116. release_cflags => "-O3",
  117. thread_cflag => "-D_REENTRANT",
  118. lflags => "-lsocket -lnsl -ldl",
  119. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR",
  120. dso_scheme => "dlfcn",
  121. shared_target => "solaris-shared",
  122. shared_cflag => "-fPIC",
  123. shared_ldflag => "-shared",
  124. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  125. },
  126. "solaris-sparcv8-gcc" => {
  127. inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv8_asm") ],
  128. cflags => sub { join(" ","-mcpu=v8",@_); },
  129. },
  130. "solaris-sparcv9-gcc" => {
  131. # -m32 should be safe to add as long as driver recognizes
  132. # -mcpu=ultrasparc
  133. inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
  134. cc => "gcc",
  135. cflags => sub { join(" ","-m32 -mcpu=ultrasparc",@_); },
  136. debug_cflags => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__",
  137. release_cflags => "-O3",
  138. },
  139. "solaris64-sparcv9-gcc" => {
  140. inherit_from => [ "solaris-sparcv9-gcc" ],
  141. cc => "gcc",
  142. cflags => "-m64 -mcpu=ultrasparc -Wall -DB_ENDIAN",
  143. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR",
  144. shared_ldflag => "-m64 -shared",
  145. multilib => "/64",
  146. },
  147. #### SPARC Solaris with Sun C setups
  148. # SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
  149. # SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
  150. # SC5.0 note: Compiler common patch 107357-01 or later is required!
  151. "solaris-sparcv7-cc" => {
  152. cc => "cc",
  153. cflags => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
  154. debug_cflags => "-g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL",
  155. release_cflags => "-xO5 -xdepend",
  156. thread_cflag => "-D_REENTRANT",
  157. lflags => "-lsocket -lnsl -ldl",
  158. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR",
  159. dso_scheme => "dlfcn",
  160. shared_target => "solaris-shared",
  161. shared_cflag => "-KPIC",
  162. shared_ldflag => "-G -dy -z text",
  163. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  164. },
  165. ####
  166. "solaris-sparcv8-cc" => {
  167. inherit_from => [ "solaris-sparcv7-cc", asm("sparcv8_asm") ],
  168. cflags => sub { join(" ","-xarch=v8",@_); },
  169. },
  170. "solaris-sparcv9-cc" => {
  171. inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
  172. cflags => sub { join(" ","-xarch=v8plus -xtarget=ultra",@_); },
  173. },
  174. "solaris64-sparcv9-cc" => {
  175. inherit_from => [ "solaris-sparcv7-cc", asm("sparcv9_asm") ],
  176. cflags => sub { join(" ","-xarch=v9 -xtarget=ultra",@_); },
  177. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR",
  178. shared_ldflag => "-xarch=v9 -G -dy -z text",
  179. multilib => "/64",
  180. },
  181. #### IRIX 5.x configs
  182. # -mips2 flag is added by ./config when appropriate.
  183. "irix-gcc" => {
  184. inherit_from => [ asm("mips32_asm") ],
  185. cc => "gcc",
  186. cflags => "-DB_ENDIAN",
  187. debug_cflags => "-g -O0",
  188. release_cflags => "-O3",
  189. thread_cflag => "(unknown)",
  190. bn_ops => "BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR",
  191. perlasm_scheme => "o32",
  192. dso_scheme => "dlfcn",
  193. shared_target => "irix-shared",
  194. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  195. },
  196. "irix-cc" => {
  197. inherit_from => [ asm("mips32_asm") ],
  198. cc => "cc",
  199. cflags => "-use_readonly_const -DB_ENDIAN",
  200. debug_cflags => "-g -O0",
  201. release_cflags => "-O2",
  202. thread_cflag => "(unknown)",
  203. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR",
  204. perlasm_scheme => "o32",
  205. dso_scheme => "dlfcn",
  206. shared_target => "irix-shared",
  207. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  208. },
  209. #### IRIX 6.x configs
  210. # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
  211. # './Configure irix-cc -o32' manually.
  212. "irix-mips3-gcc" => {
  213. inherit_from => [ asm("mips64_asm") ],
  214. cc => "gcc",
  215. cflags => "-mabi=n32 -DB_ENDIAN -DBN_DIV3W",
  216. debug_cflags => "-g -O0",
  217. release_cflags => "-O3",
  218. thread_cflag => "-D_SGI_MP_SOURCE",
  219. bn_ops => "MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT",
  220. perlasm_scheme => "n32",
  221. dso_scheme => "dlfcn",
  222. shared_target => "irix-shared",
  223. shared_ldflag => "-mabi=n32",
  224. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  225. multilib => "32",
  226. },
  227. "irix-mips3-cc" => {
  228. inherit_from => [ asm("mips64_asm") ],
  229. cc => "cc",
  230. cflags => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
  231. debug_cflags => "-g -O0",
  232. release_cflags => "-O2",
  233. thread_cflag => "-D_SGI_MP_SOURCE",
  234. bn_ops => "DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT",
  235. perlasm_scheme => "n32",
  236. dso_scheme => "dlfcn",
  237. shared_target => "irix-shared",
  238. shared_ldflag => "-n32",
  239. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  240. multilib => "32",
  241. },
  242. # N64 ABI builds.
  243. "irix64-mips4-gcc" => {
  244. inherit_from => [ asm("mips64_asm") ],
  245. cc => "gcc",
  246. cflags => "-mabi=64 -mips4 -DB_ENDIAN -DBN_DIV3W",
  247. debug_cflags => "-g -O0",
  248. release_cflags => "-O3",
  249. thread_cflag => "-D_SGI_MP_SOURCE",
  250. bn_ops => "RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG",
  251. perlasm_scheme => "64",
  252. dso_scheme => "dlfcn",
  253. shared_target => "irix-shared",
  254. shared_ldflag => "-mabi=64",
  255. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  256. multilib => "64",
  257. },
  258. "irix64-mips4-cc" => {
  259. inherit_from => [ asm("mips64_asm") ],
  260. cc => "cc",
  261. cflags => "-64 -mips4 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W",
  262. debug_cflags => "-g -O0",
  263. release_cflags => "-O2",
  264. thread_cflag => "-D_SGI_MP_SOURCE",
  265. bn_ops => "RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG",
  266. perlasm_scheme => "64",
  267. dso_scheme => "dlfcn",
  268. shared_target => "irix-shared",
  269. shared_ldflag => "-64",
  270. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  271. multilib => "64",
  272. },
  273. #### Unified HP-UX ANSI C configs.
  274. # Special notes:
  275. # - Originally we were optimizing at +O4 level. It should be noted
  276. # that the only difference between +O3 and +O4 is global inter-
  277. # procedural analysis. As it has to be performed during the link
  278. # stage the compiler leaves behind certain pseudo-code in lib*.a
  279. # which might be release or even patch level specific. Generating
  280. # the machine code for and analyzing the *whole* program appears
  281. # to be *extremely* memory demanding while the performance gain is
  282. # actually questionable. The situation is intensified by the default
  283. # HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB
  284. # which is way too low for +O4. In other words, doesn't +O3 make
  285. # more sense?
  286. # - Keep in mind that the HP compiler by default generates code
  287. # suitable for execution on the host you're currently compiling at.
  288. # If the toolkit is ment to be used on various PA-RISC processors
  289. # consider './Configure hpux-parisc-[g]cc +DAportable'.
  290. # - -DMD32_XARRAY triggers workaround for compiler bug we ran into in
  291. # 32-bit message digests. (For the moment of this writing) HP C
  292. # doesn't seem to "digest" too many local variables (they make "him"
  293. # chew forever:-). For more details look-up MD32_XARRAY comment in
  294. # crypto/sha/sha_lcl.h.
  295. # - originally there were 32-bit hpux-parisc2-* targets. They were
  296. # scrapped, because a) they were not interchangable with other 32-bit
  297. # targets; a) when critical 32-bit assembly modules detect if they
  298. # are executed on PA-RISC 2.0 and thus adequate performance is
  299. # provided.
  300. # <appro@fy.chalmers.se>
  301. "hpux-parisc-gcc" => {
  302. cc => "gcc",
  303. cflags => "-DB_ENDIAN -DBN_DIV2W",
  304. debug_cflags => "-O0 -g",
  305. release_cflags => "-O3",
  306. thread_cflag => "-D_REENTRANT",
  307. lflags => "-Wl,+s -ldld",
  308. bn_ops => "BN_LLONG DES_PTR DES_UNROLL DES_RISC1",
  309. dso_scheme => "dl",
  310. shared_target => "hpux-shared",
  311. shared_cflag => "-fPIC",
  312. shared_ldflag => "-shared",
  313. shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  314. },
  315. "hpux-parisc1_1-gcc" => {
  316. inherit_from => [ "hpux-parisc-gcc", asm("parisc11_asm") ],
  317. multilib => "/pa1.1",
  318. },
  319. "hpux64-parisc2-gcc" => {
  320. inherit_from => [ asm("parisc20_64_asm") ],
  321. cc => "gcc",
  322. cflags => "-DB_ENDIAN",
  323. debug_cflags => "-O0 -g",
  324. release_cflags => "-O3",
  325. thread_cflag => "-D_REENTRANT",
  326. lflags => "-ldl",
  327. bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT",
  328. dso_scheme => "dlfcn",
  329. shared_target => "hpux-shared",
  330. shared_cflag => "-fpic",
  331. shared_ldflag => "-shared",
  332. shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  333. multilib => "/pa20_64",
  334. },
  335. # More attempts at unified 10.X and 11.X targets for HP C compiler.
  336. #
  337. # Chris Ruemmler <ruemmler@cup.hp.com>
  338. # Kevin Steves <ks@hp.se>
  339. "hpux-parisc-cc" => {
  340. cc => "cc",
  341. cflags => "+Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
  342. debug_cflags => "+O0 +d -g",
  343. release_cflags => "+O3",
  344. thread_cflag => "-D_REENTRANT",
  345. lflags => "-Wl,+s -ldld",
  346. bn_ops => "MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT",
  347. dso_scheme => "dl",
  348. shared_target => "hpux-shared",
  349. shared_cflag => "+Z",
  350. shared_ldflag => "-b",
  351. shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  352. },
  353. "hpux-parisc1_1-cc" => {
  354. inherit_from => [ "hpux-parisc-cc", asm("parisc11_asm") ],
  355. cflags => sub { join(" ","+DA1.1",@_); },
  356. multilib => "/pa1.1",
  357. },
  358. "hpux64-parisc2-cc" => {
  359. inherit_from => [ asm("parisc20_64_asm") ],
  360. cc => "cc",
  361. cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY",
  362. debug_cflags => "+O0 +d -g",
  363. release_cflags => "+O3",
  364. thread_cflag => "-D_REENTRANT",
  365. lflags => "-ldl",
  366. bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT",
  367. dso_scheme => "dlfcn",
  368. shared_target => "hpux-shared",
  369. shared_cflag => "+Z",
  370. shared_ldflag => "+DD64 -b",
  371. shared_extension => ".sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  372. multilib => "/pa20_64",
  373. },
  374. # HP/UX IA-64 targets
  375. "hpux-ia64-cc" => {
  376. inherit_from => [ asm("ia64_asm") ],
  377. cc => "cc",
  378. cflags => "-Ae +DD32 +Olit=all -z -DB_ENDIAN",
  379. debug_cflags => "+O0 +d -g",
  380. release_cflags => "+O2",
  381. thread_cflag => "-D_REENTRANT",
  382. lflags => "-ldl",
  383. bn_ops => "SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
  384. dso_scheme => "dlfcn",
  385. shared_target => "hpux-shared",
  386. shared_cflag => "+Z",
  387. shared_ldflag => "+DD32 -b",
  388. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  389. multilib => "/hpux32",
  390. },
  391. # Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted
  392. # with debugging of the following config.
  393. "hpux64-ia64-cc" => {
  394. inherit_from => [ asm("ia64_asm") ],
  395. cc => "cc",
  396. cflags => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
  397. debug_cflags => "+O0 +d -g",
  398. release_cflags => "+O3",
  399. thread_cflag => "-D_REENTRANT",
  400. lflags => "-ldl",
  401. bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
  402. dso_scheme => "dlfcn",
  403. shared_target => "hpux-shared",
  404. shared_cflag => "+Z",
  405. shared_ldflag => "+DD64 -b",
  406. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  407. multilib => "/hpux64",
  408. },
  409. # GCC builds...
  410. "hpux-ia64-gcc" => {
  411. inherit_from => [ asm("ia64_asm") ],
  412. cc => "gcc",
  413. cflags => "-DB_ENDIAN",
  414. debug_cflags => "-O0 -g",
  415. release_cflags => "-O3",
  416. thread_cflag => "-D_REENTRANT",
  417. lflags => "-ldl",
  418. bn_ops => "SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
  419. dso_scheme => "dlfcn",
  420. shared_target => "hpux-shared",
  421. shared_cflag => "-fpic",
  422. shared_ldflag => "-shared",
  423. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  424. multilib => "/hpux32",
  425. },
  426. "hpux64-ia64-gcc" => {
  427. inherit_from => [ asm("ia64_asm") ],
  428. cc => "gcc",
  429. cflags => "-mlp64 -DB_ENDIAN",
  430. debug_cflags => "-O0 -g",
  431. release_cflags => "-O3",
  432. thread_cflag => "-D_REENTRANT",
  433. lflags => "-ldl",
  434. bn_ops => "SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT",
  435. dso_scheme => "dlfcn",
  436. shared_target => "hpux-shared",
  437. shared_cflag => "-fpic",
  438. shared_ldflag => "-mlp64 -shared",
  439. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  440. multilib => "/hpux64",
  441. },
  442. #### HP MPE/iX http://jazz.external.hp.com/src/openssl/
  443. "MPE/iX-gcc" => {
  444. cc => "gcc",
  445. cflags => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
  446. thread_cflag => "(unknown)",
  447. sys_id => "MPE",
  448. lflags => "-L/SYSLOG/PUB -lsyslog -lsocket -lcurses",
  449. bn_ops => "BN_LLONG DES_PTR DES_UNROLL DES_RISC1",
  450. },
  451. #### DEC Alpha OSF/1/Tru64 targets.
  452. #
  453. # "What's in a name? That which we call a rose
  454. # By any other word would smell as sweet."
  455. #
  456. # - William Shakespeare, "Romeo & Juliet", Act II, scene II.
  457. #
  458. # For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
  459. #
  460. "osf1-alpha-gcc" => {
  461. inherit_from => [ asm("alpha_asm") ],
  462. cc => "gcc",
  463. cflags => "-O3",
  464. thread_cflag => "(unknown)",
  465. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1",
  466. dso_scheme => "dlfcn",
  467. shared_target => "alpha-osf1-shared",
  468. shared_extension => ".so",
  469. },
  470. "osf1-alpha-cc" => {
  471. inherit_from => [ asm("alpha_asm") ],
  472. cc => "cc",
  473. cflags => "-std1 -tune host -O4 -readonly_strings",
  474. thread_cflag => "(unknown)",
  475. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK",
  476. dso_scheme => "dlfcn",
  477. shared_target => "alpha-osf1-shared",
  478. shared_extension => ".so",
  479. },
  480. "tru64-alpha-cc" => {
  481. inherit_from => [ asm("alpha_asm") ],
  482. cc => "cc",
  483. cflags => "-std1 -tune host -fast -readonly_strings",
  484. thread_cflag => "-pthread",
  485. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK",
  486. dso_scheme => "dlfcn",
  487. shared_target => "alpha-osf1-shared",
  488. shared_ldflag => "-msym",
  489. shared_extension => ".so",
  490. },
  491. ####
  492. #### Variety of LINUX:-)
  493. ####
  494. # *-generic* is endian-neutral target, but ./config is free to
  495. # throw in -D[BL]_ENDIAN, whichever appropriate...
  496. "linux-generic32" => {
  497. cc => "gcc",
  498. cflags => "-Wall",
  499. debug_cflags => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG",
  500. release_cflags => "-O3",
  501. thread_cflag => "-D_REENTRANT",
  502. lflags => "-ldl",
  503. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
  504. dso_scheme => "dlfcn",
  505. shared_target => "linux-shared",
  506. shared_cflag => "-fPIC",
  507. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  508. },
  509. "linux-generic64" => {
  510. inherit_from => [ "linux-generic32" ],
  511. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
  512. },
  513. "linux-ppc" => {
  514. inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
  515. perlasm_scheme => "linux32",
  516. },
  517. "linux-ppc64" => {
  518. inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
  519. cflags => "-m64 -Wall -DB_ENDIAN",
  520. perlasm_scheme => "linux64",
  521. shared_ldflag => "-m64",
  522. multilib => "64",
  523. },
  524. "linux-ppc64le" => {
  525. inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
  526. cflags => "-m64 -Wall -DL_ENDIAN",
  527. perlasm_scheme => "linux64le",
  528. shared_ldflag => "-m64",
  529. },
  530. "linux-armv4" => {
  531. ################################################################
  532. # Note that -march is not among compiler options in linux-armv4
  533. # target description. Not specifying one is intentional to give
  534. # you choice to:
  535. #
  536. # a) rely on your compiler default by not specifying one;
  537. # b) specify your target platform explicitly for optimal
  538. # performance, e.g. -march=armv6 or -march=armv7-a;
  539. # c) build "universal" binary that targets *range* of platforms
  540. # by specifying minimum and maximum supported architecture;
  541. #
  542. # As for c) option. It actually makes no sense to specify
  543. # maximum to be less than ARMv7, because it's the least
  544. # requirement for run-time switch between platform-specific
  545. # code paths. And without run-time switch performance would be
  546. # equivalent to one for minimum. Secondly, there are some
  547. # natural limitations that you'd have to accept and respect.
  548. # Most notably you can *not* build "universal" binary for
  549. # big-endian platform. This is because ARMv7 processor always
  550. # picks instructions in little-endian order. Another similar
  551. # limitation is that -mthumb can't "cross" -march=armv6t2
  552. # boundary, because that's where it became Thumb-2. Well, this
  553. # limitation is a bit artificial, because it's not really
  554. # impossible, but it's deemed too tricky to support. And of
  555. # course you have to be sure that your binutils are actually
  556. # up to the task of handling maximum target platform. With all
  557. # this in mind here is an example of how to configure
  558. # "universal" build:
  559. #
  560. # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
  561. #
  562. inherit_from => [ "linux-generic32", asm("armv4_asm") ],
  563. perlasm_scheme => "linux32",
  564. },
  565. "linux-aarch64" => {
  566. inherit_from => [ "linux-generic64", asm("aarch64_asm") ],
  567. perlasm_scheme => "linux64",
  568. },
  569. "linux-mips32" => {
  570. # Configure script adds minimally required -march for assembly
  571. # support, if no -march was specified at command line.
  572. inherit_from => [ "linux-generic32", asm("mips32_asm") ],
  573. cflags => "-mabi=32 -Wall -DBN_DIV3W",
  574. perlasm_scheme => "o32",
  575. shared_ldflag => "-mabi=32",
  576. },
  577. # mips32 and mips64 below refer to contemporary MIPS Architecture
  578. # specifications, MIPS32 and MIPS64, rather than to kernel bitness.
  579. "linux-mips64" => {
  580. inherit_from => [ "linux-generic32", asm("mips64_asm") ],
  581. cflags => "-mabi=n32 -Wall -DBN_DIV3W",
  582. bn_ops => "SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
  583. perlasm_scheme => "n32",
  584. shared_ldflag => "-mabi=n32",
  585. multilib => "32",
  586. },
  587. "linux64-mips64" => {
  588. inherit_from => [ "linux-generic64", asm("mips64_asm") ],
  589. cflags => "-mabi=64 -O3 -Wall -DBN_DIV3W",
  590. perlasm_scheme => "64",
  591. shared_ldflag => "-mabi=64",
  592. multilib => "64",
  593. },
  594. #### IA-32 targets...
  595. "linux-elf" => {
  596. inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
  597. cc => "gcc",
  598. cflags => "-march=i486 -DL_ENDIAN -Wall",
  599. debug_cflags => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG",
  600. release_cflags => "-O3 -fomit-frame-pointer",
  601. debug_lflags => "-lefence",
  602. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  603. },
  604. "linux-aout" => {
  605. inherit_from => [ asm("x86_asm") ],
  606. cc => "gcc",
  607. cflags => "-DL_ENDIAN -march=i486 -Wall",
  608. debug_cflags => "-O0 -g",
  609. release_cflags => "-O3 -fomit-frame-pointer",
  610. thread_cflag => "(unknown)",
  611. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  612. perlasm_scheme => "a.out",
  613. },
  614. "linux-x86_64" => {
  615. inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
  616. cflags => "-m64 -DL_ENDIAN -Wall",
  617. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
  618. perlasm_scheme => "elf",
  619. shared_ldflag => "-m64",
  620. multilib => "64",
  621. },
  622. "linux-x86_64-clang" => {
  623. inherit_from => [ "linux-x86_64" ],
  624. cc => "clang",
  625. cflags => "-m64 -DL_ENDIAN -Wall -Wextra -Qunused-arguments",
  626. },
  627. "linux-x32" => {
  628. inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
  629. cflags => "-mx32 -DL_ENDIAN -Wall",
  630. bn_ops => "SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL",
  631. perlasm_scheme => "elf",
  632. shared_ldflag => "-mx32",
  633. multilib => "x32",
  634. },
  635. "linux-ia64" => {
  636. inherit_from => [ "linux-generic64", asm("ia64_asm") ],
  637. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT",
  638. },
  639. "linux64-s390x" => {
  640. inherit_from => [ "linux-generic64", asm("s390x_asm") ],
  641. cflags => "-m64 -Wall -DB_ENDIAN",
  642. thread_cflag => "-D_REENTRANT",
  643. perlasm_scheme => "64",
  644. shared_ldflag => "-m64",
  645. multilib => "64",
  646. },
  647. "linux32-s390x" => {
  648. #### So called "highgprs" target for z/Architecture CPUs
  649. # "Highgprs" is kernel feature first implemented in Linux
  650. # 2.6.32, see /proc/cpuinfo. The idea is to preserve most
  651. # significant bits of general purpose registers not only
  652. # upon 32-bit process context switch, but even on
  653. # asynchronous signal delivery to such process. This makes
  654. # it possible to deploy 64-bit instructions even in legacy
  655. # application context and achieve better [or should we say
  656. # adequate] performance. The build is binary compatible with
  657. # linux-generic32, and the idea is to be able to install the
  658. # resulting libcrypto.so alongside generic one, e.g. as
  659. # /lib/highgprs/libcrypto.so.x.y, for ldconfig and run-time
  660. # linker to autodiscover. Unfortunately it doesn't work just
  661. # yet, because of couple of bugs in glibc
  662. # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1...
  663. #
  664. inherit_from => [ "linux-generic32", asm("s390x_asm") ],
  665. cflags => "-m31 -Wall -Wa,-mzarch -DB_ENDIAN",
  666. bn_obj => sub { my $r=join(" ",@_); $r=~s/bn\-s390x/bn_asm/; $r; },
  667. perlasm_scheme => "31",
  668. shared_ldflag => "-m31",
  669. multilib => "/highgprs",
  670. },
  671. #### SPARC Linux setups
  672. # Ray Miller <ray.miller@computing-services.oxford.ac.uk> has
  673. # patiently assisted with debugging of following two configs.
  674. "linux-sparcv8" => {
  675. inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
  676. cflags => "-mcpu=v8 -Wall -DB_ENDIAN -DBN_DIV2W",
  677. },
  678. "linux-sparcv9" => {
  679. # it's a real mess with -mcpu=ultrasparc option under Linux,
  680. # but -Wa,-Av8plus should do the trick no matter what.
  681. inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
  682. cflags => "-m32 -mcpu=ultrasparc -Wall -Wa,-Av8plus -DB_ENDIAN -DBN_DIV2W",
  683. shared_ldflag => "-m32",
  684. },
  685. "linux64-sparcv9" => {
  686. # GCC 3.1 is a requirement
  687. inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
  688. cflags => "-m64 -mcpu=ultrasparc -Wall -DB_ENDIAN",
  689. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
  690. shared_ldflag => "-m64",
  691. multilib => "64",
  692. },
  693. "linux-alpha-gcc" => {
  694. inherit_from => [ "linux-generic64", asm("alpha_asm") ],
  695. cflags => "-DL_ENDIAN",
  696. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL",
  697. },
  698. "linux-c64xplus" => {
  699. # TI_CGT_C6000_7.3.x is a requirement
  700. cc => "cl6x",
  701. cflags => "--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden -DOPENSSL_SMALL_FOOTPRINT",
  702. thread_cflag => "-D_REENTRANT",
  703. bn_ops => "BN_LLONG",
  704. cpuid_obj => "c64xpluscpuid.o",
  705. bn_obj => "bn-c64xplus.o c64xplus-gf2m.o",
  706. aes_obj => "aes-c64xplus.o aes_cbc.o aes_ctr.o",
  707. sha1_obj => "sha1-c64xplus.o sha256-c64xplus.o sha512-c64xplus.o",
  708. rc4_obj => "rc4-c64xplus.o",
  709. modes_obj => "ghash-c64xplus.o",
  710. perlasm_scheme => "void",
  711. dso_scheme => "dlfcn",
  712. shared_target => "linux-shared",
  713. shared_cflag => "--pic",
  714. shared_ldflag => "-z --sysv --shared",
  715. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  716. ranlib => "true",
  717. },
  718. #### Android: linux-* but without pointers to headers and libs.
  719. #
  720. # It takes pair of prior-set environment variables to make it work:
  721. #
  722. # CROSS_SYSROOT=/some/where/android-ndk-<ver>/platforms/android-<apiver>/arch-<
  723. # CROSS_COMPILE=<prefix>
  724. #
  725. # As well as PATH adjusted to cover ${CROSS_COMPILE}gcc and company.
  726. # For example to compile for ICS and ARM with NDK 10d, you'd:
  727. #
  728. # ANDROID_NDK=/some/where/android-ndk-10d
  729. # CROSS_SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm
  730. # CROSS_COMPILE=arm-linux-adroideabi-
  731. # PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/
  732. #
  733. "android" => {
  734. inherit_from => [ "linux-generic32" ],
  735. # Special note about unconditional -fPIC and -pie. The underlying
  736. # reason is that Lollipop refuses to run non-PIE. But what about
  737. # older systems and NDKs? -fPIC was never problem, so the only
  738. # concern if -pie. Older toolchains, e.g. r4, appear to handle it
  739. # and binaries turn mostly functional. "Mostly" means that oldest
  740. # Androids, such as Froyo, fail to handle executable, but newer
  741. # systems are perfectly capable of executing binaries targeting
  742. # Froyo. Keep in mind that in the nutshell Android builds are
  743. # about JNI, i.e. shared libraries, not applications.
  744. cflags => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
  745. debug_cflags => "-O0 -g",
  746. lflags => "-pie%-ldl",
  747. shared_cflag => "",
  748. },
  749. "android-x86" => {
  750. inherit_from => [ "android", asm("x86_asm") ],
  751. release_cflags => "-O3 -fomit-frame-pointer",
  752. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  753. perlasm_scheme => "android",
  754. },
  755. ################################################################
  756. # Contemporary Android applications can provide multiple JNI
  757. # providers in .apk, targeting multiple architectures. Among
  758. # them there is "place" for two ARM flavours: generic eabi and
  759. # armv7-a/hard-float. However, it should be noted that OpenSSL's
  760. # ability to engage NEON is not constrained by ABI choice, nor
  761. # is your ability to call OpenSSL from your application code
  762. # compiled with floating-point ABI other than default 'soft'.
  763. # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
  764. # This means that choice of ARM libraries you provide in .apk
  765. # is driven by application needs. For example if application
  766. # itself benefits from NEON or is floating-point intensive, then
  767. # it might be appropriate to provide both libraries. Otherwise
  768. # just generic eabi would do. But in latter case it would be
  769. # appropriate to
  770. #
  771. # ./Configure android-armeabi -D__ARM_MAX_ARCH__=8
  772. #
  773. # in order to build "universal" binary and allow OpenSSL take
  774. # advantage of NEON when it's available.
  775. #
  776. "android-armeabi" => {
  777. inherit_from => [ "android", asm("armv4_asm") ],
  778. },
  779. "android-armv7" => {
  780. inherit_from => [ "android-armeabi" ],
  781. cflags => sub { join (" ","-march=armv7-a",@_); },
  782. },
  783. "android-mips" => {
  784. inherit_from => [ "android", asm("mips32_asm") ],
  785. perlasm_scheme => "o32",
  786. },
  787. "android64" => {
  788. inherit_from => [ "linux-generic64" ],
  789. cflags => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
  790. debug_cflags => "-O0 -g",
  791. lflags => "-pie%-ldl",
  792. shared_cflag => "",
  793. },
  794. "android64-aarch64" => {
  795. inherit_from => [ "android64", asm("aarch64_asm") ],
  796. perlasm_scheme => "linux64",
  797. },
  798. #### *BSD
  799. "BSD-generic32" => {
  800. # As for thread_cflag. Idea is to maintain "collective" set of
  801. # flags, which would cover all BSD flavors. -pthread applies
  802. # to them all, but is treated differently. OpenBSD expands is
  803. # as -D_POSIX_THREAD -lc_r, which is sufficient. FreeBSD 4.x
  804. # expands it as -lc_r, which has to be accompanied by explicit
  805. # -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
  806. # expands it as -lc_r, which seems to be sufficient?
  807. cc => "gcc",
  808. cflags => "-Wall",
  809. debug_cflags => "-O0 -g",
  810. release_cflags => "-O3",
  811. thread_cflag => "-pthread -D_THREAD_SAFE -D_REENTRANT",
  812. bn_ops => "BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL",
  813. dso_scheme => "dlfcn",
  814. shared_target => "bsd-gcc-shared",
  815. shared_cflag => "-fPIC",
  816. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  817. },
  818. "BSD-generic64" => {
  819. inherit_from => [ "BSD-generic32" ],
  820. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
  821. },
  822. "BSD-x86" => {
  823. inherit_from => [ "BSD-generic32", asm("x86_asm") ],
  824. cflags => "-DL_ENDIAN -Wall",
  825. release_cflags => "-O3 -fomit-frame-pointer",
  826. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  827. shared_target => "bsd-shared",
  828. perlasm_scheme => "a.out",
  829. },
  830. "BSD-x86-elf" => {
  831. inherit_from => [ "BSD-x86" ],
  832. perlasm_scheme => "elf",
  833. },
  834. "BSD-sparcv8" => {
  835. inherit_from => [ "BSD-generic32", asm("sparcv8_asm") ],
  836. cflags => "-mcpu=v8 -Wall -DB_ENDIAN",
  837. },
  838. "BSD-sparc64" => {
  839. # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
  840. # simply *happens* to work around a compiler bug in gcc 3.3.3,
  841. # triggered by RIPEMD160 code.
  842. inherit_from => [ "BSD-generic64", asm("sparcv9_asm") ],
  843. cflags => "-DB_ENDIAN -DMD32_REG_T=int -Wall",
  844. bn_ops => "BN_LLONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR",
  845. },
  846. "BSD-ia64" => {
  847. inherit_from => [ "BSD-generic64", asm("ia64_asm") ],
  848. cflags => "-DL_ENDIAN -Wall",
  849. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT",
  850. },
  851. "BSD-x86_64" => {
  852. inherit_from => [ "BSD-generic64", asm("x86_64_asm") ],
  853. cflags => "-DL_ENDIAN -Wall",
  854. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
  855. perlasm_scheme => "elf",
  856. },
  857. "bsdi-elf-gcc" => {
  858. inherit_from => [ asm("x86_elf_asm") ],
  859. cc => "gcc",
  860. cflags => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall",
  861. thread_cflag => "(unknown)",
  862. lflags => "-ldl",
  863. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  864. dso_scheme => "dlfcn",
  865. shared_target => "bsd-gcc-shared",
  866. shared_cflag => "-fPIC",
  867. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  868. },
  869. "nextstep" => {
  870. cc => "cc",
  871. cflags => "-O -Wall",
  872. unistd => "<libc.h>",
  873. thread_cflag => "(unknown)",
  874. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  875. },
  876. "nextstep3.3" => {
  877. cc => "cc",
  878. cflags => "-O3 -Wall",
  879. unistd => "<libc.h>",
  880. thread_cflag => "(unknown)",
  881. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  882. },
  883. # QNX
  884. "qnx4" => {
  885. cc => "cc",
  886. cflags => "-DL_ENDIAN -DTERMIO",
  887. thread_cflag => "(unknown)",
  888. bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
  889. },
  890. "QNX6" => {
  891. cc => "gcc",
  892. lflags => "-lsocket",
  893. dso_scheme => "dlfcn",
  894. shared_target => "bsd-gcc-shared",
  895. shared_cflag => "-fPIC",
  896. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  897. },
  898. "QNX6-i386" => {
  899. inherit_from => [ asm("x86_elf_asm") ],
  900. cc => "gcc",
  901. cflags => "-DL_ENDIAN -O2 -Wall",
  902. lflags => "-lsocket",
  903. bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
  904. dso_scheme => "dlfcn",
  905. shared_target => "bsd-gcc-shared",
  906. shared_cflag => "-fPIC",
  907. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  908. },
  909. #### SCO/Caldera targets.
  910. #
  911. # Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
  912. # Now we only have blended unixware-* as it's the only one used by ./config.
  913. # If you want to optimize for particular microarchitecture, bypass ./config
  914. # and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
  915. # Note that not all targets include assembler support. Mostly because of
  916. # lack of motivation to support out-of-date platforms with out-of-date
  917. # compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
  918. # patiently assisted to debug most of it.
  919. #
  920. # UnixWare 2.0x fails destest with -O.
  921. "unixware-2.0" => {
  922. cc => "cc",
  923. cflags => "-DFILIO_H -DNO_STRINGS_H",
  924. thread_cflag => "-Kthread",
  925. lflags => "-lsocket -lnsl -lresolv -lx",
  926. bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
  927. },
  928. "unixware-2.1" => {
  929. cc => "cc",
  930. cflags => "-O -DFILIO_H",
  931. thread_cflag => "-Kthread",
  932. lflags => "-lsocket -lnsl -lresolv -lx",
  933. bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
  934. },
  935. "unixware-7" => {
  936. inherit_from => [ asm("x86_elf_asm") ],
  937. cc => "cc",
  938. cflags => "-O -DFILIO_H -Kalloca",
  939. thread_cflag => "-Kthread",
  940. lflags => "-lsocket -lnsl",
  941. bn_ops => "BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}",
  942. perlasm_scheme => "elf-1",
  943. dso_scheme => "dlfcn",
  944. shared_target => "svr5-shared",
  945. shared_cflag => "-Kpic",
  946. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  947. },
  948. "unixware-7-gcc" => {
  949. inherit_from => [ asm("x86_elf_asm") ],
  950. cc => "gcc",
  951. cflags => "-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=pentium -Wall",
  952. thread_cflag => "-D_REENTRANT",
  953. lflags => "-lsocket -lnsl",
  954. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  955. perlasm_scheme => "elf-1",
  956. dso_scheme => "dlfcn",
  957. shared_target => "gnu-shared",
  958. shared_cflag => "-fPIC",
  959. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  960. },
  961. # SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
  962. "sco5-cc" => {
  963. inherit_from => [ asm("x86_elf_asm") ],
  964. cc => "cc",
  965. cflags => "-belf",
  966. thread_cflag => "(unknown)",
  967. lflags => "-lsocket -lnsl",
  968. bn_ops => "${x86_gcc_des} ${x86_gcc_opts}",
  969. perlasm_scheme => "elf-1",
  970. dso_scheme => "dlfcn",
  971. shared_target => "svr3-shared",
  972. shared_cflag => "-Kpic",
  973. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  974. },
  975. "sco5-gcc" => {
  976. inherit_from => [ asm("x86_elf_asm") ],
  977. cc => "gcc",
  978. cflags => "-O3 -fomit-frame-pointer",
  979. thread_cflag => "(unknown)",
  980. lflags => "-lsocket -lnsl",
  981. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  982. perlasm_scheme => "elf-1",
  983. dso_scheme => "dlfcn",
  984. shared_target => "svr3-shared",
  985. shared_cflag => "-fPIC",
  986. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  987. },
  988. #### IBM's AIX.
  989. "aix-gcc" => {
  990. inherit_from => [ asm("ppc32_asm") ],
  991. cc => "gcc",
  992. cflags => "-DB_ENDIAN",
  993. debug_cflags => "-O0 -g",
  994. release_cflags => "-O",
  995. thread_cflag => "-pthread",
  996. sys_id => "AIX",
  997. bn_ops => "BN_LLONG RC4_CHAR",
  998. perlasm_scheme => "aix32",
  999. dso_scheme => "dlfcn",
  1000. shared_target => "aix-shared",
  1001. shared_ldflag => "-shared -Wl,-G",
  1002. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  1003. arflags => "-X32",
  1004. },
  1005. "aix64-gcc" => {
  1006. inherit_from => [ asm("ppc64_asm") ],
  1007. cc => "gcc",
  1008. cflags => "-maix64 -DB_ENDIAN",
  1009. debug_cflags => "-O0 -g",
  1010. release_cflags => "-O",
  1011. thread_cflag => "-pthread",
  1012. sys_id => "AIX",
  1013. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  1014. perlasm_scheme => "aix64",
  1015. dso_scheme => "dlfcn",
  1016. shared_target => "aix-shared",
  1017. shared_ldflag => "-maix64 -shared -Wl,-G",
  1018. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  1019. arflags => "-X64",
  1020. },
  1021. # Below targets assume AIX 5. Idea is to effectively disregard
  1022. # $OBJECT_MODE at build time. $OBJECT_MODE is respected at
  1023. # ./config stage!
  1024. "aix-cc" => {
  1025. inherit_from => [ asm("ppc32_asm") ],
  1026. cc => "cc",
  1027. cflags => "-q32 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
  1028. debug_cflags => "",
  1029. release_cflags => "-O",
  1030. thread_cflag => "-qthreaded -D_THREAD_SAFE",
  1031. sys_id => "AIX",
  1032. bn_ops => "BN_LLONG RC4_CHAR",
  1033. perlasm_scheme => "aix32",
  1034. dso_scheme => "dlfcn",
  1035. shared_target => "aix-shared",
  1036. shared_ldflag => "-q32 -G",
  1037. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  1038. arflags => "-X 32",
  1039. },
  1040. "aix64-cc" => {
  1041. inherit_from => [ asm("ppc64_asm") ],
  1042. cc => "cc",
  1043. cflags => "-q64 -DB_ENDIAN -qmaxmem=16384 -qro -qroconst",
  1044. debug_cflags => "",
  1045. release_cflags => "-O",
  1046. thread_cflag => "-qthreaded -D_THREAD_SAFE",
  1047. sys_id => "AIX",
  1048. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
  1049. perlasm_scheme => "aix64",
  1050. dso_scheme => "dlfcn",
  1051. shared_target => "aix-shared",
  1052. shared_ldflag => "-q64 -G",
  1053. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  1054. arflags => "-X 64",
  1055. },
  1056. # SIEMENS BS2000/OSD: an EBCDIC-based mainframe
  1057. "BS2000-OSD" => {
  1058. cc => "c89",
  1059. cflags => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
  1060. thread_cflag => "(unknown)",
  1061. lflags => "-lsocket -lnsl",
  1062. bn_ops => "THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR",
  1063. },
  1064. # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe
  1065. # You need to compile using the c89.sh wrapper in the tools directory, because the
  1066. # IBM compiler does not like the -L switch after any object modules.
  1067. #
  1068. "OS390-Unix" => {
  1069. cc => "c89.sh",
  1070. cflags => "-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE",
  1071. thread_cflag => "(unknown)",
  1072. bn_ops => "THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR",
  1073. },
  1074. #### Visual C targets
  1075. #
  1076. # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
  1077. #
  1078. # Note about -wd4090, disable warning C4090. This warning returns false
  1079. # positives in some situations. Disabling it altogether masks both
  1080. # legitimate and false cases, but as we compile on multiple platforms,
  1081. # we rely on other compilers to catch legitimate cases.
  1082. "VC-common" => {
  1083. template => 1,
  1084. cc => "cl",
  1085. cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
  1086. dso_scheme => "win32",
  1087. },
  1088. "VC-WIN64I" => {
  1089. inherit_from => [ "VC-common", asm("ia64_asm") ],
  1090. cflags => sub { join(" ",@_,"-DUNICODE -D_UNICODE"); },
  1091. sys_id => "WIN64I",
  1092. bn_ops => "SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN",
  1093. bn_obj => sub { my $r=join(" ",@_); $r=~s/bn\-//; $r; },
  1094. rc4_obj => "",
  1095. perlasm_scheme => "ias",
  1096. },
  1097. "VC-WIN64A" => {
  1098. inherit_from => [ "VC-common", asm("x86_64_asm") ],
  1099. cflags => sub { join(" ",@_,"-DUNICODE -D_UNICODE"); },
  1100. sys_id => "WIN64A",
  1101. bn_ops => "SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN",
  1102. bn_obj => sub { my $r=join(" ",@_); $r=~s/x86_64\-gcc/bn_asm/; $r; },
  1103. perlasm_scheme => "auto",
  1104. },
  1105. "VC-WIN32" => {
  1106. # x86 Win32 target defaults to ANSI API, if you want UNICODE,
  1107. # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
  1108. inherit_from => [ "VC-common", asm("x86_asm") ],
  1109. sys_id => "WIN32",
  1110. bn_ops => "BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}",
  1111. perlasm_scheme => "win32n",
  1112. },
  1113. "VC-CE" => {
  1114. cc => "cl",
  1115. sys_id => "WINCE",
  1116. bn_ops => "BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}",
  1117. dso_scheme => "win32",
  1118. },
  1119. #### Borland C++ 4.5
  1120. "BC-32" => {
  1121. cc => "bcc32",
  1122. sys_id => "WIN32",
  1123. bn_ops => "BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN",
  1124. dso_scheme => "win32",
  1125. },
  1126. #### MinGW
  1127. "mingw" => {
  1128. inherit_from => [ asm("x86_asm") ],
  1129. cc => "gcc",
  1130. cflags => "-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -march=i486 -Wall",
  1131. debug_cflags => "-g -O0",
  1132. release_clags => "-O3 -fomit-frame-pointer",
  1133. thread_cflag => "-D_MT",
  1134. sys_id => "MINGW32",
  1135. lflags => "-lws2_32 -lgdi32 -lcrypt32",
  1136. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN",
  1137. perlasm_scheme => "coff",
  1138. dso_scheme => "win32",
  1139. shared_target => "cygwin-shared",
  1140. shared_cflag => "-D_WINDLL -DOPENSSL_USE_APPLINK",
  1141. shared_ldflag => "-mno-cygwin",
  1142. shared_extension => ".dll.a",
  1143. },
  1144. "mingw64" => {
  1145. # As for OPENSSL_USE_APPLINK. Applink makes it possible to use
  1146. # .dll compiled with one compiler with application compiled with
  1147. # another compiler. It's possible to engage Applink support in
  1148. # mingw64 build, but it's not done, because till mingw64
  1149. # supports structured exception handling, one can't seriously
  1150. # consider its binaries for using with non-mingw64 run-time
  1151. # environment. And as mingw64 is always consistent with itself,
  1152. # Applink is never engaged and can as well be omitted.
  1153. inherit_from => [ asm("x86_64_asm") ],
  1154. cc => "gcc",
  1155. cflags => "-mno-cygwin -DL_ENDIAN -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE",
  1156. debug_cflags => "-g -O0",
  1157. release_clags => "-O3",
  1158. thread_cflag => "-D_MT",
  1159. sys_id => "MINGW64",
  1160. lflags => "-lws2_32 -lgdi32 -lcrypt32",
  1161. bn_ops => "SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN",
  1162. perlasm_scheme => "mingw64",
  1163. dso_scheme => "win32",
  1164. shared_target => "cygwin-shared",
  1165. shared_cflag => "-D_WINDLL",
  1166. shared_ldflag => "-mno-cygwin",
  1167. shared_extension => ".dll.a",
  1168. },
  1169. #### UWIN
  1170. "UWIN" => {
  1171. cc => "cc",
  1172. cflags => "-DTERMIOS -DL_ENDIAN -O -Wall",
  1173. sys_id => "UWIN",
  1174. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  1175. dso_scheme => "win32",
  1176. },
  1177. #### Cygwin
  1178. "Cygwin" => {
  1179. inherit_from => [ asm("x86_asm") ],
  1180. cc => "gcc",
  1181. cflags => "-DTERMIOS -DL_ENDIAN -march=i486 -Wall",
  1182. debug_cflags => "-g -O0",
  1183. release_clags => "-O3 -fomit-frame-pointer",
  1184. sys_id => "CYGWIN",
  1185. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  1186. perlasm_scheme => "coff",
  1187. dso_scheme => "dlfcn",
  1188. shared_target => "cygwin-shared",
  1189. shared_cflag => "-D_WINDLL",
  1190. shared_ldflag => "-shared",
  1191. shared_extension => ".dll.a",
  1192. },
  1193. "Cygwin-x86_64" => {
  1194. inherit_from => [ asm("x86_64_asm") ],
  1195. cc => "gcc",
  1196. cflags => "-DTERMIOS -DL_ENDIAN -Wall",
  1197. debug_cflags => "-g -O0",
  1198. release_clags => "-O3",
  1199. sys_id => "CYGWIN",
  1200. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
  1201. perlasm_scheme => "mingw64",
  1202. dso_scheme => "dlfcn",
  1203. shared_target => "cygwin-shared",
  1204. shared_cflag => "-D_WINDLL",
  1205. shared_ldflag => "-shared",
  1206. shared_extension => ".dll.a",
  1207. },
  1208. #### NetWare from David Ward (dsward@novell.com)
  1209. # requires either MetroWerks NLM development tools, or gcc / nlmconv
  1210. # NetWare defaults socket bio to WinSock sockets. However,
  1211. # the builds can be configured to use BSD sockets instead.
  1212. # netware-clib => legacy CLib c-runtime support
  1213. "netware-clib" => {
  1214. cc => "mwccnlm",
  1215. bn_ops => "${x86_gcc_opts}",
  1216. },
  1217. "netware-clib-bsdsock" => {
  1218. cc => "mwccnlm",
  1219. bn_ops => "${x86_gcc_opts}",
  1220. },
  1221. "netware-clib-gcc" => {
  1222. cc => "i586-netware-gcc",
  1223. cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
  1224. bn_ops => "${x86_gcc_opts}",
  1225. },
  1226. "netware-clib-bsdsock-gcc" => {
  1227. cc => "i586-netware-gcc",
  1228. cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall",
  1229. bn_ops => "${x86_gcc_opts}",
  1230. },
  1231. # netware-libc => LibC/NKS support
  1232. "netware-libc" => {
  1233. cc => "mwccnlm",
  1234. bn_ops => "BN_LLONG ${x86_gcc_opts}",
  1235. },
  1236. "netware-libc-bsdsock" => {
  1237. cc => "mwccnlm",
  1238. bn_ops => "BN_LLONG ${x86_gcc_opts}",
  1239. },
  1240. "netware-libc-gcc" => {
  1241. cc => "i586-netware-gcc",
  1242. cflags => "-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
  1243. bn_ops => "BN_LLONG ${x86_gcc_opts}",
  1244. },
  1245. "netware-libc-bsdsock-gcc" => {
  1246. cc => "i586-netware-gcc",
  1247. cflags => "-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall",
  1248. bn_ops => "BN_LLONG ${x86_gcc_opts}",
  1249. },
  1250. #### DJGPP
  1251. "DJGPP" => {
  1252. inherit_from => [ asm("x86_asm") ],
  1253. cc => "gcc",
  1254. cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
  1255. sys_id => "MSDOS",
  1256. lflags => "-L/dev/env/WATT_ROOT/lib -lwatt",
  1257. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  1258. perlasm_scheme => "a.out",
  1259. },
  1260. #### Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
  1261. "ultrix-cc" => {
  1262. cc => "cc",
  1263. cflags => "-std1 -O -Olimit 2500 -DL_ENDIAN",
  1264. thread_cflag => "(unknown)",
  1265. },
  1266. "ultrix-gcc" => {
  1267. cc => "gcc",
  1268. cflags => "-O3 -DL_ENDIAN",
  1269. thread_cflag => "(unknown)",
  1270. bn_ops => "BN_LLONG",
  1271. },
  1272. # K&R C is no longer supported; you need gcc on old Ultrix installations
  1273. ##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
  1274. ##### MacOS X (a.k.a. Darwin) setup
  1275. "darwin-common" => {
  1276. template => 1,
  1277. cc => "cc",
  1278. cflags => "",
  1279. debug_cflags => "-g -O0",
  1280. release_cflags => "-O3",
  1281. thread_cflag => "-D_REENTRANT",
  1282. sys_id => "MACOSX",
  1283. lflags => "-Wl,-search_paths_first%",
  1284. bn_ops => "BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR",
  1285. perlasm_scheme => "osx32",
  1286. dso_scheme => "dlfcn",
  1287. shared_target => "darwin-shared",
  1288. shared_cflag => "-fPIC -fno-common",
  1289. shared_ldflag => "-dynamiclib",
  1290. shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
  1291. },
  1292. "darwin-ppc-cc" => {
  1293. inherit_from => [ "darwin-common", asm("ppc32_asm") ],
  1294. cflags => "-arch ppc -DB_ENDIAN -Wa,-force_cpusubtype_ALL",
  1295. perlasm_scheme => "osx32",
  1296. shared_ldflag => "-arch ppc -dynamiclib",
  1297. },
  1298. "darwin64-ppc-cc" => {
  1299. inherit_from => [ "darwin-common", asm("ppc64_asm") ],
  1300. cflags => "-arch ppc64 -DB_ENDIAN",
  1301. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR",
  1302. perlasm_scheme => "osx64",
  1303. shared_ldflag => "-arch ppc64 -dynamiclib",
  1304. },
  1305. "darwin-i386-cc" => {
  1306. inherit_from => [ "darwin-common", asm("x86_asm") ],
  1307. cflags => "-arch i386 -DL_ENDIAN",
  1308. release_cflags => "-O3 -fomit-frame-pointer",
  1309. bn_ops => "BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR",
  1310. perlasm_scheme => "macosx",
  1311. shared_ldflag => "-arch i386 -dynamiclib",
  1312. },
  1313. "darwin64-x86_64-cc" => {
  1314. inherit_from => [ "darwin-common", asm("x86_64_asm") ],
  1315. cflags => "-arch x86_64 -DL_ENDIAN -Wall",
  1316. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL",
  1317. perlasm_scheme => "macosx",
  1318. shared_ldflag => "-arch x86_64 -dynamiclib",
  1319. },
  1320. #### iPhoneOS/iOS
  1321. #
  1322. # It takes three prior-set environment variables to make it work:
  1323. #
  1324. # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
  1325. # CROSS_TOP=/where/SDKs/are
  1326. # CROSS_SDK=iPhoneOSx.y.sdk
  1327. #
  1328. # Exact paths vary with Xcode releases, but for couple of last ones
  1329. # they would look like this:
  1330. #
  1331. # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
  1332. # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
  1333. # CROSS_SDK=iPhoneOS.sdk
  1334. #
  1335. "iphoneos-cross" => {
  1336. inherit_from => [ "darwin-common" ],
  1337. cflags => "-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
  1338. sys_id => "iOS",
  1339. },
  1340. "ios-cross" => {
  1341. inherit_from => [ "darwin-common", asm("armv4_asm") ],
  1342. # It should be possible to go below iOS 6 and even add -arch armv6,
  1343. # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
  1344. # at this point.
  1345. cflags => "-arch armv7 -mios-version-min=6.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
  1346. sys_id => "iOS",
  1347. perlasm_scheme => "ios32",
  1348. },
  1349. "ios64-cross" => {
  1350. inherit_from => [ "darwin-common", asm("aarch64_asm") ],
  1351. cflags => "-arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common",
  1352. sys_id => "iOS",
  1353. bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR",
  1354. perlasm_scheme => "ios64",
  1355. },
  1356. ##### GNU Hurd
  1357. "hurd-x86" => {
  1358. inherit_from => [ asm("x86_elf_asm") ],
  1359. cc => "gcc",
  1360. cflags => "-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall",
  1361. thread_cflag => "-D_REENTRANT",
  1362. lflags => "-ldl",
  1363. bn_ops => "BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}",
  1364. dso_scheme => "dlfcn",
  1365. shared_target => "linux-shared",
  1366. shared_cflag => "-fPIC",
  1367. },
  1368. ##### OS/2 EMX
  1369. "OS2-EMX" => {
  1370. cc => "gcc",
  1371. },
  1372. ##### VxWorks for various targets
  1373. "vxworks-ppc60x" => {
  1374. cc => "ccppc",
  1375. cflags => "-D_REENTRANT -mrtp -mhard-float -mstrict-align -fno-implicit-fp -DPPC32_fp60x -O2 -fstrength-reduce -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
  1376. sys_id => "VXWORKS",
  1377. lflags => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common",
  1378. },
  1379. "vxworks-ppcgen" => {
  1380. cc => "ccppc",
  1381. cflags => "-D_REENTRANT -mrtp -msoft-float -mstrict-align -O1 -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
  1382. sys_id => "VXWORKS",
  1383. lflags => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon",
  1384. },
  1385. "vxworks-ppc405" => {
  1386. cc => "ccppc",
  1387. cflags => "-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h",
  1388. sys_id => "VXWORKS",
  1389. lflags => "-r",
  1390. },
  1391. "vxworks-ppc750" => {
  1392. cc => "ccppc",
  1393. cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG)",
  1394. sys_id => "VXWORKS",
  1395. lflags => "-r",
  1396. },
  1397. "vxworks-ppc750-debug" => {
  1398. cc => "ccppc",
  1399. cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
  1400. sys_id => "VXWORKS",
  1401. lflags => "-r",
  1402. },
  1403. "vxworks-ppc860" => {
  1404. cc => "ccppc",
  1405. cflags => "-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h",
  1406. sys_id => "VXWORKS",
  1407. lflags => "-r",
  1408. },
  1409. "vxworks-simlinux" => {
  1410. cc => "ccpentium",
  1411. cflags => "-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DL_ENDIAN -DCPU=SIMLINUX -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/h -I\$(WIND_BASE)/target/h/wrn/coreip -DOPENSSL_NO_HW_PADLOCK",
  1412. sys_id => "VXWORKS",
  1413. lflags => "-r",
  1414. ranlib => "ranlibpentium",
  1415. },
  1416. "vxworks-mips" => {
  1417. inherit_from => [ asm("mips32_asm") ],
  1418. cc => "ccmips",
  1419. cflags => "-mrtp -mips2 -O -G 0 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DCPU=MIPS32 -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/h/wrn/coreip",
  1420. thread_cflag => "-D_REENTRANT",
  1421. sys_id => "VXWORKS",
  1422. lflags => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon",
  1423. perlasm_scheme => "o32",
  1424. ranlib => "ranlibmips",
  1425. },
  1426. #### uClinux
  1427. "uClinux-dist" => {
  1428. cc => "$ENV{'CC'}",
  1429. cflags => "\$(CFLAGS)",
  1430. thread_cflag => "-D_REENTRANT",
  1431. lflags => "\$(LDFLAGS) \$(LDLIBS)",
  1432. bn_ops => "BN_LLONG",
  1433. dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
  1434. shared_target => "linux-shared",
  1435. shared_cflag => "-fPIC",
  1436. shared_ldflag => "-shared",
  1437. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  1438. ranlib => "$ENV{'RANLIB'}",
  1439. },
  1440. "uClinux-dist64" => {
  1441. cc => "$ENV{'CC'}",
  1442. cflags => "\$(CFLAGS)",
  1443. thread_cflag => "-D_REENTRANT",
  1444. lflags => "\$(LDFLAGS) \$(LDLIBS)",
  1445. bn_ops => "SIXTY_FOUR_BIT_LONG",
  1446. dso_scheme => "$ENV{'LIBSSL_dlfcn'}",
  1447. shared_target => "linux-shared",
  1448. shared_cflag => "-fPIC",
  1449. shared_ldflag => "-shared",
  1450. shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  1451. ranlib => "$ENV{'RANLIB'}",
  1452. },
  1453. );