« Return to Thread: [Boost][build] Bjam ordering source $(>) list

[Boost][build] Bjam ordering source $(>) list

by K. Noel Belcourt :: Rate this Message:

Reply to Author | View in Thread

Hi,

In jam/src/make1.c, make1list(), I find this comment

* make1list() - turn a list of targets into a LIST, for $(<) and $(>).

which seems like the place where I could ensure that sources for, say  
a link action $(>) are ordered so that objects occur before archives  
or shared libraries.  Some background.

We're bringing up support for linking Fortran programs and have  
discovered that when linking C programs, the objects in $(>) always  
precede the libraries, which is good since the main is often in an  
object file.  This is an issue if, for example, your linker doesn't  
support start / end group and the library precedes the object  
containing main (you get linker errors).

In our case, it seems that our objects always precede any libraries  
when linking with C, but when linking with Fortran, we find the  
libraries precede the objects and, hence, we get linker errors.

Back to make1list().  It seems like this is the place where the list  
of sources and targets for an action are turned into a list for $(<)  
and $(>).  Does anyone know (1) if bjam intentionally sorts objects  
before libraries for $(>) and, if it does as it seems to, (2) where  
is to code in bjam that does this?

Any ideas?

Thanks.

-- Noel Belcourt


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

 « Return to Thread: [Boost][build] Bjam ordering source $(>) list