From: Rudraksha Gupta <guptarud@gmail.com>
To: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, torvalds@linux-foundation.org,
Ben Wolsieffer <ben.wolsieffer@hefring.com>,
Naresh Kamboju <naresh.kamboju@linaro.org>,
Christian Schrrefl <chrisi.schrefl@gmail.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Rudraksha Gupta <guptarud@gmail.com>,
Ard Biesheuvel <ardb@kernel.org>,
anders.roxell@linaro.org, arnd@arndb.de,
dan.carpenter@linaro.org, laura.nao@collabora.com,
lkft-triage@lists.linaro.org, regressions@lists.linux.dev,
Nick Clifton <nickc@redhat.com>,
Richard Earnshaw <richard.earnshaw@arm.com>,
Ramana Radhakrishnan <ramanara@nvidia.com>,
Miguel Ojeda <ojeda@kernel.org>,
Linux Kernel Functional Testing <lkft@linaro.org>
Subject: [PATCH v2] arm: Fix rustgcc unknown argument '-mno-fdpic'
Date: Thu, 22 May 2025 05:02:31 -0700 [thread overview]
Message-ID: <20250522-rust-mno-fdpic-arm-fix-v2-1-a6f691d9c198@gmail.com> (raw)
Currently rust on arm fails to compile due to '-mno-fdpic'. This flag
disables a GCC feature that we don't want for kernel builds, so let's
skip it as it doesn't apply to Clang.
UPD include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
RUSTC L rust/core.o
BINDGEN rust/bindings/bindings_generated.rs
BINDGEN rust/bindings/bindings_helpers_generated.rs
CC rust/helpers/helpers.o
Unable to generate bindings: clang diagnosed error: error: unknown argument: '-mno-fdpic'
make[2]: *** [rust/Makefile:369: rust/bindings/bindings_helpers_generated.rs] Error 1
make[2]: *** Deleting file 'rust/bindings/bindings_helpers_generated.rs'
make[2]: *** Waiting for unfinished jobs....
Unable to generate bindings: clang diagnosed error: error: unknown argument: '-mno-fdpic'
make[2]: *** [rust/Makefile:349: rust/bindings/bindings_generated.rs] Error 1
make[2]: *** Deleting file 'rust/bindings/bindings_generated.rs'
make[1]: *** [/home/pmos/build/src/linux-next-next-20250521/Makefile:1285: prepare] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/all/CA+G9fYvOanQBYXKSg7C6EU30k8sTRC0JRPJXYu7wWK51w38QUQ@mail.gmail.com/
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Tested-by: Rudraksha Gupta <guptarud@gmail.com>
Acked-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
Changes in v2:
- Fixed patch formatting issues
- Link to v1: https://lore.kernel.org/r/20250520-rust-mno-fdpic-arm-fix-v1-1-44e77fe6b2a1@gmail.com
---
rust/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/Makefile b/rust/Makefile
index 3aca903a7d08..f207ba0ed466 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -273,7 +273,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
-fzero-call-used-regs=% -fno-stack-clash-protection \
-fno-inline-functions-called-once -fsanitize=bounds-strict \
-fstrict-flex-arrays=% -fmin-function-alignment=% \
- -fzero-init-padding-bits=% \
+ -fzero-init-padding-bits=% -mno-fdpic \
--param=% --param asan-%
# Derived from `scripts/Makefile.clang`.
---
base-commit: a5806cd506af5a7c19bcd596e4708b5c464bfd21
change-id: 20250520-rust-mno-fdpic-arm-fix-940a58bf9433
Best regards,
--
Rudraksha Gupta <guptarud@gmail.com>
next reply other threads:[~2025-05-22 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 12:02 Rudraksha Gupta [this message]
2025-05-22 12:52 ` [PATCH v2] arm: Fix rustgcc unknown argument '-mno-fdpic' Miguel Ojeda
2025-05-22 13:27 ` Rudraksha Gupta
2025-05-22 13:48 ` Miguel Ojeda
2025-05-22 15:14 ` Rudraksha Gupta
2025-05-22 22:13 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250522-rust-mno-fdpic-arm-fix-v2-1-a6f691d9c198@gmail.com \
--to=guptarud@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=anders.roxell@linaro.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=ben.wolsieffer@hefring.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=chrisi.schrefl@gmail.com \
--cc=dakr@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=gary@garyguo.net \
--cc=justinstitt@google.com \
--cc=laura.nao@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=lkft@linaro.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=naresh.kamboju@linaro.org \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=nickc@redhat.com \
--cc=ojeda@kernel.org \
--cc=ramanara@nvidia.com \
--cc=regressions@lists.linux.dev \
--cc=richard.earnshaw@arm.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).