Skip to contentSkip to conversation

Disable o32 ABI for MIPS64 architectures

PATCH New Vicente Olivert Riera 2 participants 5 messages Mar 5, 2014 – Mar 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable o32 ABI for MIPS64 architectures

Building o32 ELF files for MIPS64 is an exotic configuration that nobody should be using. If o32 is required, then is better if it's built for MIPS 32-bit cores so only 32-bit instructions will be used leading to a more efficient o32 usage.

---
 arch/Config.in.mips |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/Config.in.mips +1 -0
index d9c0c02..e2b1e60 100644
@@ -47,6 +47,7 @@ choice
 
 config BR2_MIPS_OABI32
 	bool "o32"
+	depends on !BR2_ARCH_IS_64
 config BR2_MIPS_NABI32
 	bool "n32"
 	depends on BR2_ARCH_IS_64
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 Disable o32 ABI for MIPS64 architectures

Quoted 16 lines · Vicente Olivert Riera

Building o32 ELF files for MIPS64 is an exotic configuration that nobody should be using. If o32 is required, then is better if it's built for MIPS 32-bit cores so only 32-bit instructions will be used leading to a more efficient o32 usage.

---
 arch/Config.in.mips |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/Config.in.mips +0 -0
index d9c0c02..e2b1e60 100644

arch/Config.in.mips choice · line 53

Quoted 7 lines
arch/Config.in.mips +1 -0
@@ -47,6 +47,7 @@ choice
 
 config BR2_MIPS_OABI32
 	bool "o32"
+	depends on !BR2_ARCH_IS_64
 config BR2_MIPS_NABI32
 	bool "n32"
 	depends on BR2_ARCH_IS_64

Then maybe it's better to make the choice depend on BR2_ARCH_IS_64, and
make the OABI32 symbol blind and default y on !BR2_ARCH_IS_64.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

PATCH 1/1 Disable o32 ABI for MIPS64 architectures

Quoted 17 lines · Arnout Vandecappelle
Quoted 16 lines · Vicente Olivert Riera

Building o32 ELF files for MIPS64 is an exotic configuration that nobody should be using. If o32 is required, then is better if it's built for MIPS 32-bit cores so only 32-bit instructions will be used leading to a more efficient o32 usage.

---
  arch/Config.in.mips |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
arch/Config.in.mips +0 -0
index d9c0c02..e2b1e60 100644
@@ -47,6 +47,7 @@ choice
 
Quoted 10 lines

arch/Config.in.mips choice · line 53

Quoted 7 lines
arch/Config.in.mips +1 -0
  config BR2_MIPS_OABI32
  	bool "o32"
+	depends on !BR2_ARCH_IS_64
  config BR2_MIPS_NABI32
  	bool "n32"
  	depends on BR2_ARCH_IS_64

Then maybe it's better to make the choice depend on BR2_ARCH_IS_64, and
make the OABI32 symbol blind and default y on !BR2_ARCH_IS_64.

OABI32 is already the default on !BR2_ARCH_IS_64. Take a look to this part of the Config.in.mips:

choice

         prompt "Target ABI"
         depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
         default BR2_MIPS_OABI32 if !BR2_ARCH_IS_64
         default BR2_MIPS_NABI32 if BR2_ARCH_IS_64
Quoted 4 lines

Regards,
Arnout

Signature · 1 line
Vincent
#3 lore raw

PATCH 1/1 Disable o32 ABI for MIPS64 architectures

Quoted 29 lines · Vicente Olivert Riera
Quoted 17 lines · Arnout Vandecappelle
Quoted 16 lines · Vicente Olivert Riera

Building o32 ELF files for MIPS64 is an exotic configuration that nobody should be using. If o32 is required, then is better if it's built for MIPS 32-bit cores so only 32-bit instructions will be used leading to a more efficient o32 usage.

---
  arch/Config.in.mips |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
arch/Config.in.mips +0 -0
index d9c0c02..e2b1e60 100644
@@ -47,6 +47,7 @@ choice
 
Quoted 10 lines

arch/Config.in.mips choice · line 53

Quoted 7 lines
arch/Config.in.mips +1 -0
  config BR2_MIPS_OABI32
      bool "o32"
+    depends on !BR2_ARCH_IS_64
  config BR2_MIPS_NABI32
      bool "n32"
      depends on BR2_ARCH_IS_64

Then maybe it's better to make the choice depend on BR2_ARCH_IS_64, and
make the OABI32 symbol blind and default y on !BR2_ARCH_IS_64.

Quoted 8 lines

OABI32 is already the default on !BR2_ARCH_IS_64. Take a look to this part of the Config.in.mips:

choice

        prompt "Target ABI"
        depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
        default BR2_MIPS_OABI32 if !BR2_ARCH_IS_64
        default BR2_MIPS_NABI32 if BR2_ARCH_IS_64

It's not just the default, it's the only valid choice. So indeed, it
already doesn't make much sense to present the user with the choice if there is only one option. However, removing it is currently a bit complicated because you need to keep the BR2_MIPS_OABI32 config in the choice for BR2_ARCH_IS_64.

However, with your change, there is no need at all to keep the OABI32
option in the choice: if 64, it is forced to no, and if !64, it is forced to yes.

BTW, something I forgot to mention earlier: ideally there should be a
legacy detection for existing configs with 64 and OABI32. It may be a bit difficult to implement, however.

Regards,
Arnout

Quoted 7 lines
Quoted 5 lines

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#4 lore raw

PATCH 1/1 Disable o32 ABI for MIPS64 architectures

Quoted 50 lines · Arnout Vandecappelle
Quoted 29 lines · Vicente Olivert Riera
Quoted 17 lines · Arnout Vandecappelle
Quoted 16 lines · Vicente Olivert Riera

Building o32 ELF files for MIPS64 is an exotic configuration that nobody should be using. If o32 is required, then is better if it's built for MIPS 32-bit cores so only 32-bit instructions will be used leading to a more efficient o32 usage.

---
   arch/Config.in.mips |    1 +
   1 files changed, 1 insertions(+), 0 deletions(-)
arch/Config.in.mips +0 -0
index d9c0c02..e2b1e60 100644
@@ -47,6 +47,7 @@ choice
 
Quoted 10 lines

arch/Config.in.mips choice · line 53

Quoted 7 lines
arch/Config.in.mips +1 -0
   config BR2_MIPS_OABI32
       bool "o32"
+    depends on !BR2_ARCH_IS_64
   config BR2_MIPS_NABI32
       bool "n32"
       depends on BR2_ARCH_IS_64

Then maybe it's better to make the choice depend on BR2_ARCH_IS_64, and
make the OABI32 symbol blind and default y on !BR2_ARCH_IS_64.

Quoted 8 lines

OABI32 is already the default on !BR2_ARCH_IS_64. Take a look to this part of the Config.in.mips:

choice

         prompt "Target ABI"
         depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
         default BR2_MIPS_OABI32 if !BR2_ARCH_IS_64
         default BR2_MIPS_NABI32 if BR2_ARCH_IS_64

It's not just the default, it's the only valid choice. So indeed, it
already doesn't make much sense to present the user with the choice if there is only one option. However, removing it is currently a bit complicated because you need to keep the BR2_MIPS_OABI32 config in the choice for BR2_ARCH_IS_64.

However, with your change, there is no need at all to keep the OABI32
option in the choice: if 64, it is forced to no, and if !64, it is forced to yes.

Quoted 17 lines

BTW, something I forgot to mention earlier: ideally there should be a
legacy detection for existing configs with 64 and OABI32. It may be a bit difficult to implement, however.

Regards,
Arnout

Quoted 7 lines
Quoted 5 lines

Regards,
Arnout

Patch V2 sent: http://patchwork.ozlabs.org/patch/333638/

Signature · 1 line
Vincent