Boost logo

Boost Testing :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-04-12 03:13:58


Douglas Gregor wrote:

>> /usr/bin/ld: can't locate file for: -lcrt0.o
>>
>> Any ideas about this one?
>
> Yeah, we shouldn't be linking with "-static" on darwin, ever. The
> runtime always needs to be dynamically linked, so they don't provide
> static libraries for it. If I remove this bit from gcc.jam, the
> filesystem tests link and run properly on Darwin:
>
> # For <runtime-link>static we made sure there are no dynamic libraries
> # in the link
> flags gcc.link OPTIONS <runtime-link>static : -static ;
>
> If we can make that disappear for Darwin, but keep it around for all
> of the other GCC variants, we'll be all set.

Ah, that's easy. The following patch (already comitted to trunk and branch),
removes -static just for darwin.

Hope this will clear most failures.

- Volodya

--- darwin.jam 11 Apr 2006 06:14:44 -0000 1.19
+++ darwin.jam 12 Apr 2006 07:11:54 -0000
@@ -21,7 +21,11 @@
 generators.override darwin.searched-lib-generator :
searched-lib-generator ;

 toolset.inherit-rules darwin : gcc ;
-toolset.inherit-flags darwin : gcc ;
+toolset.inherit-flags darwin : gcc
+ : # On Darwin, static runtime is just not supported. So don't inherit
+ # any flags settings for <runtime-link>static
+ <runtime-link>static
+ ;


Boost-testing list run by mbergal at meta-comm.com