rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rudraksha Gupta <guptarud@gmail.com>
To: torvalds@linux-foundation.org
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Ben Wolsieffer" <ben.wolsieffer@hefring.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>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	"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] arm: Fix rustgcc unknown argument '-mno-fdpic'
Date: Tue, 20 May 2025 15:48:37 -0700	[thread overview]
Message-ID: <20250520-rust-mno-fdpic-arm-fix-v1-1-44e77fe6b2a1@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.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/all/CA+G9fYvOanQBYXKSg7C6EU30k8sTRC0JRPJXYu7wWK51w38QUQ@mail.gmail.com/

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>

Tested-by: Rudraksha Gupta <guptarud@gmail.com>
Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
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.

It seems like this bug went through the cracks, so I went ahead and sent
it. Hopefully nobody minds.

Closes: https://lore.kernel.org/all/CA+G9fYvOanQBYXKSg7C6EU30k8sTRC0JRPJXYu7wWK51w38QUQ@mail.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>


             reply	other threads:[~2025-05-20 22:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 22:48 Rudraksha Gupta [this message]
2025-05-21  7:09 ` [PATCH] arm: Fix rustgcc unknown argument '-mno-fdpic' Miguel Ojeda
2025-05-21 13:57   ` Rudraksha Gupta
2025-05-21 14:07     ` Miguel Ojeda
2025-05-22  8:34       ` Naresh Kamboju
2025-05-22  8:46         ` 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=20250520-rust-mno-fdpic-arm-fix-v1-1-44e77fe6b2a1@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=laura.nao@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=lkft@linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --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).