You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Origin currently assumes it's using the x86_64-unknown-linux-gnu target (and similar targets for other architectures). It disables the actual glibc implementation (that's what that -nostartfiles flag is for) and uses its own implementations.
In theory it should be possible to support the x86_64-unknown-linux-none target in origin; it just hasn't been done yet.
You could try adding -e _start as argument. Also check if there were any linker warnings. A rustc PR to show linker warnings by default was recently merged, so make sure you have a new enough nightly.
You could try adding -e _start as argument. Also check if there were any linker warnings. A rustc PR to show linker warnings by default was recently merged, so make sure you have a new enough nightly.
No linker errors, -e _start also sadly didn't help :c (yes, I updated and run the latest nightly from 02-26)
Okay, I tried everything and... found a solution! I don't know why it works or why it's needed, but the only thing I had to write is an explicit extern crate origin; at the top of the file.... can anybody explain this to me?
I don't know why it works or why it's needed, but the only thing I had to write is an explicit extern crate origin; at the top of the file.... can anybody explain this to me?
Right, without extern crate origin;, use origin as _; or some other reference to origin in the source code, rustc will not load origin as dependency and thus not link it.
And now my console gets flooded with errors of not found types for -none target
You are building origin with the std feature disabled?
Activity
sunfishcode commentedon Feb 25, 2025
What target are you using?
DasLixou commentedon Feb 25, 2025
x86_64-unknown-linux-nonesunfishcode commentedon Feb 25, 2025
Origin currently assumes it's using the x86_64-unknown-linux-gnu target (and similar targets for other architectures). It disables the actual glibc implementation (that's what that
-nostartfilesflag is for) and uses its own implementations.In theory it should be possible to support the x86_64-unknown-linux-none target in origin; it just hasn't been done yet.
DasLixou commentedon Feb 26, 2025
Hmmm looking at the code for a bit, I don't understand why it didn't generate any code with the none Target and without the linker flag...
sunfishcode commentedon Feb 26, 2025
I don't know.
bjorn3 commentedon Feb 26, 2025
You could try adding
-e _startas argument. Also check if there were any linker warnings. A rustc PR to show linker warnings by default was recently merged, so make sure you have a new enough nightly.DasLixou commentedon Feb 27, 2025
No linker errors,
-e _startalso sadly didn't help :c (yes, I updated and run the latest nightly from 02-26)DasLixou commentedon Feb 27, 2025
Weird, even with
cargo +nightly r --target x86_64-unknown-linux-gnu --releaseand-nostartfilesit doesn't generate any code in .text section...DasLixou commentedon Feb 27, 2025
Okay, I tried everything and... found a solution! I don't know why it works or why it's needed, but the only thing I had to write is an explicit
extern crate origin;at the top of the file.... can anybody explain this to me?DasLixou commentedon Feb 27, 2025
And now my console gets flooded with errors of not found types for
-nonetargetbjorn3 commentedon Feb 27, 2025
Right, without
extern crate origin;,use origin as _;or some other reference tooriginin the source code, rustc will not loadoriginas dependency and thus not link it.You are building origin with the std feature disabled?
DasLixou commentedon Feb 27, 2025
I suspect so, yeah.
The errors seem to come from not knowing types without the gnu impl