List Info

Thread: Testing Tru64 toolset




Testing Tru64 toolset
user name
2006-02-08 11:23:55
Hello Markus,
I've just ported the Tru64 toolset from V1 to V2, and added
it to CVS. For 
convenienve, the file is also attached.

Since I don't have the compiler, I can't test it. I've
verified that it 
produces some command lines, but have no idea if those
command lines are 100% 
correct. 

If you could do initial testing of the toolset, I'd be very
gratefull. I 
believe you're the only one in Boost with access to that
compiler.

I've put together instructions for testing a new toolset at

   http://zigzag.cs.msu.su/boost.build/wiki/TestingNewToo
lset

Overall, it should take no more that 5 mins to either work
though all steps 
and verify that toolset works, or run into an error.

Thanks in advance,
Volodya
# Copyright 2001 David Abrahams.
# Copyright 2004, 2005 Markus Schoepflin.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost
.org/LICENSE_1_0.txt)

#
# Jam tools information for :
# Compaq Alpha CXX compiler
#
# Notes on this toolset:
#
# - Because of very subtle issues with the default ansi
mode, strict_ansi mode
#   is used for compilation. One example of things that
don't work correctly in
#   the default ansi mode is overload resolution of function
templates when
#   mixed with non-template functions.
#
# - For template instantiation "-timplicit_local"
is used. Previously,
#   "-tlocal" has been tried to avoid the need for
a template repository
#   but this doesn't work with manually instantiated
templates. "-tweak"
#   has not been used to avoid the stream of warning
messages issued by
#   ar or ld when creating a library or linking an
application.
#
# - Debug symbols are generated with "-g3", as
this works both in debug and
#   release mode. When compiling C++ code without
optimization, we additionally
#   use "-gall", which generates full symbol table
information for all classes,
#   structs, and unions. As this turns off optimization, it
can't be used when
#   optimization is needed.
#

import feature generators common ;
import toolset : flags ;

feature.extend toolset : tru64 ;

# Inherit from Unix toolset to get library ordering magic.
toolset.inherit  tru64 : unix ;

#toolset.inherit-generators tru64 : unix : unix.link
unix.link.dll ;

generators.override builtin.lib-generator : tru64.prebuilt ;
generators.override tru64.searched-lib-generator :
searched-lib-generator ;

#feature.subfeature toolset tru64 : version ;


rule init ( version ? : command * : options * )
{
    local condition = [ common.check-init-parameters tru64 :
version $(version) ] ;
    
    local command = [ common.get-invocation-command tru64 :
cxx : $(command) ] ;
    command ?= cxx ;

    common.handle-options tru64 : $(condition) : $(command)
: $(options) ;   
}

generators.register-c-compiler tru64.compile.c++ : CPP : OBJ
: <toolset>tru64 ;
generators.register-c-compiler tru64.compile.c : C : OBJ :
<toolset>tru64 ;



# No static linking as far as I can tell.
# flags cxx LINKFLAGS <runtime-link>static : -bstatic
;
flags tru64.compile OPTIONS <debug-symbols>on : -g3 ;
flags tru64.compile OPTIONS.c++
<optimization>off/<debug-symbols>on : -gall ;
flags tru64.link OPTIONS <debug-symbols>on : -g ;
flags tru64.link OPTIONS <debug-symbols>off : -s ;
# FIXME: Can we just add '-shared' to link.dll rule below?
# FIXME: What about -expect_unresolved, what do they do?
#flags tru64.link OPTIONS <target-type>$(SHARED_TYPES)
: -shared -expect_unresolved 'Py*' -expect_unresolved '_Py*'
;

flags tru64.compile OPTIONS <optimization>off : -O0 ;
flags tru64.compile OPTIONS
<optimization>speed/<inlining>on : -O2 ;
flags tru64.compile OPTIONS <optimization>speed : -O2
;

# This (undocumented) macro needs to be defined to get all C
function
# overloads required by the C++ standard.
flags tru64.compile.c++ OPTIONS : -D__CNAME_OVERLOADS ;

# Added for threading support
flags tru64.compile OPTIONS <threading>multi :
-pthread ;
flags tru64.link OPTIONS <threading>multi : -pthread ;

flags tru64.compile OPTIONS
<optimization>space/<inlining>on :
<inlining>size ;
flags tru64.compile OPTIONS <optimization>space : -O1
;
flags tru64.compile OPTIONS <inlining>off : -inline
none ;

# The compiler versions tried (up to V6.5-040) hang when
compiling Boost code
# with full inlining enabled. So leave it at the default
level for now.
#
# flags tru64.compile OPTIONS <inlining>full : -inline
all ;

flags tru64.compile OPTIONS <profiling>on : -pg ;
flags tru64.link OPTIONS <profiling>on : -pg ;

# Selection of the object model. This flag is needed on both
the C++ compiler
# and linker command line.
#
# FIXME: Don't know what this <object-model> feature
does. Disabling until
# it's figured out.

#flags tru64.compile.c++ OPTIONS <object-model>arm :
-model arm ;
#flags tru64.compile.c++ OPTIONS <object-model>ansi :
-model ansi ;
#flags tru64.compile.c++ OPTIONS <object-model>default
: -model ansi ;


#flags tru64.link OPTIONS <object-model>arm : -model
arm ;
#flags tru64.link OPTIONS <object-model>ansi : -model
ansi ;
#flags tru64.link OPTIONS <object-model>default :
-model ansi ;


flags tru64.compile OPTIONS <cflags> ;
flags tru64.compile.c++ OPTIONS <cxxflags> ;
flags tru64.compile DEFINES <define> ;
flags tru64.compile INCLUDES <include> ;
flags tru64.link OPTIONS <linkflags> ;

flags tru64.link LIBPATH <library-path> ;
flags tru64.link LIBRARIES <library-file> ;
flags tru64.link FINDLIBS-ST <find-static-library> ;
flags tru64.link FINDLIBS-SA <find-shared-library> ;


actions link bind LIBRARIES
{
    $(CONFIG_COMMAND) -noimplicit_include $(OPTIONS) -o
"$(<)" -L$(LIBPATH) "$(>)"
"$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA)
-lrt -lm
}

actions link.dll bind LIBRARIES
{
    $(CONFIG_COMMAND)  -qrtti  -noimplicit_include
$(OPTIONS) -o "$(<[1])" -L$(LIBPATH) 
"$(>)" "$(LIBRARIES)"
-l$(FINDLIBS-ST) -l$(FINDLIBS-SA) -lm
}


# Note: Relaxed ANSI mode (-std) is used for compilation
because in strict ANSI
# C89 mode (-std1) the compiler doesn't accept C++ comments
in C files. As -std
# is the default, no special flag is needed.

# FIXME: Need to add whatever flags that makes compiler act
in C mode.
actions compile.c
{
    $(CONFIG_COMMAND) -msg_display_number -msg-disable
186,450,1115 -c $(OPTIONS) -D$(DEFINES)
-I"$(INCLUDES)" -o "$(<)"
"$(>)"
}

# Note: DON'T disable warning 1133 -- the compiler is buggy
and you
# really can't ignore this one!
actions compile.c++
{
    $(CONFIG_COMMAND)  -c -std strict_ansi -nopure_cname
-noimplicit_include -timplicit_local -ptr
"$(<[1])/cxx_re
pository" -msg_display_number -msg_disable 186,450,1115
$(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o
"$(<)" "$(>)"
}

actions updated together piecemeal archive
{
  ar -ru $(<) $(>)
}
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Testing Tru64 toolset
user name
2006-02-08 12:43:09
Vladimir Prus wrote:

> I've just ported the Tru64 toolset from V1 to V2, and
added it to CVS. For 
> convenienve, the file is also attached.
> 
> Since I don't have the compiler, I can't test it. I've
verified that it 
> produces some command lines, but have no idea if those
command lines are 100% 
> correct. 
> 
> If you could do initial testing of the toolset, I'd be
very gratefull. I 
> believe you're the only one in Boost with access to
that compiler.
> 
> I've put together instructions for testing a new
toolset at
> 
>    http://zigzag.cs.msu.su/boost.build/wiki/TestingNewToo
lset
> 
> Overall, it should take no more that 5 mins to either
work though all steps 
> and verify that toolset works, or run into an error.


I just had a look at the new toolset. First a thing about
it's name. The 
compiler is named cxx, the platform is Tru64, so shouldn't
the toolset be 
named cxx-tru64 or tru64-cxx or something similar?

The simple example seems to work:

 > bjam -a -d+2 tru64
tru64.compile.c++ bin/tru64/debug/hello.o

     cxx  -c -std strict_ansi -nopure_cname
-noimplicit_include 
-timplicit_local -ptr
"bin/tru64/debug/cxx_repository"
-msg_display_number 
-msg_disable 186,450,1115 -D__CNAME_OVERLOADS -g3 -O0
-inline none   -o 
"bin/tru64/debug/hello.o" "hello.cpp"

But I'm missing -gall, and -model ansi on the compiler
command line. 
Looking at the jam file, the model feature has been disabled
explicitly. 
Here is an excerpt from the compiler man page about this
feature:

<quote>
-model [ansi | arm]
[Tru64] Determines the layout of C++ classes, name mangling,
and
exception handling.  On Tru64 UNIX, the default is -model
arm; on
Linux Alpha, the default is -model ansi. The -model arm
option is not
supported on Linux Alpha.

The -model arm option is the default and generates objects
that are
link compatible with all HP C++ releases prior to Version
6.3, and
with all objects compiled using the -model arm option in HP
C++ Ver-
sion 6.3 or later. Specifying this option defines the macro
__MODEL_ARM.

The -model ansi option supports the complete ISO/ANSI C++
specifica-
tion, including distinct name mangling for templates.  The
ANSI model
also reduces the size of C++ non-POD class objects.  Note
that this
option generates objects that are not compatible with prior
releases
of HP C++, or with objects compiled using the -model arm
option.

If you specify the -model ansi option, you must recompile
your entire
application, including libraries.  Specifying this option
defines the
macro __MODEL_ANSI.
</quote>

tru64.link bin/tru64/debug/hello

     cxx -noimplicit_include -g -o
"bin/tru64/debug/hello" 
"bin/tru64/debug/hello.o"    -lrt -lm

Here the model flag is missing as well.

The next example fails:

 > bjam -a -d+2 tru64
tru64.compile.c++ app/bin/tru64/debug/app.o

     cxx  -c -std strict_ansi -nopure_cname
-noimplicit_include 
-timplicit_local -ptr
"app/bin/tru64/debug/cxx_repository" 
-msg_display_number -msg_disable 186,450,1115
-D__CNAME_OVERLOADS -g3 -O0 
-inline none  -I"util/foo/include" -o
"app/bin/tru64/debug/app.o"
"app/app.cpp"

tru64.compile.c++ util/foo/bin/tru64/debug/bar.o

     cxx  -c -std strict_ansi -nopure_cname
-noimplicit_include 
-timplicit_local -ptr
"util/foo/bin/tru64/debug/cxx_repository" 
-msg_display_number -msg_disable 186,450,1115
-D__CNAME_OVERLOADS -g3 -O0 
-inline none   -o "util/foo/bin/tru64/debug/bar.o"
"util/foo/bar.cpp"

cxx: Warning: util/foo/bar.cpp, line 13: #381-D extra
";" ignored
void foo() {};
-------------^
tru64.link.dll util/foo/bin/tru64/debug/libbar.so

     cxx  -qrtti  -noimplicit_include -g -o 
"util/foo/bin/tru64/debug/libbar.so"  
"util/foo/bin/tru64/debug/bar.o"    -lm

ld (prelink):
-qrtti: Unknown flag
ld: Usage: ld [options] file [...]
ld:
-qrtti: Unknown flag
ld: Usage: ld [options] file [...]
...skipped <papp/bin/tru64/debug>app for lack of 
<putil/foo/bin/tru64/debug>libbar.so...
...failed updating 1 target...

I have no idea where the -qrtti flag comes from in the
original V1 toolset, 
but it seems that the corresponding rule is never used
because building 
shared libs works on Tru64 in V1. So using the regular link
rule should 
instead should work, I guess.

About the C compiler, I don't think there are any flags that
will help you 
here. You have to invoke cc and not cxx, as is the case in
the V1 toolset.

I don't have time for more right now, but I will try to
address the other 
FIXME comments in the toolset file this week.

Regards, Markus

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

about | contact  Other archives ( Real Estate discussion Medical topics )