|
Boost-Build : |
From: Christopher Currie (Christopher_at_[hidden])
Date: 2003-11-05 23:30:01
This patch is an incremental improvement to the darwin toolset.
* Set the proper suffix for shared libraries
* Added C and C++ compile options used in v1:
-Wno-long-double, -no-cpp-precomp, and -fcoalesce-templates
* Converted the link.dll rule to use the bundled libtool
* Added support for linking to frameworks
This toolset is still in its preliminary stages, so it still needs lots
of work and testing to get it up to the level of v1. Particularly, Rene
Rivera commented that it took some time and effort for v1 to work with
Boost.Python.
I managed to fix my local Jamfile.v2 to get Boost.Python itself to build
and link, but there isn't a Jamfile.v2 in libs/python/test, so I don't
know if the library works yet.
Index: darwin.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/darwin.jam,v
retrieving revision 1.1
diff -u -r1.1 darwin.jam
--- darwin.jam 29 Aug 2003 07:33:28 -0000 1.1
+++ darwin.jam 6 Nov 2003 04:14:07 -0000
@@ -7,30 +7,47 @@
# Please see http://article.gmane.org/gmane.comp.lib.boost.build/3389/
# for explanation why it's a separate toolset.
+import feature : feature ;
import toolset : flags ;
+import type ;
toolset.register darwin ;
toolset.inherit darwin : gcc ;
+# No additional initialization should be necessary
rule init ( )
{
}
-flags darwin.link.dll OPTIONS : -Wl,-dynamic -nostartfiles -Wl,-dylib
-Wl,-ldyl
ib1.o ;
+# Darwin has a different shared library suffix
+type.set-generated-target-suffix SHARED_LIB : <toolset>darwin : dylib ;
+
+feature framework : : free ;
+
+flags darwin.compile OPTIONS <link>shared : -dynamic ;
+flags darwin.compile OPTIONS : -Wno-long-double -no-cpp-precomp ;
+flags darwin.compile.c++ OPTIONS : -fcoalesce-templates ;
+
+flags darwin.link FRAMEWORK <framework> ;
+
+# This is flag is useful for debugging the link step
+# uncomment to see what libtool is doing under the hood
+# flags darwin.link.dll OPTIONS : -Wl,-v ;
actions link bind LIBRARIES
{
- $(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)"
"$(LIBRARIES)" -l
$(FINDLIBS-SA) -l$(FINDLIBS-ST)
+ $(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)"
"$(LIBRARIES)" -l
$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK)
+}
+
+rule link.dll
+{
+ _ on $(<) = " " ;
}
actions link.dll bind LIBRARIES
{
- ld -dynamic -m -r -d -o "$(<:S=.lo)" "$(>)" \
- && \
- $(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(<:S=.lo)"
"$(LIBRARIE
S)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) \
- && \
- rm -f "$(<:S=.lo)"
+ $(NAME:E=g++) -dynamiclib $(OPTIONS) -o "$(<)" "$(>)"
"$(LIBRARIES)" -l$(FI
NDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK)
}
actions piecemeal archive
Boost-Build 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