diff --strip-trailing-cr -bruEN -X exclude_from_diff.txt boost_1_34_0/tools/build/v2/tools/darwin.jam boost/tools/build/v2/tools/darwin.jam --- boost_1_34_0/tools/build/v2/tools/darwin.jam 2007-03-14 21:02:24.000000000 -0700 +++ boost/tools/build/v2/tools/darwin.jam 2007-05-13 13:21:23.828125000 -0700 @@ -49,8 +49,64 @@ feature framework : : free ; +# ADOBE : Adding architecture variant to build i386, ppc, or universal binaries; +# also adding static c++ lib settings and dead stripping on release + +# The following adds objective-c support to darwin. +# Thanks to http://thread.gmane.org/gmane.comp.lib.boost.build/13759 + +type.register OBJECTIVE_C : m ; +type.register OBJECTIVE_CPP : mm ; + +generators.register-c-compiler darwin.compile.m : OBJECTIVE_C : OBJ : darwin ; +generators.register-c-compiler darwin.compile.mm : OBJECTIVE_CPP : OBJ : darwin ; + +rule compile.m +{ + LANG on $(<) = "-x objective-c" ; +} + +actions compile.m +{ + "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" +} + +rule compile.mm +{ + LANG on $(<) = "-x objective-c++" ; +} + +actions compile.mm +{ + "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" +} + +feature sdkroot : 10.4 10.3.9 10.2.8 : propagated link-incompatible ; +flags darwin.compile OPTIONS 10.4 : -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 ; +flags darwin.link OPTIONS 10.4 : -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 ; +flags darwin.compile OPTIONS 10.3.9 : -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3.9 ; +flags darwin.link OPTIONS 10.3.9 : -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3.9 ; +flags darwin.compile OPTIONS 10.2.8 : -isysroot /Developer/SDKs/MacOSX10.2.8.sdk -mmacosx-version-min=10.2.8 ; +flags darwin.link OPTIONS 10.2.8 : -isysroot /Developer/SDKs/MacOSX10.2.8.sdk -mmacosx-version-min=10.2.8 ; + +feature arch : native ppc i386 fat : composite propagated ; +flags darwin.compile OPTIONS fat : -arch i386 -arch ppc ; +flags darwin.link OPTIONS fat : -arch i386 -arch ppc ; +flags darwin.compile OPTIONS i386 : -arch i386 ; +flags darwin.link OPTIONS i386 : -arch i386 ; +flags darwin.compile OPTIONS ppc : -arch ppc ; +flags darwin.link OPTIONS ppc : -arch ppc ; + +feature c++-lib : dynamic static : link-incompatible composite propagated ; +flags darwin.compile OPTIONS static : -fvisibility=hidden -fvisibility-inlines-hidden ; +flags darwin.link OPTIONS static : -nodefaultlibs -shared-libgcc -lstdc++-static -lgcc_eh -lgcc -lSystem ; + +flags darwin.link OPTIONS release : -Wl,-dead_strip -no_dead_strip_inits_and_terms ; + +# ADOBE end changes + flags darwin.compile OPTIONS shared : -dynamic ; -flags darwin.compile OPTIONS : -Wno-long-double -no-cpp-precomp ; +flags darwin.compile OPTIONS : -Wno-long-double -no-cpp-precomp -gdwarf-2 ; flags darwin.link FRAMEWORK ; @@ -91,6 +147,9 @@ actions piecemeal archive { - ar -c -r -s $(ARFLAGS) "$(<:T)" "$(>:T)" -} + # ADOBE : We use libtool instead of ar to support universal binary linking + + libtool -static -o "$(<:T)" $(ARFLAGS) "$(>:T)" + + # ADOBE end changes}