Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to make clang toolset use custom archiver and ranlib from user-config.jam?
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2017-04-04 03:56:53

Somehow I missed this email (too many email, too little brain time)..

On Wed, Mar 22, 2017 at 8:05 AM, Frédéric Bron via Boost-build <
boost-build_at_[hidden]> wrote:

> Hi,
> ar and ranlib cannot be customized for clang toolset as they are for
> gcc which makes it difficult to use in a cross-compilation
> environment. When cross-compiling from linux to windows, I can have in
> my user-config.jam:
> using gcc : : i686-w64-mingw32-g++-6.3.0 :
> <archiver>i686-w64-mingw32-ar <ranlib>i686-w64-mingw32-ranlib ;
> With the clang toolset, this does not work, archiver and ranlib
> options are ignored.
> This is why: here is what we find in tools/build/src/tools/clang-
> darwin.jam
> # Default value. Mostly for the sake of clang-linux
> # that inherits from gcc, but does not has the same
> # logic to set the .AR variable. We can put the same
> # logic in clang-linux, but that's hardly worth the trouble
> # as on Linux, 'ar' is always available.
> .AR = ar ;
> ...
> actions piecemeal archive
> {
> "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
> "ranlib" -cs "$(<)"
> }
> Unfortunately, I do not understand the language of jam files so the
> only thing I can do for the time being is to manually edit the file
> and replace ar and ranlib by their cross-compiler counterparts but I
> am not able to change it so that the archiver and ranlib option can be
> used.
> Could somebody do that or give hints on how I shoud do it?

Only hint is to look at how gcc.jam does it and copy the behavior to
clang-darwin.. Like the comment insinuates.


Or perhaps comment out the default value line. Maybe that will make the
target value be used. Sorry I can't be more help.. Would need to debug the
jam code to give a detailed answer. And, well, short on time :-(

-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams -
-- rrivera/ (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at