Skip to contentSkip to conversation

error: unknown argument: '-fno-ipa-sra', err: true

DISCUSSION Antonio Terceiro 2 participants 2 messages Aug 6, 2021 – Aug 9, 2021 Rust

lore
Share & tools
lore
#0 lore raw

Hi, I'm trying a few Rust-enabled builds, and I got the following error when building an arm kernel:

make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/current ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 'CC=sccache arm-linux-gnueabihf-gcc' 'HOSTCC=sccache gcc'
error: unknown argument: '-fno-ipa-sra', err: true
thread 'main' panicked at 'Unable to generate bindings: ()', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.56.0/src/main.rs:54:36
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
make[2]: *** [/builds/linux/rust/Makefile:229: rust/bindings_generated.rs] Error 1
make[2]: *** Deleting file 'rust/bindings_generated.rs'
make[2]: Target '__build' not remade because of errors.
make[1]: *** [/builds/linux/Makefile:1330: prepare0] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target '__all' not remade because of errors.

There I'm using LLVM/libclang from Debian 11 (so LLVM 11). Is this supposed to be fixed by a newer LLVM (assuming that flag got implemented since then), or should I send a patch to rust/Makefile to filter that specific flag out as well?

#1 lore raw

Hi Antonio,

Quoted 5 lines · Antonio Terceiro

There I'm using LLVM/libclang from Debian 11 (so LLVM 11). Is this supposed to be fixed by a newer LLVM (assuming that flag got implemented since then), or should I send a patch to rust/Makefile to filter that specific flag out as well?

Please feel free to send the patch!

Cheers,
Miguel