AW: AW: Naming convention for Rust target platforms

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Wed Jan 31 16:18:10 UTC 2024



> -----Ursprüngliche Nachricht-----
> Von: Sebastian Huber <sebastian.huber at embedded-brains.de>
> Gesendet: Mittwoch, 31. Januar 2024 08:08
> An: Sommer, Jan <Jan.Sommer at dlr.de>; devel at rtems.org
> Betreff: Re: AW: Naming convention for Rust target platforms
> 
> On 30.01.24 13:45, Jan.Sommer at dlr.de wrote:
> >> -----Ursprüngliche Nachricht-----
> >> Von: Sebastian Huber<sebastian.huber at embedded-brains.de>
> >> Gesendet: Dienstag, 30. Januar 2024 11:08
> >> An: devel<devel at rtems.org>
> >> Cc: Sommer, Jan<Jan.Sommer at dlr.de>
> >> Betreff: Re: Naming convention for Rust target platforms
> >>
> >> Hello Jan,
> >>
> >> On 29.01.24 19:41,Jan.Sommer at dlr.de  wrote:
> >>> So, for the Zynq and similar BSPs this would yield for the Rust
> >>> target something like: armv7a-rtems6-eabihf (and possibly armv7a-
> rtems6-eabi).
> >>> Similarly, for other ARM BSPs additional Rust targets would need to
> >>> be added. Which might add up to quite a  number of Rust targets over
> time.
> >>> Is this fine or do you see another solution?
> >> how are the GCC machine flags determined (for linking)? Are they
> >> derived from the target name?
> >>
> > In my current setup I read the information from the pkgconfig files of the
> BSP.
> > I remember that at some point the pkgconfig was marked as
> > experimental. > Is that still the case or is it now an official part
> > of the RTEMS6
> release?
> 
> When RTEMS 6.1 is released, the pkg-config support should be way to get
> the BSP settings. It would be good to get a bit of user feedback how it is used
> right now.

Great to hear.

> If you use the BSP provided flags, then what is the purpose of the Rust target
> name? For example, what happens if I just use "foobar"?
> 

The target triplet string is used in a couple of places of the build system and checked.
For example if "rtems" is in the OS part of the string, the build system checks if the OS is known.
In its simples form for example here: https://github.com/rust-lang/rust/blob/master/library/std/build.rs#L6

Also to clarify: I can use the BSP provided flags for compiling the user application.
For integrating a target into the compiler itself one needs to add a spec file there.
The stdlibs are compiled with this configuration (e.g. the one for armv7a-none-eabihf here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs).
I use the BSP flags for passing the CPU and the linker commands.


> --
> embedded brains GmbH & Co. KG
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
> 
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list