List Info

Thread: Multiple compiler and cross-compilation support




Multiple compiler and cross-compilation support
user name
2006-04-25 11:41:45
Hello,

I'm currently evaluating the usage of Boost.Build for our
software
development.  We have a rather intricate set of requirements
for
building.  I've looked at Boost.Build, and managed to set
up a
hierarchical set of project decriptions that builds a simple
executable,
but I've been unable to find a good approach for the
following aspects
of building:

 * Cross-Compilation support

    This should be obvious, we need to cross-compile for a
number of
embedded platforms. I know that's a feature other people
need too,
what's a good way to get started?

 * Mixing different compilers

    We need to compile different libraries using different
toolsets, and
link them all together into one executable.  It's not clear
to me how
this can be done.

 * Separate build directories

    I might want to compile for different embedded devices,
which are
all the same nominal platform (WinCE), but require a
different set of
<define>s.  How do I express that, and how do I keep
the build results
for different sets of <define>s apart?

It would be nice if somebody could give me a few hints there
on how to
approach this.

Regards,
Andreas




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-25 11:45:14
On Tuesday 25 April 2006 15:41, Andreas Bogk wrote:
> Hello,
>
> I'm currently evaluating the usage of Boost.Build for
our software
> development.  We have a rather intricate set of
requirements for
> building.  I've looked at Boost.Build, and managed to
set up a
> hierarchical set of project decriptions that builds a
simple executable,
> but I've been unable to find a good approach for the
following aspects
> of building:

Hi Andreas,

>  * Cross-Compilation support
>
>     This should be obvious, we need to cross-compile
for a number of
> embedded platforms. I know that's a feature other
people need too,
> what's a good way to get started?

This is not currently supported. We have
"architecture" feature that can be 
used to specify which architecture you want, but few
toolsets care about it.
Can you describe what compilers you use, and that system you
target. Maybe we 
can agree on the right interface, and then tweak some
toolset files to do 
what you want.

>  * Mixing different compilers
>
>     We need to compile different libraries using
different toolsets, and
> link them all together into one executable.  It's not
clear to me how
> this can be done.

For example:

   exe my : a b main.cpp ;
   lib a : a.cpp : <toolset>intel ;
   lib b : b.cpp : <toolset>gcc ;

In this case, 'a' and 'b' will be built with the
specific compilers specified 
above, not matter what compiler is used to build 'my'.

>  * Separate build directories
>
>     I might want to compile for different embedded
devices, which are
> all the same nominal platform (WinCE), but require a
different set of
> <define>s.  How do I express that, and how do I
keep the build results
> for different sets of <define>s apart?

You can define new 'composite' feature:

   feature.feature wince_flavour : 1 2 3 4 : propagated
composite ;
   feature.compose <wince_flavour>1 :
<define>WINCE_1 ;

HTH,
Volodya

-- 
Vladimir Prus
http://vladimir_pru
s.blogspot.com
Boost.Build V2: http://boost.org/boost-
build2
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-25 13:07:34
Hi Vladimir,

thans for the swift response.

Vladimir Prus schrieb:
>>  * Cross-Compilation support
> Can you describe what compilers you use, and that
system you target. Maybe we 
> can agree on the right interface, and then tweak some
toolset files to do 
> what you want.

We use a mix of MSVC, gcc and the occasional vendor
compiler.  Target
systems are smart phones in a number of varieties, usually
something
based on ARM and WinCE.

A good interface for cross compilation would probably
distiguish between
the host system and the target system, and know about
architecture and
platform respectively.  For instance, one could have
attributes
"host-architecture",
"host-platform",
"target-architecture",
"target-platform".  I'm tempted to even suggest
a "target-model"
attribute, some things in the build process depend on the
specific model
of the phone, for instance because they depend on the screen
size, or
buttons present.

Both architectures and platforms would ideally form some
kind of
hierarchy each, e.g. "arm926" is a
"arm9" is a "arm" architecture; or
"WinCE50" is a "WinCE" is a
"Win32" platform.  I'd like to say somewhere
"I'm now compiling for this arm926 on WinCE50",
and then in some library
say "use this file on PowerPC, and that file on
ARM".

Regards,
Andreas


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-25 13:07:34
Hi Vladimir,

thans for the swift response.

Vladimir Prus schrieb:
>>  * Cross-Compilation support
> Can you describe what compilers you use, and that
system you target. Maybe we 
> can agree on the right interface, and then tweak some
toolset files to do 
> what you want.

We use a mix of MSVC, gcc and the occasional vendor
compiler.  Target
systems are smart phones in a number of varieties, usually
something
based on ARM and WinCE.

A good interface for cross compilation would probably
distiguish between
the host system and the target system, and know about
architecture and
platform respectively.  For instance, one could have
attributes
"host-architecture",
"host-platform",
"target-architecture",
"target-platform".  I'm tempted to even suggest
a "target-model"
attribute, some things in the build process depend on the
specific model
of the phone, for instance because they depend on the screen
size, or
buttons present.

Both architectures and platforms would ideally form some
kind of
hierarchy each, e.g. "arm926" is a
"arm9" is a "arm" architecture; or
"WinCE50" is a "WinCE" is a
"Win32" platform.  I'd like to say somewhere
"I'm now compiling for this arm926 on WinCE50",
and then in some library
say "use this file on PowerPC, and that file on
ARM".

Regards,
Andreas


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-25 13:07:34
Hi Vladimir,

thans for the swift response.

Vladimir Prus schrieb:
>>  * Cross-Compilation support
> Can you describe what compilers you use, and that
system you target. Maybe we 
> can agree on the right interface, and then tweak some
toolset files to do 
> what you want.

We use a mix of MSVC, gcc and the occasional vendor
compiler.  Target
systems are smart phones in a number of varieties, usually
something
based on ARM and WinCE.

A good interface for cross compilation would probably
distiguish between
the host system and the target system, and know about
architecture and
platform respectively.  For instance, one could have
attributes
"host-architecture",
"host-platform",
"target-architecture",
"target-platform".  I'm tempted to even suggest
a "target-model"
attribute, some things in the build process depend on the
specific model
of the phone, for instance because they depend on the screen
size, or
buttons present.

Both architectures and platforms would ideally form some
kind of
hierarchy each, e.g. "arm926" is a
"arm9" is a "arm" architecture; or
"WinCE50" is a "WinCE" is a
"Win32" platform.  I'd like to say somewhere
"I'm now compiling for this arm926 on WinCE50",
and then in some library
say "use this file on PowerPC, and that file on
ARM".

Regards,
Andreas


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-25 13:07:34
Hi Vladimir,

thans for the swift response.

Vladimir Prus schrieb:
>>  * Cross-Compilation support
> Can you describe what compilers you use, and that
system you target. Maybe we 
> can agree on the right interface, and then tweak some
toolset files to do 
> what you want.

We use a mix of MSVC, gcc and the occasional vendor
compiler.  Target
systems are smart phones in a number of varieties, usually
something
based on ARM and WinCE.

A good interface for cross compilation would probably
distiguish between
the host system and the target system, and know about
architecture and
platform respectively.  For instance, one could have
attributes
"host-architecture",
"host-platform",
"target-architecture",
"target-platform".  I'm tempted to even suggest
a "target-model"
attribute, some things in the build process depend on the
specific model
of the phone, for instance because they depend on the screen
size, or
buttons present.

Both architectures and platforms would ideally form some
kind of
hierarchy each, e.g. "arm926" is a
"arm9" is a "arm" architecture; or
"WinCE50" is a "WinCE" is a
"Win32" platform.  I'd like to say somewhere
"I'm now compiling for this arm926 on WinCE50",
and then in some library
say "use this file on PowerPC, and that file on
ARM".

Regards,
Andreas


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-25 13:07:34
Hi Vladimir,

thans for the swift response.

Vladimir Prus schrieb:
>>  * Cross-Compilation support
> Can you describe what compilers you use, and that
system you target. Maybe we 
> can agree on the right interface, and then tweak some
toolset files to do 
> what you want.

We use a mix of MSVC, gcc and the occasional vendor
compiler.  Target
systems are smart phones in a number of varieties, usually
something
based on ARM and WinCE.

A good interface for cross compilation would probably
distiguish between
the host system and the target system, and know about
architecture and
platform respectively.  For instance, one could have
attributes
"host-architecture",
"host-platform",
"target-architecture",
"target-platform".  I'm tempted to even suggest
a "target-model"
attribute, some things in the build process depend on the
specific model
of the phone, for instance because they depend on the screen
size, or
buttons present.

Both architectures and platforms would ideally form some
kind of
hierarchy each, e.g. "arm926" is a
"arm9" is a "arm" architecture; or
"WinCE50" is a "WinCE" is a
"Win32" platform.  I'd like to say somewhere
"I'm now compiling for this arm926 on WinCE50",
and then in some library
say "use this file on PowerPC, and that file on
ARM".

Regards,
Andreas


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-25 13:07:34
Hi Vladimir,

thans for the swift response.

Vladimir Prus schrieb:
>>  * Cross-Compilation support
> Can you describe what compilers you use, and that
system you target. Maybe we 
> can agree on the right interface, and then tweak some
toolset files to do 
> what you want.

We use a mix of MSVC, gcc and the occasional vendor
compiler.  Target
systems are smart phones in a number of varieties, usually
something
based on ARM and WinCE.

A good interface for cross compilation would probably
distiguish between
the host system and the target system, and know about
architecture and
platform respectively.  For instance, one could have
attributes
"host-architecture",
"host-platform",
"target-architecture",
"target-platform".  I'm tempted to even suggest
a "target-model"
attribute, some things in the build process depend on the
specific model
of the phone, for instance because they depend on the screen
size, or
buttons present.

Both architectures and platforms would ideally form some
kind of
hierarchy each, e.g. "arm926" is a
"arm9" is a "arm" architecture; or
"WinCE50" is a "WinCE" is a
"Win32" platform.  I'd like to say somewhere
"I'm now compiling for this arm926 on WinCE50",
and then in some library
say "use this file on PowerPC, and that file on
ARM".

Regards,
Andreas


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Multiple compiler and cross-compilation support
user name
2006-04-28 05:18:44
Andreas Bogk wrote:
> A good interface for cross compilation would probably
distiguish between
> the host system and the target system, and know about
architecture and
> platform respectively.  For instance, one could have
attributes
> "host-architecture",
"host-platform",
"target-architecture",
> "target-platform".  

Can I just add that in an ideal world this would be the
desired model 
for QNX Neutrino (QNX6) also.

Jim

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

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