<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div> </div>
<a name="_MailEndCompose"></a>
<div> </div>
<div><b>Von:</b> Joel Sherrill <joel@rtems.org> <br>
<b>Gesendet:</b> Mittwoch, 31. Januar 2024 16:57<br>
<b>An:</b> Karel Gardas <karel@functional.vision><br>
<b>Cc:</b> Frank Kühndel <frank.kuehndel@embedded-brains.de>; Sommer, Jan <Jan.Sommer@dlr.de>; devel@rtems.org<br>
<b>Betreff:</b> Re: Naming convention for Rust target platforms</div>
<div> </div>
<div> </div>
<div> </div>
<div>On Wed, Jan 31, 2024 at 12:31 AM Karel Gardas <<a href="mailto:karel@functional.vision"><font color="blue"><u>karel@functional.vision</u></font></a>> wrote:</div>
<div>On 1/30/24 18:13, Frank Kühndel wrote:<br>
> Which name Rust accepts instead of "armv7a-rtems6-eabihf" depends on the <br>
> naming convention of the Rust community:<br>
> <a href="https://docs.rust-embedded.org/embedonomicon/custom-target.html"><font color="blue"><u>https://docs.rust-embedded.org/embedonomicon/custom-target.html</u></font></a><br>
> According to this file, the part `eabi` is for bare metal. Would this be <br>
> correct when it is based on RTEMS? For example, a Linux target would be <br>
> "x86_64-unknown-linux-gnu" where `gnu` means started by 'glibc'.<br>
<br>
This is not completely fair to Jan as the x86_64 example is quite the <br>
exception instead of a common norm in rust platforms names. But you <br>
started with Linux so let's continue with Linux -- see the listing below.<br>
<br>
Also IMHO this convention is not about rust per se, but IMHO about LLVM <br>
way of doing things. GCC does that differently. So no C vs Rust, but GCC <br>
vs. LLVM. Once Rust in GCC happen it'll be done in GCC more RTEMS used <br>
way probably...<br>
<br>
So for Rust/LLVM I think Jan's proposal is about right except that I <br>
would strip '6' from rtems6. Neither OS (Linux, FreeBSD, NetBSD, <br>
Windows, OpenBSD, VxWorks, etc) uses any version notion in the OS name <br>
anyway... And also would strip 'a' from arm7a. We do not need to mention <br>
'a' here explicitly since for 'm' we do have whole family of 'thumb*' <br>
platform names... E.g. VxWorks in this particular case (ARMv7-A) uses: <br>
armv7-wrs-vxworks-eabihf</div>
<div> </div>
<div>WRS took the vendor part of the triple and I would not judge correctness </div>
<div>on what they did.</div>
<div> </div>
<div>I have reached out to a contact at a company that has a long history of</div>
<div>supporting the GNU tools and has added Rust to their services in the past</div>
<div>few years. I would like to hear their opinion. </div>
<div> </div>
<div><font face="Calibri">Thanks a lot, so far I just used the armv7a-none-eabihf as a baseline and added</font></div>
<div><font face="Calibri">“rtems” to it as I was more focused on the actual porting. Now, for going official</font></div>
<div><font face="Calibri">I have to fix the annoying little details. My hope is that if we get a good</font></div>
<div><font face="Calibri">solution here once and accepted by the Rust community that this paves</font></div>
<div><font face="Calibri">the way for other ports. </font></div>
<div><font face="Calibri"> </font></div>
<div><font face="Calibri">If I understand your comments regarding binutils correctly then maybe</font></div>
<div><font face="Calibri">Something like armv7-rtems-gnueabi(hf) would be more appropriate?</font></div>
<div> </div>
<div><font face="Calibri">Cheers,</font></div>
<div><font face="Calibri"> Jan</font></div>
<div> </div>
<div style="margin-bottom:12pt;"><br>
<br>
Cheers,<br>
Karel</div>
<div> </div>
<div>On these, they actually do distinguish the OS. I see Linux, Android, and Open</div>
<div>Harmony.</div>
<div> </div>
<div>There is also a distinction in the target name for C library used. I see glibc, </div>
<div>musl, and ulibc.</div>
<div> </div>
<div>The rest of the target names are multilib variants and appear to reflect a lack </div>
<div>of support for or use of multilibs.</div>
<div> </div>
<div>IMO this naming seems to reflect a Linux focus and a lack of understanding</div>
<div>of the processor variations seen in the embedded world. </div>
<div> </div>
<div>If this is the final pattern, it may work for RTEMS because people build their </div>
<div>own tools and tend to use 1-2 BSPs. But it will be painful for developers testing</div>
<div>multiple BSPs, etc. My cron sweeper builds almost 20 tool chains now. With this,</div>
<div>we would be between 100 and 200 I expect. Some of the BSPs will have a similar </div>
<div>enough processor to share a tool chain but a lot won't.</div>
<div> </div>
<div>I am glad you are working through this and this issue isn't a blocker for ironing</div>
<div>out a long list of other potential issues.</div>
<div> </div>
<div>--joel</div>
<div><br>
<br>
$ rustc --print target-list|grep linux<br>
aarch64-linux-android<br>
aarch64-unknown-linux-gnu<br>
aarch64-unknown-linux-gnu_ilp32<br>
aarch64-unknown-linux-musl<br>
aarch64-unknown-linux-ohos<br>
aarch64_be-unknown-linux-gnu<br>
aarch64_be-unknown-linux-gnu_ilp32<br>
arm-linux-androideabi<br>
arm-unknown-linux-gnueabi<br>
arm-unknown-linux-gnueabihf<br>
arm-unknown-linux-musleabi<br>
arm-unknown-linux-musleabihf<br>
armeb-unknown-linux-gnueabi<br>
armv4t-unknown-linux-gnueabi<br>
armv5te-unknown-linux-gnueabi<br>
armv5te-unknown-linux-musleabi<br>
armv5te-unknown-linux-uclibceabi<br>
armv7-linux-androideabi<br>
armv7-unknown-linux-gnueabi<br>
armv7-unknown-linux-gnueabihf<br>
armv7-unknown-linux-musleabi<br>
armv7-unknown-linux-musleabihf<br>
armv7-unknown-linux-ohos<br>
armv7-unknown-linux-uclibceabi<br>
armv7-unknown-linux-uclibceabihf<br>
csky-unknown-linux-gnuabiv2<br>
hexagon-unknown-linux-musl<br>
i586-unknown-linux-gnu<br>
i586-unknown-linux-musl<br>
i686-linux-android<br>
i686-unknown-linux-gnu<br>
i686-unknown-linux-musl<br>
loongarch64-unknown-linux-gnu<br>
m68k-unknown-linux-gnu<br>
mips-unknown-linux-gnu<br>
mips-unknown-linux-musl<br>
mips-unknown-linux-uclibc<br>
mips64-openwrt-linux-musl<br>
mips64-unknown-linux-gnuabi64<br>
mips64-unknown-linux-muslabi64<br>
mips64el-unknown-linux-gnuabi64<br>
mips64el-unknown-linux-muslabi64<br>
mipsel-unknown-linux-gnu<br>
mipsel-unknown-linux-musl<br>
mipsel-unknown-linux-uclibc<br>
mipsisa32r6-unknown-linux-gnu<br>
mipsisa32r6el-unknown-linux-gnu<br>
mipsisa64r6-unknown-linux-gnuabi64<br>
mipsisa64r6el-unknown-linux-gnuabi64<br>
powerpc-unknown-linux-gnu<br>
powerpc-unknown-linux-gnuspe<br>
powerpc-unknown-linux-musl<br>
powerpc64-unknown-linux-gnu<br>
powerpc64-unknown-linux-musl<br>
powerpc64le-unknown-linux-gnu<br>
powerpc64le-unknown-linux-musl<br>
riscv32gc-unknown-linux-gnu<br>
riscv32gc-unknown-linux-musl<br>
riscv64-linux-android<br>
riscv64gc-unknown-linux-gnu<br>
riscv64gc-unknown-linux-musl<br>
s390x-unknown-linux-gnu<br>
s390x-unknown-linux-musl<br>
sparc-unknown-linux-gnu<br>
sparc64-unknown-linux-gnu<br>
thumbv7neon-linux-androideabi<br>
thumbv7neon-unknown-linux-gnueabihf<br>
thumbv7neon-unknown-linux-musleabihf<br>
x86_64-linux-android<br>
x86_64-unikraft-linux-musl<br>
x86_64-unknown-linux-gnu<br>
x86_64-unknown-linux-gnux32<br>
x86_64-unknown-linux-musl<br>
x86_64-unknown-linux-ohos<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org"><font color="blue"><u>devel@rtems.org</u></font></a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel"><font color="blue"><u>http://lists.rtems.org/mailman/listinfo/devel</u></font></a></div>
<div> </div>
</span></font>
</body>
</html>