Wednesday, October 5, 2022

[SOLVED] How to use the -mlongcall GCC flag in Rust?

Issue

I am trying to run a Rust program on a powerpc arch. When I build my code in C I use the flag -mlongcall.

How can I use this flag for my Rust program? In general, it would be nice to know if I can use flags that I know from GCC in my Rust build.


Solution

The solution for the -mlongcall flag is to use the flag: -Ctarget-features=+longcall as suggested in this issue: add mlongcall flag to rustc



Answered By - TomE8
Answer Checked By - Pedro (WPSolving Volunteer)