Boost cross-compile for RTEMS

Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Boost cross-compile for RTEMS

Boost - Build mailing list
Hello,

I am trying to cross compile Boost libraries for RTEMS (Real-Time Executive for Multiprocessor Systems) on RISC-V.

I have the toolchain available (e.g., riscv-rtems5-gcc).

Based on the Boost.Build user manual, I am not sure this is actually possible.

Following the ‘cross-compile’ instructions in section 4.9, it appears I have to supply a specific target operating system and that RTEMS is not supported.

Am I reading this correctly?

Is there any other way for me to cross-compile Boost for use with RTEMS?

Thanks,

Mike
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Boost cross-compile for RTEMS

Boost - Build mailing list
On Sun, Feb 2, 2020 at 10:01 AM M. Dodson via Boost-build <[hidden email]> wrote:
Hello,

I am trying to cross compile Boost libraries for RTEMS (Real-Time Executive for Multiprocessor Systems) on RISC-V.

I have the toolchain available (e.g., riscv-rtems5-gcc).

Based on the Boost.Build user manual, I am not sure this is actually possible.

Following the ‘cross-compile’ instructions in section 4.9, it appears I have to supply a specific target operating system and that RTEMS is not supported.

Am I reading this correctly?

Yes, you need to specify a target OS if you want to do it cleanly. But...

Is there any other way for me to cross-compile Boost for use with RTEMS?

You can also just ignore the OS and make your toolset only usable in that OS. It defaults to "unix" at the OS. I.e. you can use "unix" as the OS in your use case. Or...

You can also adhok add a new OS to the OS features with:

==
import feature ;
feature.extend os : rtems ;
feature.extend target-os : rtems ;
feature.extend host-os : rtems ;
==

With  that in your user-config.jam, you can then `b2 target-os=rtems`.

--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net


_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Boost cross-compile for RTEMS

Boost - Build mailing list
Thanks.  I’ve tried this, but may be putting my user-config.jam file in the wrong place or invoking my toolset incorrectly (or, more likely, both).

On 2 Feb 2020, at 17:32, Rene Rivera via Boost-build <[hidden email]> wrote:

import feature ;
feature.extend os : rtems ;
feature.extend target-os : rtems ;
feature.extend host-os : rtems ;

I’ve added this to my user-config.jam.  I left the file in $BOOST_ROOT/tools/build/example, because the file says it can be left there...

My toolset is in $RTEMS_PATH and contains things like riscv-rtems5-gcc, riscv-rtems5-g++, riscv-rtems5-ld, etc.

I ran the following from $BOOST_ROOT:

boost_1_72_0 $ b2 target-os=rtems toolset=$RTEMS_PATH/riscv-rtems5-g++ stage -n

This resulted in the following:

Users.jam: No such file or directory
$BOOST_ROOT/tools/build/src/build/toolset.jam:44: in toolset.using
ERROR: rule "Users.init" unknown in module "toolset".
$BOOST_ROOT/tools/build/src/build-system.jam:543: in process-explicit-toolset-requests
$BOOST_ROOT/tools/build/src/build-system.jam:610: in load
$BOOST_ROOT/tools/build/src/kernel/modules.jam:295: in import
$BOOST_ROOT/tools/build/src/kernel/bootstrap.jam:139: in boost-build
$BOOST_ROOT/boost-build.jam:17: in module scope

I then simplified this to remove my own toolset to see if it was at least reading my user-config.jam file, and it appears I didn’t do that correctly:

boost_1_72_0 $ b2 target-os=rtems toolset=gcc stage -n
$BOOST_ROOT/tools/build/src/build/feature.jam:491: in validate-value-string from module feature
error: "rtems" is not a known value of feature <target-os>
error: legal values: "aix" "android" "appletv" "bsd" "cygwin" "darwin" "freebsd" "haiku" "hpux" "iphone" "linux" "netbsd" "openbsd" "osf" "qnx" "qnxnto" "sgi" "solaris" "unix" "unixware" "windows" "vms" "vxworks" "freertos" “elf"

So, this leaves me with two questions:
1. Where should the user-config.jam be located?
2. How do I specify my cross-compiling toolchain?

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Boost cross-compile for RTEMS

Boost - Build mailing list
On Mon, Feb 3, 2020 at 4:12 AM M. Dodson <[hidden email]> wrote:
Thanks.  I’ve tried this, but may be putting my user-config.jam file in the wrong place or invoking my toolset incorrectly (or, more likely, both).

On 2 Feb 2020, at 17:32, Rene Rivera via Boost-build <[hidden email]> wrote:

import feature ;
feature.extend os : rtems ;
feature.extend target-os : rtems ;
feature.extend host-os : rtems ;

I’ve added this to my user-config.jam.  I left the file in $BOOST_ROOT/tools/build/example, because the file says it can be left there...

That was a misunderstanding of the in-place comment. That applies only when building the examples in that directory. For general use you need the user-config.jam to be in your HOME dir. Or you can put the same code in project-config.jam or site-config.jam (https://boostorg.github.io/build/manual/master/index.html#bbv2.overview.configuration) as nee

--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net


_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build