From e447582d8a6cea4fb5348b0ed8fdb6b7e0bb4025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= <git@mvolfik.com> Date: Thu, 3 Apr 2025 10:24:30 +0200 Subject: [PATCH 1/7] add compilation support for first HelenOS targets --- .../rustc_target/src/spec/base/helenos.rs | 18 +++++++ compiler/rustc_target/src/spec/base/mod.rs | 1 + compiler/rustc_target/src/spec/mod.rs | 3 ++ .../src/spec/targets/i686_unknown_helenos.rs | 26 ++++++++++ .../spec/targets/x86_64_unknown_helenos.rs | 26 ++++++++++ src/bootstrap/src/core/sanity.rs | 2 + src/doc/rustc/src/platform-support.md | 2 + src/doc/rustc/src/platform-support/helenos.md | 52 +++++++++++++++++++ 8 files changed, 130 insertions(+) create mode 100644 compiler/rustc_target/src/spec/base/helenos.rs create mode 100644 compiler/rustc_target/src/spec/targets/i686_unknown_helenos.rs create mode 100644 compiler/rustc_target/src/spec/targets/x86_64_unknown_helenos.rs create mode 100644 src/doc/rustc/src/platform-support/helenos.md diff --git a/compiler/rustc_target/src/spec/base/helenos.rs b/compiler/rustc_target/src/spec/base/helenos.rs new file mode 100644 index 00000000000..5eb5df8e495 --- /dev/null +++ b/compiler/rustc_target/src/spec/base/helenos.rs @@ -0,0 +1,18 @@ +use crate::spec::{PanicStrategy, RelroLevel, TargetOptions}; + +pub(crate) fn opts() -> TargetOptions { + TargetOptions { + os: "helenos".into(), + + dynamic_linking: true, + // FIXME: this actually is supported by HelenOS, but then we run into issues + // with linking libstartfiles.a (parts of which obviously can't be at randomized + // positions). The crt_* flags also have some effect on this. + // position_independent_executables: true, + + relro_level: RelroLevel::Full, + panic_strategy: PanicStrategy::Abort, + + ..Default::default() + } +} diff --git a/compiler/rustc_target/src/spec/base/mod.rs b/compiler/rustc_target/src/spec/base/mod.rs index b9139c8452c..ae64a3bc268 100644 --- a/compiler/rustc_target/src/spec/base/mod.rs +++ b/compiler/rustc_target/src/spec/base/mod.rs @@ -8,6 +8,7 @@ pub(crate) mod dragonfly; pub(crate) mod freebsd; pub(crate) mod fuchsia; pub(crate) mod haiku; +pub(crate) mod helenos; pub(crate) mod hermit; pub(crate) mod hurd; pub(crate) mod hurd_gnu; diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 8b20152d3bf..17c7ad83008 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1772,6 +1772,9 @@ supported_targets! { ("i686-unknown-haiku", i686_unknown_haiku), ("x86_64-unknown-haiku", x86_64_unknown_haiku), + ("i686-unknown-helenos", i686_unknown_helenos), + ("x86_64-unknown-helenos", x86_64_unknown_helenos), + ("i686-unknown-hurd-gnu", i686_unknown_hurd_gnu), ("x86_64-unknown-hurd-gnu", x86_64_unknown_hurd_gnu), diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_helenos.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_helenos.rs new file mode 100644 index 00000000000..4f6b9b62eaa --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_helenos.rs @@ -0,0 +1,26 @@ +use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, base}; + +pub(crate) fn target() -> Target { + let mut base = base::helenos::opts(); + base.cpu = "pentium4".into(); + base.max_atomic_width = Some(64); + base.stack_probes = StackProbeType::Inline; + base.linker = Some("i686-helenos-gcc".into()); + base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); + + Target { + llvm_target: "i686-unknown-helenos".into(), + metadata: crate::spec::TargetMetadata { + description: Some("IA-32 (i686) HelenOS".into()), + tier: Some(3), + host_tools: Some(false), + std: None, + }, + pointer_width: 32, + data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ + i128:128-f64:32:64-f80:32-n8:16:32-S128" + .into(), + arch: "x86".into(), + options: base, + } +} diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_helenos.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_helenos.rs new file mode 100644 index 00000000000..71a8f55f8a0 --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_helenos.rs @@ -0,0 +1,26 @@ +use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, base}; + +pub(crate) fn target() -> Target { + let mut base = base::helenos::opts(); + base.cpu = "x86-64".into(); + base.plt_by_default = false; + base.max_atomic_width = Some(64); + base.stack_probes = StackProbeType::Inline; + base.linker = Some("amd64-helenos-gcc".into()); + base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); + + Target { + llvm_target: "x86_64-unknown-helenos".into(), + metadata: crate::spec::TargetMetadata { + description: Some("64-bit HelenOS".into()), + tier: Some(3), + host_tools: Some(false), + std: None, + }, + pointer_width: 64, + data_layout: + "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), + arch: "x86_64".into(), + options: base, + } +} diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index 9e4a0816e0d..e7e2ea07861 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -33,6 +33,8 @@ pub struct Finder { // // Targets can be removed from this list once they are present in the stage0 compiler (usually by updating the beta compiler of the bootstrap). const STAGE0_MISSING_TARGETS: &[&str] = &[ + "i686-unknown-helenos", + "x86_64-unknown-helenos", // just a dummy comment so the list doesn't get onelined "aarch64-unknown-nto-qnx710_iosock", "x86_64-pc-nto-qnx710_iosock", diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index b5cd3864620..2fba552a755 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -314,6 +314,7 @@ target | std | host | notes [`i586-unknown-redox`](platform-support/redox.md) | ✓ | | 32-bit x86 Redox OS (PentiumPro) [^x86_32-floats-x87] [`i686-apple-darwin`](platform-support/apple-darwin.md) | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+, Penryn) [^x86_32-floats-return-ABI] `i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku (Pentium 4) [^x86_32-floats-return-ABI] +[`i686-unknown-helenos`](platform-support/helenos.md) | ? | | HelenOS IA-32 [`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd (Pentium 4) [^x86_32-floats-return-ABI] [`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 (Pentium 4) [^x86_32-floats-return-ABI] [`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD (Pentium 4) [^x86_32-floats-return-ABI] @@ -415,6 +416,7 @@ target | std | host | notes `x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD `x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku [`x86_64-unknown-hermit`](platform-support/hermit.md) | ✓ | | x86_64 Hermit +[`x86_64-unknown-helenos`](platform-support/helenos.md) | ? | | x86_64 (amd64) HelenOS [`x86_64-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 64-bit GNU/Hurd `x86_64-unknown-l4re-uclibc` | ? | | [`x86_64-unknown-linux-none`](platform-support/x86_64-unknown-linux-none.md) | * | | 64-bit Linux with no libc diff --git a/src/doc/rustc/src/platform-support/helenos.md b/src/doc/rustc/src/platform-support/helenos.md new file mode 100644 index 00000000000..879d192e6f0 --- /dev/null +++ b/src/doc/rustc/src/platform-support/helenos.md @@ -0,0 +1,52 @@ +# `*-unknown-helenos` + +**Tier: 3** + +Targets for [HelenOS](https://www.helenos.org). +These targets allow compiling user-space applications, that you can then copy into your HelenOS ISO image to run them. + +Target triplets available so far: + +- `x86_64-unknown-helenos` +- `i686-unknown-helenos` + +## Target maintainers + +- Matěj Volf ([@mvolfik](https://github.com/mvolfik)) + +## Requirements + +These targets only support cross-compilation. The targets will[^1] support libstd, although support of some platform features (filesystem, networking) may be limited. + +You need to have a local clone of the HelenOS repository and the HelenOS toolchain set up, no HelenOS-Rust development artifacts are available. + +[^1]: The support is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings + +## Building + +### HelenOS toolchain setup + +For compilation of standard library, you need to build the HelenOS toolchain (because Rust needs to use `*-helenos-gcc` as linker) and shared libraries. See [this HelenOS wiki page](https://www.helenos.org/wiki/UsersGuide/CompilingFromSource#a2.Buildasupportedcross-compiler) for instruction on setting up the build. At the end of step 4 (_Configure and build_), invoke `ninja export-dev` to build the shared libraries. + +Then copy these shared libraries from `export-dev/lib` to the path where the compiler automatically searches for them. This will be the directory where you installed the toolchain (for example `~/.local/share/HelenOS/cross/i686-helenos/lib`). You can see this path with this command: + +```sh +touch /tmp/test.c +i686-helenos-gcc -v -c /tmp/test.c 2>&1 | grep LIBRARY_PATH +``` + +## Building the target + +When you have the HelenOS toolchain set up and installed in your path, you can build the Rust toolchain using the standard procedure. See [rustc dev guide](https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html). + +## Building Rust programs + +No special setup is needed. Simply use the toolchain you built above and run `cargo build --target <arch>-unknown-helenos`. + +## Testing + +Running the Rust test suite has not been attempted yet. + +## Cross-compilation toolchains and C code + +You should be able to cross-compile and link any needed C code using `<arch>-helenos-gcc` that you built above. However, note that clang support is highly lacking. Therefore, to run tools such as `bindgen`, you will need to provide flag `-nostdinc` and manually specify the include paths to HelenOS headers, which you will find in the `export-dev` + in the cross-compilation toolchain (e.g. `~/.local/share/HelenOS/cross/lib/gcc/i686-helenos/14.2.0/include`). From 3e9108b3f8ebc8f682298b15eaf63878682dbfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= <git@mvolfik.com> Date: Thu, 3 Apr 2025 11:51:48 +0200 Subject: [PATCH 2/7] improve docs --- src/doc/rustc/src/SUMMARY.md | 1 + src/doc/rustc/src/platform-support/helenos.md | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index 6c7cdec3480..732bc5bf829 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -84,6 +84,7 @@ - [\*-pc-windows-gnullvm](platform-support/pc-windows-gnullvm.md) - [\*-nto-qnx-\*](platform-support/nto-qnx.md) - [\*-unikraft-linux-musl](platform-support/unikraft-linux-musl.md) + - [\*-unknown-helenos](platform-support/helenos.md) - [\*-unknown-hermit](platform-support/hermit.md) - [\*-unknown-freebsd](platform-support/freebsd.md) - [\*-unknown-netbsd\*](platform-support/netbsd.md) diff --git a/src/doc/rustc/src/platform-support/helenos.md b/src/doc/rustc/src/platform-support/helenos.md index 879d192e6f0..70a7d62730d 100644 --- a/src/doc/rustc/src/platform-support/helenos.md +++ b/src/doc/rustc/src/platform-support/helenos.md @@ -20,7 +20,7 @@ These targets only support cross-compilation. The targets will[^1] support libst You need to have a local clone of the HelenOS repository and the HelenOS toolchain set up, no HelenOS-Rust development artifacts are available. -[^1]: The support is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings +[^1]: libstd is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings ## Building @@ -35,18 +35,20 @@ touch /tmp/test.c i686-helenos-gcc -v -c /tmp/test.c 2>&1 | grep LIBRARY_PATH ``` -## Building the target +### Building the target When you have the HelenOS toolchain set up and installed in your path, you can build the Rust toolchain using the standard procedure. See [rustc dev guide](https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html). -## Building Rust programs +### Building Rust programs -No special setup is needed. Simply use the toolchain you built above and run `cargo build --target <arch>-unknown-helenos`. +Use the toolchain that you have built above and run `cargo build --target <arch>-unknown-helenos`. ## Testing -Running the Rust test suite has not been attempted yet. +After you build a Rust program for HelenOS, you can put it into the `dist` directory of the HelenOS build, build the ISO image, and then run it either in an emulator, or on real hardware. See HelenOS wiki for further instructions on running the OS. + +Running the Rust testsuite has not been attempted yet due to missing host tools and networking code. ## Cross-compilation toolchains and C code -You should be able to cross-compile and link any needed C code using `<arch>-helenos-gcc` that you built above. However, note that clang support is highly lacking. Therefore, to run tools such as `bindgen`, you will need to provide flag `-nostdinc` and manually specify the include paths to HelenOS headers, which you will find in the `export-dev` + in the cross-compilation toolchain (e.g. `~/.local/share/HelenOS/cross/lib/gcc/i686-helenos/14.2.0/include`). +You should be able to cross-compile and link any needed C code using `<arch>-helenos-gcc` that you built above. However, note that clang support is highly lacking. Therefore, to run tools such as `bindgen`, you will need to provide flag `-nostdinc` and manually specify the include paths to HelenOS headers, which you will find in the `export-dev` folder + in the cross-compilation toolchain (e.g. `~/.local/share/HelenOS/cross/lib/gcc/i686-helenos/14.2.0/include`). From c9c1adb96614653fd7fd76f45e6c23820459f6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= <git@mvolfik.com> Date: Thu, 3 Apr 2025 11:52:33 +0200 Subject: [PATCH 3/7] fix fmt --- compiler/rustc_target/src/spec/base/helenos.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/rustc_target/src/spec/base/helenos.rs b/compiler/rustc_target/src/spec/base/helenos.rs index 5eb5df8e495..64c73f25520 100644 --- a/compiler/rustc_target/src/spec/base/helenos.rs +++ b/compiler/rustc_target/src/spec/base/helenos.rs @@ -9,7 +9,6 @@ pub(crate) fn opts() -> TargetOptions { // with linking libstartfiles.a (parts of which obviously can't be at randomized // positions). The crt_* flags also have some effect on this. // position_independent_executables: true, - relro_level: RelroLevel::Full, panic_strategy: PanicStrategy::Abort, From df036a7f146d706841d9de18413879641e709f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= <git@mvolfik.com> Date: Thu, 3 Apr 2025 12:33:51 +0200 Subject: [PATCH 4/7] add helenos targets to assembly tests --- tests/assembly/targets/targets-elf.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/assembly/targets/targets-elf.rs b/tests/assembly/targets/targets-elf.rs index b5c0ee5a107..58509f26c99 100644 --- a/tests/assembly/targets/targets-elf.rs +++ b/tests/assembly/targets/targets-elf.rs @@ -240,6 +240,9 @@ //@ revisions: i686_unknown_haiku //@ [i686_unknown_haiku] compile-flags: --target i686-unknown-haiku //@ [i686_unknown_haiku] needs-llvm-components: x86 +//@ revisions: i686_unknown_helenos +//@ [i686_unknown_helenos] compile-flags: --target i686-unknown-helenos +//@ [i686_unknown_helenos] needs-llvm-components: x86 //@ revisions: i686_unknown_hurd_gnu //@ [i686_unknown_hurd_gnu] compile-flags: --target i686-unknown-hurd-gnu //@ [i686_unknown_hurd_gnu] needs-llvm-components: x86 @@ -594,6 +597,9 @@ //@ revisions: x86_64_unknown_haiku //@ [x86_64_unknown_haiku] compile-flags: --target x86_64-unknown-haiku //@ [x86_64_unknown_haiku] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_helenos +//@ [x86_64_unknown_helenos] compile-flags: --target x86_64-unknown-helenos +//@ [x86_64_unknown_helenos] needs-llvm-components: x86 //@ revisions: x86_64_unknown_hurd_gnu //@ [x86_64_unknown_hurd_gnu] compile-flags: --target x86_64-unknown-hurd-gnu //@ [x86_64_unknown_hurd_gnu] needs-llvm-components: x86 From 254eaf101a4d29b52050c84eb5919294b2c7e7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= <git@mvolfik.com> Date: Thu, 3 Apr 2025 13:31:58 +0200 Subject: [PATCH 5/7] add helenos to expected test output --- tests/ui/check-cfg/well-known-values.stderr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr index ba1900fcddb..ce4ad2504fe 100644 --- a/tests/ui/check-cfg/well-known-values.stderr +++ b/tests/ui/check-cfg/well-known-values.stderr @@ -201,7 +201,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` LL | target_os = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` + = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `helenos`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` @@ -274,7 +274,7 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux` | | | help: there is a expected value with a similar name: `"linux"` | - = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` + = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `helenos`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 28 warnings emitted From 2f1fe3dae07ad16f2b9569b206a0dfbdbe74d4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= <git@mvolfik.com> Date: Thu, 3 Apr 2025 16:14:58 +0200 Subject: [PATCH 6/7] fix footnote to use unique ID --- src/doc/rustc/src/platform-support/helenos.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/rustc/src/platform-support/helenos.md b/src/doc/rustc/src/platform-support/helenos.md index 70a7d62730d..012dd01977b 100644 --- a/src/doc/rustc/src/platform-support/helenos.md +++ b/src/doc/rustc/src/platform-support/helenos.md @@ -16,11 +16,11 @@ Target triplets available so far: ## Requirements -These targets only support cross-compilation. The targets will[^1] support libstd, although support of some platform features (filesystem, networking) may be limited. +These targets only support cross-compilation. The targets will[^helenos-libstd-pending] support libstd, although support of some platform features (filesystem, networking) may be limited. You need to have a local clone of the HelenOS repository and the HelenOS toolchain set up, no HelenOS-Rust development artifacts are available. -[^1]: libstd is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings +[^helenos-libstd-pending]: libstd is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings ## Building From d40e360145a03273f1768fa154088c1e16faf8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= <git@mvolfik.com> Date: Thu, 3 Apr 2025 16:20:57 +0200 Subject: [PATCH 7/7] remove incorrect comment about PIE support --- compiler/rustc_target/src/spec/base/helenos.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/rustc_target/src/spec/base/helenos.rs b/compiler/rustc_target/src/spec/base/helenos.rs index 64c73f25520..a3d63347c18 100644 --- a/compiler/rustc_target/src/spec/base/helenos.rs +++ b/compiler/rustc_target/src/spec/base/helenos.rs @@ -5,10 +5,7 @@ pub(crate) fn opts() -> TargetOptions { os: "helenos".into(), dynamic_linking: true, - // FIXME: this actually is supported by HelenOS, but then we run into issues - // with linking libstartfiles.a (parts of which obviously can't be at randomized - // positions). The crt_* flags also have some effect on this. - // position_independent_executables: true, + has_rpath: true, relro_level: RelroLevel::Full, panic_strategy: PanicStrategy::Abort,