|
Boost-Build : |
From: Ralf W. Grosse-Kunstleve (RWGK_at_[hidden])
Date: 2002-06-06 13:08:06
The last couple of days I have been trying to compile Boost.Python
using mipspro-tools.jam. Eventually I had to rewrite most of the file.
The current result is attached. This works for almost all of
Boost.Python (I believe the remaining problems are not specific
to mipspro-tools.jam).
The file below does away with the hard-wired system paths. IMO it
is much better to rely on the compiler for providing these.
It should be possible to use another ABI with e.g.
-sMIPS_ABI="-n64 mips4", but I haven't actually tried it.
Is there someone who feels responsible for maintaining
mipspro-tools.jam in the central boost cvs tree? If not, I could
assume this role. If there are suggestions for improving the
attached file, please let me know.
Ralf
set-as-singleton MIPS_ABI CC_CMD CPP_CMD ;
MIPS_ABI ?= -n32 -mips3 ;
CC_CMD ?= cc ;
CPP_CMD ?= CC ;
flags mipspro LINKFLAGS : -LANG:std ;
flags mipspro LINKFLAGS <target-type>$(SHARED_TYPES) : -shared ;
flags mipspro LINKFLAGS <runtime-link>static : -non_shared ;
flags mipspro LINKFLAGS <debug-symbols>on : -g ;
flags mipspro CFLAGS : -c -OPT:Olimit=0 -OPT:IEEE_NaN_inf=ON ;
flags mipspro CFLAGS <debug-symbols>on : -g ;
flags mipspro CFLAGS <optimization>off : -O0 ;
flags mipspro CFLAGS <optimization>speed : -O3 ;
flags mipspro CFLAGS <optimization>space : -O2 ;
flags mipspro CFLAGS <inlining>off : -INLINE:none ;
flags mipspro CFLAGS <inlining>full : -INLINE:all ;
flags mipspro C++FLAGS : -LANG:std -woff 1311 ;
flags mipspro C++FLAGS <exception-handling>off : -LANG:exceptions=OFF ;
flags mipspro CFLAGS <cflags> ;
flags mipspro C++FLAGS <cxxflags> ;
flags mipspro DEFINES <define> ;
flags mipspro UNDEFS <undef> ;
flags mipspro HDRS <include> ;
flags mipspro STDHDRS <sysinclude> ;
flags mipspro LINKFLAGS <linkflags> ;
flags mipspro ARFLAGS <arflags> ;
if ! $(ARFLAGS)
{
flags mipspro ARFLAGS : "" ;
}
BOOST_COMPATIBILITY ?= $(BOOST_ROOT)$(SLASH)boost$(SLASH)compatibility$(SLASH)cpp_c_headers ;
flags mipspro STDHDRS : $(BOOST_COMPATIBILITY) ;
#### Link (for C++) ####
rule Link-action
{
mipspro-Link-action "$(<)" : "$(>)" ;
}
# for mipspro, we repeat all libraries so that dependencies are always resolved
actions mipspro-Link-action bind NEEDLIBS NEEDIMPS
{
$(CPP_CMD) $(LINKFLAGS) -o "$(<)" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" "$(IMPLIB_FLAGS)$(NEEDIMPS)" -l$(FINDLIBS)
}
#### Cc #####
rule Cc-action
{
mipspro-Cc-action "$(<)" : "$(>)" ;
}
actions mipspro-Cc-action
{
$(CC_CMD) $(MIPS_ABI) "-U$(UNDEFS)" "-D$(DEFINES)" "$(CFLAGS)" "-I$(HDRS)" -o "$(<)" "$(>)"
}
#### C++ ####
rule C++-action
{
mipspro-C++-action "$(<)" : "$(>)" ;
}
actions mipspro-C++-action
{
"$(CPP_CMD)" $(MIPS_ABI) "-U$(UNDEFS)" "-D$(DEFINES)" "$(CFLAGS)" "$(C++FLAGS)" -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}
#### Archive ####
rule Archive-action
{
mipspro-Archive-action "$(<)" : "$(>)" ;
}
actions updated together piecemeal mipspro-Archive-action
{
$(CPP_CMD) -ar $(CFLAGS) $(C++FLAGS) -o "$(<:T)" "$(>:T)"
}
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