Patchwork [1/2] arch/Config.in: introduce BR2_KERNEL_64_USERLAND_32 symbol

login
register
mail settings
Submitter Gustavo Zacarias
Date Oct. 25, 2013, 1:10 p.m.
Message ID <1382706623-5593-1-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/286141/
State Accepted
Commit 957a986214169a76c51e9f63a232b67f286889d8
Headers show

Comments

Gustavo Zacarias - Oct. 25, 2013, 1:10 p.m.
On some architectures one can be running a 64-bit kernel with a 32-bit
userland.
Such is the case for sparc64 (unsupported) for example and mips64 with
n32 ABI.
Some tools that interface directly with the kernel need to be built
specially for this, so introduce this symbol to tweak their build in one
central kludge to be future-proof.
Example: bug #6602.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 arch/Config.in      | 3 +++
 arch/Config.in.mips | 1 +
 2 files changed, 4 insertions(+)
Thomas Petazzoni - Oct. 30, 2013, 10 p.m.
Dear Gustavo Zacarias,

On Fri, 25 Oct 2013 10:10:22 -0300, Gustavo Zacarias wrote:
> On some architectures one can be running a 64-bit kernel with a 32-bit
> userland.
> Such is the case for sparc64 (unsupported) for example and mips64 with
> n32 ABI.
> Some tools that interface directly with the kernel need to be built
> specially for this, so introduce this symbol to tweak their build in one
> central kludge to be future-proof.
> Example: bug #6602.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  arch/Config.in      | 3 +++
>  arch/Config.in.mips | 1 +
>  2 files changed, 4 insertions(+)

Applied both patches to for-peter-2013.11, thanks!

Thomas

Patch

diff --git a/arch/Config.in b/arch/Config.in
index 3fd8c1c..bc81dac 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -3,6 +3,9 @@  menu "Target options"
 config BR2_ARCH_IS_64
 	bool
 
+config BR2_KERNEL_64_USERLAND_32
+	bool
+
 config BR2_SOFT_FLOAT
 	bool
 
diff --git a/arch/Config.in.mips b/arch/Config.in.mips
index 6242bcc..ca8b87f 100644
--- a/arch/Config.in.mips
+++ b/arch/Config.in.mips
@@ -47,6 +47,7 @@  config BR2_MIPS_OABI32
 config BR2_MIPS_NABI32
 	bool "n32"
 	depends on BR2_ARCH_IS_64
+	select BR2_KERNEL_64_USERLAND_32
 config BR2_MIPS_NABI64
 	bool "n64"
 	depends on BR2_ARCH_IS_64