|
Boost-Build : |
From: muchacho_30 (aachkar_at_[hidden])
Date: 2004-10-08 03:12:44
Hi,
Sorry for the long post, but I have to explain this in detail.
I am trying to create a toolset called icc for the ImageCraft
compiler, so I am basing it on boost-build/tools/gcc.jam
My biggest problem is the linker. I copied and modified the following
lines:
----------[icc.jam]----------
flags icc.link OPTIONS <linkflags> ;
flags icc.link LINKPATH <library-path> ;
flags icc.link LIBRARIES <library-file> ;
flags icc.link FINDLIBS-ST <find-static-library> ;
feature libname : : free ; # I added these 2 lines
flags icc.link FINDLIBS-ST <libname> ;
actions link bind LIBRARIES # and modified this actions
{
C:/icc/bin/icc12w $(LN_FLAGS) -g $(OPTIONS) -Lc:/icc/lib -o "$(<:W)"
"$(>:W)" -l$(FINDLIBS-ST)
}
-----------------------------
Now, in my generic/apps/rf/Jamfile, I have:
-----[generic/apps/rf/Jamfile]-----
exe main : # Sources
vectors.c reset.c main.c cfg.c
# Local libraries
task cmd
# Public libraries
../../libs/crc//crc
../../libs/nvm//nvm
../../libs/bqueue//bqueue
# Remote libraries
os c12 c12p
: # Requirements
<link>static
: # Default Build
;
lib os : : <name>os ;
lib c12 : : <name>c12 ;
lib c12p : : <name>c12p ;
### Application Specific Files ###
lib task : task_console.c : <link>static ;
lib cmd : con_cmd_interpreter.c : <link>static ;
---------------------------------
and one of my public libraries is:
-----[generic/libs/bqueue/Jamfile]-----
lib bqueue : bqueue.c
: <link>static
<libname>bqueue
#<name>bqueue ### Doesn't work!
;
---------------------------------------
My compiler needs to see something like -los to find the library
libos.a in its search path (which is currently hard-coded as
c:\icc\lib). I am getting on the command line something like:
icc12w -o {path}main.exe {path}file1.o file2.o ........ -los -lc12 c12p
which is good, but still missing: -lbqueue -lcrc -lnvm
The manual says we can use the <name> feature for pre-built libraries
(which is what I did for os, c12, c12p), however, the other libraries
(bqueue, crc, nvm) are being passed in the LIBRARIES variable as:
../../../generic/libs/crc/bin/icc/debug/link-static/libcrc.a
../../../generic/libs/nvm/bin/icc/debug/link-static/libnvm.a
../../../generic/libs/bqueue/bin/icc/debug/link-static/libbqueue.a
so, I cannot use -l$(LIBRARIES) because the linker appends the prefix
'lib' and the suffix '.a' to the above filenames.
I tried creating a feature called <libname> that would add the value
after it to the variable FINDLIBS-ST , however, it does not seem to
work like I think it should, or maybe I'm missing something?
Any help would be greatly appreciated.
Thanks!
Alain.
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