|
Boost-Commit : |
From: ghost_at_[hidden]
Date: 2007-08-25 00:34:33
Author: vladimir_prus
Date: 2007-08-25 00:34:31 EDT (Sat, 25 Aug 2007)
New Revision: 38919
URL: http://svn.boost.org/trac/boost/changeset/38919
Log:
Use -KPIC for shared libs. Addresses #1186.
Text files modified:
trunk/tools/build/v2/tools/builtin.jam | 29 +++++++++++++----------------
trunk/tools/build/v2/tools/sun.jam | 7 +++++++
2 files changed, 20 insertions(+), 16 deletions(-)
Modified: trunk/tools/build/v2/tools/builtin.jam
==============================================================================
--- trunk/tools/build/v2/tools/builtin.jam (original)
+++ trunk/tools/build/v2/tools/builtin.jam 2007-08-25 00:34:31 EDT (Sat, 25 Aug 2007)
@@ -333,31 +333,28 @@
rule __init__ ( name
: project
: shared ?
- : real-name ?
: search *
: action
)
{
- abstract-file-target.__init__ $(name) : SEARCHED_LIB : $(project)
- : $(action) ;
+ abstract-file-target.__init__ $(name) exact : SEARCHED_LIB : $(project)
+ : $(action) : ;
+
+ local rn = [ apply-tag $(name) : [ tag-properties ] ] ;
+ if $(rn)
+ {
+ self.name = $(rn) ;
+ }
self.shared = $(shared) ;
- self.real-name = $(real-name) ;
- self.real-name ?= $(name) ;
self.search = $(search) ;
}
-
-
+
rule shared ( )
{
return $(self.shared) ;
}
-
- rule real-name ( )
- {
- return $(self.real-name) ;
- }
-
+
rule search ( )
{
return $(self.search) ;
@@ -578,8 +575,8 @@
local search = [ feature.get-values <search> : $(properties) ] ;
a = [ new null-action $(property-set) ] ;
- local t = [ new searched-lib-target $(name) : $(project) : $(shared)
- : [ feature.get-values <name> : $(properties) ]
+ local lib-name = [ feature.get-values <name> : $(properties) ] ;
+ local t = [ new searched-lib-target $(lib-name) : $(project) : $(shared)
: $(search)
: $(a)
] ;
@@ -809,7 +806,7 @@
{
if [ type.is-derived [ $(s).type ] SEARCHED_LIB ]
{
- local name = [ $(s).real-name ] ;
+ local name = [ $(s).name ] ;
if [ $(s).shared ]
{
fsa += $(name) ;
Modified: trunk/tools/build/v2/tools/sun.jam
==============================================================================
--- trunk/tools/build/v2/tools/sun.jam (original)
+++ trunk/tools/build/v2/tools/sun.jam 2007-08-25 00:34:31 EDT (Sat, 25 Aug 2007)
@@ -56,6 +56,13 @@
flags sun OPTIONS <address-model>32 : -m32 ;
flags sun OPTIONS <address-model>64 : -m64 ;
+# On sparc, there's a difference between -Kpic
+# and -KPIC. The first is slightly more efficient,
+# but has the limits on the size of GOT table.
+# For minimal fuss on user side, we use -KPIC here.
+# See http://svn.boost.org/trac/boost/ticket/1186#comment:6
+# for detailed explanation.
+flags sun OPTIONS <link>shared : -KPIC ;
flags sun.compile OPTIONS <cflags> ;
flags sun.compile.c++ OPTIONS <cxxflags> ;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk