Advertisement
Guest User

boost stdcxx4

a guest
Oct 20th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.56 KB | None | 0 0
  1. --- /dev/null 2012-07-21 17:36:20.000000000 +0200
  2. +++ boost/tools/build/v2/tools/sun-stdcxx4.jam 2012-07-21 19:43:52.462932182 +0200
  3. @@ -0,0 +1,142 @@
  4. +# Copyright (C) Christopher Currie 2003. Permission to copy, use,
  5. +# modify, sell and distribute this software is granted provided this
  6. +# copyright notice appears in all copies. This software is provided
  7. +# "as is" without express or implied warranty, and with no claim as
  8. +# to its suitability for any purpose.
  9. +
  10. +import property ;
  11. +import generators ;
  12. +import os ;
  13. +import toolset : flags ;
  14. +import feature ;
  15. +import type ;
  16. +import common ;
  17. +
  18. +feature.extend toolset : sun-stdcxx4 ;
  19. +toolset.inherit sun-stdcxx4 : unix ;
  20. +generators.override sun-stdcxx4.prebuilt : builtin.lib-generator ;
  21. +generators.override sun-stdcxx4.prebuilt : builtin.prebuilt ;
  22. +generators.override sun-stdcxx4.searched-lib-generator : searched-lib-generator ;
  23. +
  24. +feature.extend stdlib : sun-stdcxx4 ;
  25. +feature.compose <stdlib>sun-stdcxx4
  26. + : <cxxflags>-library=stdcxx4 <linkflags>-library=stdcxx4
  27. + ;
  28. +
  29. +rule init ( version ? : command * : options * )
  30. +{
  31. + local condition = [
  32. + common.check-init-parameters sun-stdcxx4 : version $(version) ] ;
  33. +
  34. + command = [ common.get-invocation-command sun-stdcxx4 : CC
  35. + : $(command) : "/opt/SUNWspro/bin" ] ;
  36. +
  37. + # Even if the real compiler is not found, put CC to
  38. + # command line so that user see command line that would have being executed.
  39. + command ?= CC ;
  40. +
  41. + common.handle-options sun-stdcxx4 : $(condition) : $(command) : $(options) ;
  42. +
  43. + command_c = $(command[1--2]) $(command[-1]:B=cc) ;
  44. +
  45. + toolset.flags sun-stdcxx4 CONFIG_C_COMMAND $(condition) : $(command_c) ;
  46. +}
  47. +
  48. +# Declare generators
  49. +generators.register-c-compiler sun-stdcxx4.compile.c : C : OBJ : <toolset>sun-stdcxx4 ;
  50. +generators.register-c-compiler sun-stdcxx4.compile.c++ : CPP : OBJ : <toolset>sun-stdcxx4 ;
  51. +
  52. +# Declare flags and actions for compilation
  53. +flags sun-stdcxx4.compile OPTIONS <debug-symbols>on : -g ;
  54. +flags sun-stdcxx4.compile OPTIONS <profiling>on : -xprofile=tcov ;
  55. +flags sun-stdcxx4.compile OPTIONS <optimization>speed : -xO4 ;
  56. +flags sun-stdcxx4.compile OPTIONS <optimization>space : -xO2 -xspace ;
  57. +flags sun-stdcxx4.compile OPTIONS <threading>multi : -mt ;
  58. +flags sun-stdcxx4.compile OPTIONS <warnings>off : -erroff ;
  59. +flags sun-stdcxx4.compile OPTIONS <warnings>on : -erroff=%none ;
  60. +flags sun-stdcxx4.compile OPTIONS <warnings>all : -erroff=%none ;
  61. +flags sun-stdcxx4.compile OPTIONS <warnings-as-errors>on : -errwarn ;
  62. +
  63. +flags sun-stdcxx4.compile.c++ OPTIONS <inlining>off : +d ;
  64. +
  65. +# The -m32 and -m64 options are supported starting
  66. +# with Sun Studio 12. On earlier compilers, the
  67. +# 'address-model' feature is not supported and should not
  68. +# be used. Instead, use -xarch=generic64 command line
  69. +# option.
  70. +# See http://svn.boost.org/trac/boost/ticket/1186
  71. +# for details.
  72. +flags sun-stdcxx4 OPTIONS <address-model>32 : -m32 ;
  73. +flags sun-stdcxx4 OPTIONS <address-model>64 : -m64 ;
  74. +# On sparc, there's a difference between -Kpic
  75. +# and -KPIC. The first is slightly more efficient,
  76. +# but has the limits on the size of GOT table.
  77. +# For minimal fuss on user side, we use -KPIC here.
  78. +# See http://svn.boost.org/trac/boost/ticket/1186#comment:6
  79. +# for detailed explanation.
  80. +flags sun-stdcxx4 OPTIONS <link>shared : -KPIC ;
  81. +
  82. +flags sun-stdcxx4.compile OPTIONS <cflags> ;
  83. +flags sun-stdcxx4.compile.c++ OPTIONS <cxxflags> ;
  84. +flags sun-stdcxx4.compile DEFINES <define> ;
  85. +flags sun-stdcxx4.compile INCLUDES <include> ;
  86. +
  87. +actions compile.c
  88. +{
  89. + "$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
  90. +}
  91. +
  92. +actions compile.c++
  93. +{
  94. + "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
  95. +}
  96. +
  97. +# Declare flags and actions for linking
  98. +flags sun-stdcxx4.link OPTIONS <debug-symbols>on : -g ;
  99. +# Strip the binary when no debugging is needed
  100. +flags sun-stdcxx4.link OPTIONS <debug-symbols>off : -s ;
  101. +flags sun-stdcxx4.link OPTIONS <profiling>on : -xprofile=tcov ;
  102. +flags sun-stdcxx4.link OPTIONS <threading>multi : -mt ;
  103. +flags sun-stdcxx4.link OPTIONS <linkflags> ;
  104. +flags sun-stdcxx4.link LINKPATH <library-path> ;
  105. +flags sun-stdcxx4.link FINDLIBS-ST <find-static-library> ;
  106. +flags sun-stdcxx4.link FINDLIBS-SA <find-shared-library> ;
  107. +flags sun-stdcxx4.link LIBRARIES <library-file> ;
  108. +flags sun-stdcxx4.link LINK-RUNTIME <runtime-link>static : static ;
  109. +flags sun-stdcxx4.link LINK-RUNTIME <runtime-link>shared : dynamic ;
  110. +flags sun-stdcxx4.link RPATH <dll-path> ;
  111. +# On gcc, there are separate options for dll path at runtime and
  112. +# link time. On Solaris, there's only one: -R, so we have to use
  113. +# it, even though it's bad idea.
  114. +flags sun-stdcxx4.link RPATH <xdll-path> ;
  115. +
  116. +# The POSIX real-time library is always needed (nanosleep, clock_gettime etc.)
  117. +flags sun-stdcxx4.link FINDLIBS-SA : rt ;
  118. +
  119. +rule link ( targets * : sources * : properties * )
  120. +{
  121. + SPACE on $(targets) = " " ;
  122. +}
  123. +
  124. +actions link bind LIBRARIES
  125. +{
  126. + "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
  127. +}
  128. +
  129. +# Slight mods for dlls
  130. +rule link.dll ( targets * : sources * : properties * )
  131. +{
  132. + SPACE on $(targets) = " " ;
  133. +}
  134. +
  135. +actions link.dll bind LIBRARIES
  136. +{
  137. + "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" -h$(<[1]:D=) -G "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
  138. +}
  139. +
  140. +# Declare action for creating static libraries
  141. +actions piecemeal archive
  142. +{
  143. + "$(CONFIG_COMMAND)" -xar -o "$(<)" "$(>)"
  144. +}
  145. +
  146. --- boost/Jamroot.orig 2012-07-24 07:59:48.638807134 +0200
  147. +++ boost/Jamroot 2012-07-24 08:03:53.908851585 +0200
  148. @@ -145,7 +145,7 @@
  149. <conditional>@handle-static-runtime
  150. # The standard library Sun compilers use by default has no chance
  151. # of working with Boost. Override it.
  152. - <toolset>sun:<stdlib>sun-stlport
  153. + <toolset>sun:<stdlib>sun-stdcxx4
  154. # Comeau does not support shared lib
  155. <toolset>como:<link>static
  156. <toolset>como-linux:<define>_GNU_SOURCE=1
  157. --- boost/tools/build/v2/engine/build.jam.orig 2012-07-24 08:05:12.587532528 +0200
  158. +++ boost/tools/build/v2/engine/build.jam 2012-07-24 08:06:38.575780139 +0200
  159. @@ -329,6 +329,13 @@
  160. [ opt --debug : -g ]
  161. -I$(--python-include) -I$(--extra-include)
  162. : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
  163. +## Solaris Studio 12.3 with stdcxx4
  164. +toolset sun-stdcxx4 cc : "-o " : -D
  165. + :
  166. + [ opt --release : -s -xO3 ]
  167. + [ opt --debug : -g ]
  168. + -I$(--python-include) -I$(--extra-include)
  169. + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
  170. ## Compaq Alpha CXX
  171. toolset tru64cxx cc : "-o " : -D
  172. :
  173. --- tools_bb/engine/build.jam.orig 2012-07-23 20:57:17.579891071 +0200
  174. +++ tools_bb/engine/build.jam 2012-07-23 20:59:27.301189504 +0200
  175. @@ -329,6 +329,13 @@
  176. [ opt --debug : -g ]
  177. -I$(--python-include) -I$(--extra-include)
  178. : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
  179. +#Studio 12.1+ with stdcxx4
  180. +toolset sun-stdcxx4 cc : "-o " : -D
  181. + :
  182. + [ opt --release : -s -xO3 ]
  183. + [ opt --debug : -g ]
  184. + -I$(--python-include) -I$(--extra-include)
  185. + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
  186. ## Compaq Alpha CXX
  187. toolset tru64cxx cc : "-o " : -D
  188. :
  189. --- ./tools_bjam/build.jam.orig 2012-07-24 08:58:34.775334868 +0200
  190. +++ ./tools_bjam/build.jam 2012-07-24 08:59:17.203621470 +0200
  191. @@ -329,6 +329,13 @@
  192. [ opt --debug : -g ]
  193. -I$(--python-include) -I$(--extra-include)
  194. : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
  195. +## Solaris Studio with stdcxx4
  196. +toolset sun-stdcxx4 cc : "-o " : -D
  197. + :
  198. + [ opt --release : -s -xO3 ]
  199. + [ opt --debug : -g ]
  200. + -I$(--python-include) -I$(--extra-include)
  201. + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
  202. ## Compaq Alpha CXX
  203. toolset tru64cxx cc : "-o " : -D
  204. :
  205. --- tools_bb/bootstrap.sh.orig 2012-07-24 09:44:10.533898164 +0200
  206. +++ tools_bb/bootstrap.sh 2012-07-24 09:44:21.354697875 +0200
  207. @@ -74,7 +74,7 @@
  208. ;;
  209.  
  210. sun* )
  211. - TOOLSET=sun
  212. + TOOLSET=sun-stdcxx4
  213. ;;
  214.  
  215. * )
  216. --- /dev/null 2012-07-21 17:36:20.000000000 +0200
  217. +++ tools_bb/tools/sun-stdcxx4.jam 2012-07-21 19:43:52.462932182 +0200
  218. @@ -0,0 +1,142 @@
  219. +# Copyright (C) Christopher Currie 2003. Permission to copy, use,
  220. +# modify, sell and distribute this software is granted provided this
  221. +# copyright notice appears in all copies. This software is provided
  222. +# "as is" without express or implied warranty, and with no claim as
  223. +# to its suitability for any purpose.
  224. +
  225. +import property ;
  226. +import generators ;
  227. +import os ;
  228. +import toolset : flags ;
  229. +import feature ;
  230. +import type ;
  231. +import common ;
  232. +
  233. +feature.extend toolset : sun-stdcxx4 ;
  234. +toolset.inherit sun-stdcxx4 : unix ;
  235. +generators.override sun-stdcxx4.prebuilt : builtin.lib-generator ;
  236. +generators.override sun-stdcxx4.prebuilt : builtin.prebuilt ;
  237. +generators.override sun-stdcxx4.searched-lib-generator : searched-lib-generator ;
  238. +
  239. +feature.extend stdlib : sun-stdcxx4 ;
  240. +feature.compose <stdlib>sun-stdcxx4
  241. + : <cxxflags>-library=stdcxx4 <linkflags>-library=stdcxx4
  242. + ;
  243. +
  244. +rule init ( version ? : command * : options * )
  245. +{
  246. + local condition = [
  247. + common.check-init-parameters sun-stdcxx4 : version $(version) ] ;
  248. +
  249. + command = [ common.get-invocation-command sun-stdcxx4 : CC
  250. + : $(command) : "/opt/SUNWspro/bin" ] ;
  251. +
  252. + # Even if the real compiler is not found, put CC to
  253. + # command line so that user see command line that would have being executed.
  254. + command ?= CC ;
  255. +
  256. + common.handle-options sun-stdcxx4 : $(condition) : $(command) : $(options) ;
  257. +
  258. + command_c = $(command[1--2]) $(command[-1]:B=cc) ;
  259. +
  260. + toolset.flags sun-stdcxx4 CONFIG_C_COMMAND $(condition) : $(command_c) ;
  261. +}
  262. +
  263. +# Declare generators
  264. +generators.register-c-compiler sun-stdcxx4.compile.c : C : OBJ : <toolset>sun-stdcxx4 ;
  265. +generators.register-c-compiler sun-stdcxx4.compile.c++ : CPP : OBJ : <toolset>sun-stdcxx4 ;
  266. +
  267. +# Declare flags and actions for compilation
  268. +flags sun-stdcxx4.compile OPTIONS <debug-symbols>on : -g ;
  269. +flags sun-stdcxx4.compile OPTIONS <profiling>on : -xprofile=tcov ;
  270. +flags sun-stdcxx4.compile OPTIONS <optimization>speed : -xO4 ;
  271. +flags sun-stdcxx4.compile OPTIONS <optimization>space : -xO2 -xspace ;
  272. +flags sun-stdcxx4.compile OPTIONS <threading>multi : -mt ;
  273. +flags sun-stdcxx4.compile OPTIONS <warnings>off : -erroff ;
  274. +flags sun-stdcxx4.compile OPTIONS <warnings>on : -erroff=%none ;
  275. +flags sun-stdcxx4.compile OPTIONS <warnings>all : -erroff=%none ;
  276. +flags sun-stdcxx4.compile OPTIONS <warnings-as-errors>on : -errwarn ;
  277. +
  278. +flags sun-stdcxx4.compile.c++ OPTIONS <inlining>off : +d ;
  279. +
  280. +# The -m32 and -m64 options are supported starting
  281. +# with Sun Studio 12. On earlier compilers, the
  282. +# 'address-model' feature is not supported and should not
  283. +# be used. Instead, use -xarch=generic64 command line
  284. +# option.
  285. +# See http://svn.boost.org/trac/boost/ticket/1186
  286. +# for details.
  287. +flags sun-stdcxx4 OPTIONS <address-model>32 : -m32 ;
  288. +flags sun-stdcxx4 OPTIONS <address-model>64 : -m64 ;
  289. +# On sparc, there's a difference between -Kpic
  290. +# and -KPIC. The first is slightly more efficient,
  291. +# but has the limits on the size of GOT table.
  292. +# For minimal fuss on user side, we use -KPIC here.
  293. +# See http://svn.boost.org/trac/boost/ticket/1186#comment:6
  294. +# for detailed explanation.
  295. +flags sun-stdcxx4 OPTIONS <link>shared : -KPIC ;
  296. +
  297. +flags sun-stdcxx4.compile OPTIONS <cflags> ;
  298. +flags sun-stdcxx4.compile.c++ OPTIONS <cxxflags> ;
  299. +flags sun-stdcxx4.compile DEFINES <define> ;
  300. +flags sun-stdcxx4.compile INCLUDES <include> ;
  301. +
  302. +actions compile.c
  303. +{
  304. + "$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
  305. +}
  306. +
  307. +actions compile.c++
  308. +{
  309. + "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
  310. +}
  311. +
  312. +# Declare flags and actions for linking
  313. +flags sun-stdcxx4.link OPTIONS <debug-symbols>on : -g ;
  314. +# Strip the binary when no debugging is needed
  315. +flags sun-stdcxx4.link OPTIONS <debug-symbols>off : -s ;
  316. +flags sun-stdcxx4.link OPTIONS <profiling>on : -xprofile=tcov ;
  317. +flags sun-stdcxx4.link OPTIONS <threading>multi : -mt ;
  318. +flags sun-stdcxx4.link OPTIONS <linkflags> ;
  319. +flags sun-stdcxx4.link LINKPATH <library-path> ;
  320. +flags sun-stdcxx4.link FINDLIBS-ST <find-static-library> ;
  321. +flags sun-stdcxx4.link FINDLIBS-SA <find-shared-library> ;
  322. +flags sun-stdcxx4.link LIBRARIES <library-file> ;
  323. +flags sun-stdcxx4.link LINK-RUNTIME <runtime-link>static : static ;
  324. +flags sun-stdcxx4.link LINK-RUNTIME <runtime-link>shared : dynamic ;
  325. +flags sun-stdcxx4.link RPATH <dll-path> ;
  326. +# On gcc, there are separate options for dll path at runtime and
  327. +# link time. On Solaris, there's only one: -R, so we have to use
  328. +# it, even though it's bad idea.
  329. +flags sun-stdcxx4.link RPATH <xdll-path> ;
  330. +
  331. +# The POSIX real-time library is always needed (nanosleep, clock_gettime etc.)
  332. +flags sun-stdcxx4.link FINDLIBS-SA : rt ;
  333. +
  334. +rule link ( targets * : sources * : properties * )
  335. +{
  336. + SPACE on $(targets) = " " ;
  337. +}
  338. +
  339. +actions link bind LIBRARIES
  340. +{
  341. + "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
  342. +}
  343. +
  344. +# Slight mods for dlls
  345. +rule link.dll ( targets * : sources * : properties * )
  346. +{
  347. + SPACE on $(targets) = " " ;
  348. +}
  349. +
  350. +actions link.dll bind LIBRARIES
  351. +{
  352. + "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" -h$(<[1]:D=) -G "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
  353. +}
  354. +
  355. +# Declare action for creating static libraries
  356. +actions piecemeal archive
  357. +{
  358. + "$(CONFIG_COMMAND)" -xar -o "$(<)" "$(>)"
  359. +}
  360. +
  361. --- boost/tools/build/v2/test/BoostBuild.py.orig 2012-04-26 05:35:55.000000000 +0200
  362. +++ boost/tools/build/v2/test/BoostBuild.py 2012-07-26 02:35:50.890768498 +0200
  363. @@ -240,7 +240,10 @@
  364. else:
  365. jam_build_dir = "bin.linux" + os.uname()[4]
  366. elif os.uname()[0] == 'SunOS':
  367. - jam_build_dir = "bin.solaris"
  368. + if os.uname()[4] == "i386":
  369. + jam_build_dir = "bin.solarisx86"
  370. + else:
  371. + jam_build_dir = "bin.solaris"
  372. elif os.uname()[0] == 'Darwin':
  373. if os.uname()[4] == 'i386':
  374. jam_build_dir = "bin.macosxx86"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement