2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Files
build/v2/tools/mipspro.jam
K. Noel Belcourt 7aa07c8664 Update the mipspro.jam file so have the compiler
emit each referenced template in the object file
where referenced and then rely on the linker to
remove duplicates.

Added some missing macros to sgi_mipspro.hpp.



[SVN r39382]
2007-09-19 02:59:00 +00:00

146 lines
4.8 KiB
Plaintext

# Copyright Noel Belcourt 2007.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import property ;
import generators ;
import os ;
import toolset : flags ;
import feature ;
import fortran ;
import type ;
import common ;
feature.extend toolset : mipspro ;
toolset.inherit mipspro : unix ;
generators.override mipspro.prebuilt : builtin.lib-generator ;
generators.override mipspro.searched-lib-generator : searched-lib-generator ;
# Documentation and toolchain description located
# http://www.sgi.com/products/software/irix/tools/
rule init ( version ? : command * : options * )
{
local condition = [
common.check-init-parameters mipspro : version $(version) ] ;
command = [ common.get-invocation-command mipspro : CC : $(command) ] ;
common.handle-options mipspro : $(condition) : $(command) : $(options) ;
command_c = $(command_c[1--2]) $(command[-1]:B=cc) ;
toolset.flags mipspro CONFIG_C_COMMAND $(condition) : $(command_c) ;
# fortran support
local command = [
common.get-invocation-command mipspro : f77 : $(command) : $(install_dir) ] ;
command_f = $(command_f[1--2]) $(command[-1]:B=f77) ;
toolset.flags mipspro CONFIG_F_COMMAND $(condition) : $(command_f) ;
# set link flags
flags mipspro.link FINDLIBS-ST : [
feature.get-values <find-static-library> : $(options) ] : unchecked ;
flags mipspro.link FINDLIBS-SA : [
feature.get-values <find-shared-library> : $(options) ] : unchecked ;
}
# Declare generators
generators.register-c-compiler mipspro.compile.c : C : OBJ : <toolset>mipspro ;
generators.register-c-compiler mipspro.compile.c++ : CPP : OBJ : <toolset>mipspro ;
generators.register-fortran-compiler mipspro.compile.fortran : FORTRAN : OBJ : <toolset>mipspro ;
cpu-arch-32 =
<architecture>/<address-model>
<architecture>/<address-model>32 ;
cpu-arch-64 =
<architecture>/<address-model>64 ;
flags mipspro.compile OPTIONS $(cpu-arch-32) : -n32 ;
flags mipspro.compile OPTIONS $(cpu-arch-64) : -64 ;
# Declare flags and actions for compilation
flags mipspro.compile OPTIONS <debug-symbols>on : -g ;
# flags mipspro.compile OPTIONS <profiling>on : -xprofile=tcov ;
flags mipspro.compile OPTIONS <warnings>off : -w ;
flags mipspro.compile OPTIONS <warnings>on : -ansiW ;
flags mipspro.compile OPTIONS <warnings>all : -fullwarn ;
flags mipspro.compile OPTIONS <optimization>speed : -Ofast ;
flags mipspro.compile OPTIONS <optimization>space : -O2 ;
# flags mipspro.compile OPTIONS <threading>multi : -mt ;
flags mipspro.compile OPTIONS <cflags> : -LANG:std ;
flags mipspro.compile.c++ OPTIONS <inlining>off : -INLINE:none ;
flags mipspro.compile.c++ OPTIONS <cxxflags> ;
flags mipspro.compile DEFINES <define> ;
flags mipspro.compile INCLUDES <include> ;
flags mipspro.compile.fortran OPTIONS <fflags> ;
actions compile.c
{
"$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions compile.c++
{
"$(CONFIG_COMMAND)" -FE:template_in_elf_section -ptused $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions compile.fortran
{
"$(CONFIG_F_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
# Declare flags and actions for linking
flags mipspro.link OPTIONS <debug-symbols>on : -g ;
# Strip the binary when no debugging is needed
# flags mipspro.link OPTIONS <debug-symbols>off : -s ;
# flags mipspro.link OPTIONS <profiling>on : -xprofile=tcov ;
# flags mipspro.link OPTIONS <threading>multi : -mt ;
flags mipspro.link OPTIONS $(cpu-arch-32) : -n32 ;
flags mipspro.link OPTIONS $(cpu-arch-64) : -64 ;
flags mipspro.link OPTIONS <optimization>speed : -Ofast ;
flags mipspro.link OPTIONS <optimization>space : -O2 ;
flags mipspro.link OPTIONS <linkflags> ;
flags mipspro.link LINKPATH <library-path> ;
flags mipspro.link FINDLIBS-ST <find-static-library> ;
flags mipspro.link FINDLIBS-SA <find-shared-library> ;
flags mipspro.link LIBRARIES <library-file> ;
flags mipspro.link LINK-RUNTIME <runtime-link>static : static ;
flags mipspro.link LINK-RUNTIME <runtime-link>shared : dynamic ;
flags mipspro.link RPATH <dll-path> ;
rule link ( targets * : sources * : properties * )
{
SPACE on $(targets) = " " ;
}
actions link bind LIBRARIES
{
"$(CONFIG_COMMAND)" -FE:template_in_elf_section -ptused $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
}
# Slight mods for dlls
rule link.dll ( targets * : sources * : properties * )
{
SPACE on $(targets) = " " ;
}
actions link.dll bind LIBRARIES
{
"$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)
}
# Declare action for creating static libraries
actions piecemeal archive
{
ar -cr "$(<)" "$(>)"
}