diff mbox

[v3] Disable o32 ABI for MIPS64 architectures

Message ID 1395843340-18539-1-git-send-email-Vincent.Riera@imgtec.com
State Superseded
Headers show

Commit Message

Vicente Olivert Riera March 26, 2014, 2:15 p.m. UTC
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.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 CHANGES             |    8 ++++++++
 arch/Config.in.mips |   12 +++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

Comments

Arnout Vandecappelle March 26, 2014, 5:18 p.m. UTC | #1
On 26/03/14 15:15, Vicente Olivert Riera wrote:
> 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.
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
>  CHANGES             |    8 ++++++++
>  arch/Config.in.mips |   12 +++++++-----
>  2 files changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/CHANGES b/CHANGES
> index 45a31c4..f07ccfd 100644
> --- a/CHANGES
> +++ b/CHANGES
> @@ -1,3 +1,11 @@
> +2014.05, Not yet released:
> +
> +Support for MIPS o32 ABI on MIPS-64 targets has been removed. 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.
> +
>  2014.02, Released February 27th, 2014
>  
>  	Minor fixes.
> diff --git a/arch/Config.in.mips b/arch/Config.in.mips
> index d9c0c02..f558705 100644
> --- a/arch/Config.in.mips
> +++ b/arch/Config.in.mips
> @@ -38,15 +38,12 @@ endchoice
>  
>  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
> +	depends on BR2_mips64 || BR2_mips64el
> +	default BR2_MIPS_NABI32
>  
>  	help
>  	  Application Binary Interface to use
>  
> -config BR2_MIPS_OABI32
> -	bool "o32"
>  config BR2_MIPS_NABI32
>  	bool "n32"
>  	depends on BR2_ARCH_IS_64
> @@ -86,6 +83,11 @@ config BR2_GCC_TARGET_ARCH
>  	default "mips64"	if BR2_mips_64
>  	default "mips64r2"	if BR2_mips_64r2
>  
> +config BR2_MIPS_OABI32
> +	bool
> +	default y		if BR2_mips || BR2_mipsel
> +	default n		if BR2_mips64 || BR2_mips64el

 Did you forget to remove this or is there a reason to keep it? In the
latter case, please add an explanatory comment.

 Regards,
 Arnout

> +
>  config BR2_GCC_TARGET_ABI
>  	default "32"		if BR2_MIPS_OABI32
>  	default "n32"		if BR2_MIPS_NABI32
>
Vicente Olivert Riera March 26, 2014, 6:03 p.m. UTC | #2
On 03/26/2014 05:18 PM, Arnout Vandecappelle wrote:
> On 26/03/14 15:15, Vicente Olivert Riera wrote:
>> 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.
>>
>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>> ---
>>   CHANGES             |    8 ++++++++
>>   arch/Config.in.mips |   12 +++++++-----
>>   2 files changed, 15 insertions(+), 5 deletions(-)
>>
>> diff --git a/CHANGES b/CHANGES
>> index 45a31c4..f07ccfd 100644
>> --- a/CHANGES
>> +++ b/CHANGES
>> @@ -1,3 +1,11 @@
>> +2014.05, Not yet released:
>> +
>> +Support for MIPS o32 ABI on MIPS-64 targets has been removed. 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.
>> +
>>   2014.02, Released February 27th, 2014
>>
>>   	Minor fixes.
>> diff --git a/arch/Config.in.mips b/arch/Config.in.mips
>> index d9c0c02..f558705 100644
>> --- a/arch/Config.in.mips
>> +++ b/arch/Config.in.mips
>> @@ -38,15 +38,12 @@ endchoice
>>
>>   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
>> +	depends on BR2_mips64 || BR2_mips64el
>> +	default BR2_MIPS_NABI32
>>
>>   	help
>>   	  Application Binary Interface to use
>>
>> -config BR2_MIPS_OABI32
>> -	bool "o32"
>>   config BR2_MIPS_NABI32
>>   	bool "n32"
>>   	depends on BR2_ARCH_IS_64
>> @@ -86,6 +83,11 @@ config BR2_GCC_TARGET_ARCH
>>   	default "mips64"	if BR2_mips_64
>>   	default "mips64r2"	if BR2_mips_64r2
>>
>> +config BR2_MIPS_OABI32
>> +	bool
>> +	default y		if BR2_mips || BR2_mipsel
>> +	default n		if BR2_mips64 || BR2_mips64el
>
>   Did you forget to remove this or is there a reason to keep it? In the
> latter case, please add an explanatory comment.

Why would I want to remove this? The BR2_MIPS_OABI32 symbol is used by 
glibc and uclibc packages.

>   Regards,
>   Arnout
>
>> +
>>   config BR2_GCC_TARGET_ABI
>>   	default "32"		if BR2_MIPS_OABI32
>>   	default "n32"		if BR2_MIPS_NABI32
Peter Korsgaard March 26, 2014, 9:28 p.m. UTC | #3
>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:

Hi,

 >>> +config BR2_MIPS_OABI32
 >>> +	bool
 >>> +	default y		if BR2_mips || BR2_mipsel
 >>> +	default n		if BR2_mips64 || BR2_mips64el
 >> 
 >> Did you forget to remove this or is there a reason to keep it? In the
 >> latter case, please add an explanatory comment.

 > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is used by
 > glibc and uclibc packages.

Arnout is just asking about the 'default n' line. Symbols are 'n' by
default, so the line doesn't do anything as far as I can see.
Vicente Olivert Riera March 27, 2014, 9:56 a.m. UTC | #4
On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:
>
> Hi,
>
>   >>> +config BR2_MIPS_OABI32
>   >>> +	bool
>   >>> +	default y		if BR2_mips || BR2_mipsel
>   >>> +	default n		if BR2_mips64 || BR2_mips64el
>   >>
>   >> Did you forget to remove this or is there a reason to keep it? In the
>   >> latter case, please add an explanatory comment.
>
>   > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is used by
>   > glibc and uclibc packages.
>
> Arnout is just asking about the 'default n' line. Symbols are 'n' by
> default, so the line doesn't do anything as far as I can see.
>

I have maintained that line because if you remove it and then select any 
MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on the 
.config file.

Isn't that a problem?
Joshua Kinard March 28, 2014, 12:02 a.m. UTC | #5
On 03/27/2014 05:56, Vicente Olivert Riera wrote:
> On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:
>>
>> Hi,
>>
>>   >>> +config BR2_MIPS_OABI32
>>   >>> +    bool
>>   >>> +    default y        if BR2_mips || BR2_mipsel
>>   >>> +    default n        if BR2_mips64 || BR2_mips64el
>>   >>
>>   >> Did you forget to remove this or is there a reason to keep it? In the
>>   >> latter case, please add an explanatory comment.
>>
>>   > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is used by
>>   > glibc and uclibc packages.
>>
>> Arnout is just asking about the 'default n' line. Symbols are 'n' by
>> default, so the line doesn't do anything as far as I can see.
>>
> 
> I have maintained that line because if you remove it and then select any
> MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on the
> .config file.
> 
> Isn't that a problem?

Is the definition of BR2_MIPS_OABI32 missing completely, or do you see
"BR2_MIPS_OABI32=y"?  If it's missing completely, then it's virtually the
same as it being there as a comment, which will get stripped out/ignored by
the build system.  Kconfig/Kbuild (whatever it is called) only cares if the
symbol is defined to "y".  I believe that is then checked for in Makefiles
and is in a generated config.h file for use as a C #define.

That's how it works in the Linux kernel at least...
Vicente Olivert Riera March 28, 2014, 9:51 a.m. UTC | #6
On 03/28/2014 12:02 AM, Joshua Kinard wrote:
> On 03/27/2014 05:56, Vicente Olivert Riera wrote:
>> On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:
>>>
>>> Hi,
>>>
>>>    >>> +config BR2_MIPS_OABI32
>>>    >>> +    bool
>>>    >>> +    default y        if BR2_mips || BR2_mipsel
>>>    >>> +    default n        if BR2_mips64 || BR2_mips64el
>>>    >>
>>>    >> Did you forget to remove this or is there a reason to keep it? In the
>>>    >> latter case, please add an explanatory comment.
>>>
>>>    > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is used by
>>>    > glibc and uclibc packages.
>>>
>>> Arnout is just asking about the 'default n' line. Symbols are 'n' by
>>> default, so the line doesn't do anything as far as I can see.
>>>
>>
>> I have maintained that line because if you remove it and then select any
>> MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on the
>> .config file.
>>
>> Isn't that a problem?
>
> Is the definition of BR2_MIPS_OABI32 missing completely, or do you see
> "BR2_MIPS_OABI32=y"?  If it's missing completely, then it's virtually the
> same as it being there as a comment, which will get stripped out/ignored by
> the build system.  Kconfig/Kbuild (whatever it is called) only cares if the
> symbol is defined to "y".  I believe that is then checked for in Makefiles
> and is in a generated config.h file for use as a C #define.
>
> That's how it works in the Linux kernel at least...

If you remove the "default 'n'" line, and you select a MIPS64 target, 
then "BR2_MIPS_OABI32=y" is completely missing in the .config file.
Markos Chandras March 28, 2014, 10:27 a.m. UTC | #7
On 03/28/2014 09:51 AM, Vicente Olivert Riera wrote:
> On 03/28/2014 12:02 AM, Joshua Kinard wrote:
>> On 03/27/2014 05:56, Vicente Olivert Riera wrote:
>>> On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>>>>>>>>> writes:
>>>>
>>>> Hi,
>>>>
>>>>    >>> +config BR2_MIPS_OABI32
>>>>    >>> +    bool
>>>>    >>> +    default y        if BR2_mips || BR2_mipsel
>>>>    >>> +    default n        if BR2_mips64 || BR2_mips64el
>>>>    >>
>>>>    >> Did you forget to remove this or is there a reason to keep it?
>>>> In the
>>>>    >> latter case, please add an explanatory comment.
>>>>
>>>>    > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is
>>>> used by
>>>>    > glibc and uclibc packages.
>>>>
>>>> Arnout is just asking about the 'default n' line. Symbols are 'n' by
>>>> default, so the line doesn't do anything as far as I can see.
>>>>
>>>
>>> I have maintained that line because if you remove it and then select any
>>> MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on the
>>> .config file.
>>>
>>> Isn't that a problem?
>>
>> Is the definition of BR2_MIPS_OABI32 missing completely, or do you see
>> "BR2_MIPS_OABI32=y"?  If it's missing completely, then it's virtually the
>> same as it being there as a comment, which will get stripped
>> out/ignored by
>> the build system.  Kconfig/Kbuild (whatever it is called) only cares
>> if the
>> symbol is defined to "y".  I believe that is then checked for in
>> Makefiles
>> and is in a generated config.h file for use as a C #define.
>>
>> That's how it works in the Linux kernel at least...
>
> If you remove the "default 'n'" line, and you select a MIPS64 target,
> then "BR2_MIPS_OABI32=y" is completely missing in the .config file.
>
>

That's not a problem is it? It's ok if the line is missing. A missing 
line means "this option is not available". A line starting with "#" 
means "the option is available but currently disabled"
Vicente Olivert Riera March 28, 2014, 10:38 a.m. UTC | #8
On 03/28/2014 10:27 AM, Markos Chandras wrote:
> On 03/28/2014 09:51 AM, Vicente Olivert Riera wrote:
>> On 03/28/2014 12:02 AM, Joshua Kinard wrote:
>>> On 03/27/2014 05:56, Vicente Olivert Riera wrote:
>>>> On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>>>>>>>>>> writes:
>>>>>
>>>>> Hi,
>>>>>
>>>>>    >>> +config BR2_MIPS_OABI32
>>>>>    >>> +    bool
>>>>>    >>> +    default y        if BR2_mips || BR2_mipsel
>>>>>    >>> +    default n        if BR2_mips64 || BR2_mips64el
>>>>>    >>
>>>>>    >> Did you forget to remove this or is there a reason to keep it?
>>>>> In the
>>>>>    >> latter case, please add an explanatory comment.
>>>>>
>>>>>    > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is
>>>>> used by
>>>>>    > glibc and uclibc packages.
>>>>>
>>>>> Arnout is just asking about the 'default n' line. Symbols are 'n' by
>>>>> default, so the line doesn't do anything as far as I can see.
>>>>>
>>>>
>>>> I have maintained that line because if you remove it and then select
>>>> any
>>>> MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on the
>>>> .config file.
>>>>
>>>> Isn't that a problem?
>>>
>>> Is the definition of BR2_MIPS_OABI32 missing completely, or do you see
>>> "BR2_MIPS_OABI32=y"?  If it's missing completely, then it's virtually
>>> the
>>> same as it being there as a comment, which will get stripped
>>> out/ignored by
>>> the build system.  Kconfig/Kbuild (whatever it is called) only cares
>>> if the
>>> symbol is defined to "y".  I believe that is then checked for in
>>> Makefiles
>>> and is in a generated config.h file for use as a C #define.
>>>
>>> That's how it works in the Linux kernel at least...
>>
>> If you remove the "default 'n'" line, and you select a MIPS64 target,
>> then "BR2_MIPS_OABI32=y" is completely missing in the .config file.
>>
>>
>
> That's not a problem is it? It's ok if the line is missing. A missing
> line means "this option is not available". A line starting with "#"
> means "the option is available but currently disabled"

I want to be sure about that, because there are packages which use the 
BR2_MIPS_OABI32 symbol. So, maybe having that line starting with "#" 
means BR2_MIPS_OABI32=n, and everything works fine, and don't having 
that line at all means that symbol is not defined and the packages which 
use that symbol fail because of that. That's what I want to know.
Markos Chandras March 28, 2014, 10:41 a.m. UTC | #9
On 03/28/2014 10:38 AM, Vicente Olivert Riera wrote:
> On 03/28/2014 10:27 AM, Markos Chandras wrote:
>> On 03/28/2014 09:51 AM, Vicente Olivert Riera wrote:
>>> On 03/28/2014 12:02 AM, Joshua Kinard wrote:
>>>> On 03/27/2014 05:56, Vicente Olivert Riera wrote:
>>>>> On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>>>>>>>>>>> writes:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>    >>> +config BR2_MIPS_OABI32
>>>>>>    >>> +    bool
>>>>>>    >>> +    default y        if BR2_mips || BR2_mipsel
>>>>>>    >>> +    default n        if BR2_mips64 || BR2_mips64el
>>>>>>    >>
>>>>>>    >> Did you forget to remove this or is there a reason to keep it?
>>>>>> In the
>>>>>>    >> latter case, please add an explanatory comment.
>>>>>>
>>>>>>    > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is
>>>>>> used by
>>>>>>    > glibc and uclibc packages.
>>>>>>
>>>>>> Arnout is just asking about the 'default n' line. Symbols are 'n' by
>>>>>> default, so the line doesn't do anything as far as I can see.
>>>>>>
>>>>>
>>>>> I have maintained that line because if you remove it and then select
>>>>> any
>>>>> MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on
>>>>> the
>>>>> .config file.
>>>>>
>>>>> Isn't that a problem?
>>>>
>>>> Is the definition of BR2_MIPS_OABI32 missing completely, or do you see
>>>> "BR2_MIPS_OABI32=y"?  If it's missing completely, then it's virtually
>>>> the
>>>> same as it being there as a comment, which will get stripped
>>>> out/ignored by
>>>> the build system.  Kconfig/Kbuild (whatever it is called) only cares
>>>> if the
>>>> symbol is defined to "y".  I believe that is then checked for in
>>>> Makefiles
>>>> and is in a generated config.h file for use as a C #define.
>>>>
>>>> That's how it works in the Linux kernel at least...
>>>
>>> If you remove the "default 'n'" line, and you select a MIPS64 target,
>>> then "BR2_MIPS_OABI32=y" is completely missing in the .config file.
>>>
>>>
>>
>> That's not a problem is it? It's ok if the line is missing. A missing
>> line means "this option is not available". A line starting with "#"
>> means "the option is available but currently disabled"
>
> I want to be sure about that, because there are packages which use the
> BR2_MIPS_OABI32 symbol. So, maybe having that line starting with "#"
> means BR2_MIPS_OABI32=n, and everything works fine, and don't having
> that line at all means that symbol is not defined and the packages which
> use that symbol fail because of that. That's what I want to know.
>

I think not having that line, or having that line but prefixed with "#" 
is the same thing as far as the Kconfig dependencies are concerned.
(pretty much what Joshua said already)
Joshua Kinard March 28, 2014, 10:52 a.m. UTC | #10
On 03/28/2014 06:41, Markos Chandras wrote:
> On 03/28/2014 10:38 AM, Vicente Olivert Riera wrote:
>> On 03/28/2014 10:27 AM, Markos Chandras wrote:
>>> On 03/28/2014 09:51 AM, Vicente Olivert Riera wrote:
>>>> On 03/28/2014 12:02 AM, Joshua Kinard wrote:
>>>>> On 03/27/2014 05:56, Vicente Olivert Riera wrote:
>>>>>> On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>>>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>>>>>>>>>>>> writes:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>    >>> +config BR2_MIPS_OABI32
>>>>>>>    >>> +    bool
>>>>>>>    >>> +    default y        if BR2_mips || BR2_mipsel
>>>>>>>    >>> +    default n        if BR2_mips64 || BR2_mips64el
>>>>>>>    >>
>>>>>>>    >> Did you forget to remove this or is there a reason to keep it?
>>>>>>> In the
>>>>>>>    >> latter case, please add an explanatory comment.
>>>>>>>
>>>>>>>    > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is
>>>>>>> used by
>>>>>>>    > glibc and uclibc packages.
>>>>>>>
>>>>>>> Arnout is just asking about the 'default n' line. Symbols are 'n' by
>>>>>>> default, so the line doesn't do anything as far as I can see.
>>>>>>>
>>>>>>
>>>>>> I have maintained that line because if you remove it and then select
>>>>>> any
>>>>>> MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on
>>>>>> the
>>>>>> .config file.
>>>>>>
>>>>>> Isn't that a problem?
>>>>>
>>>>> Is the definition of BR2_MIPS_OABI32 missing completely, or do you see
>>>>> "BR2_MIPS_OABI32=y"?  If it's missing completely, then it's virtually
>>>>> the
>>>>> same as it being there as a comment, which will get stripped
>>>>> out/ignored by
>>>>> the build system.  Kconfig/Kbuild (whatever it is called) only cares
>>>>> if the
>>>>> symbol is defined to "y".  I believe that is then checked for in
>>>>> Makefiles
>>>>> and is in a generated config.h file for use as a C #define.
>>>>>
>>>>> That's how it works in the Linux kernel at least...
>>>>
>>>> If you remove the "default 'n'" line, and you select a MIPS64 target,
>>>> then "BR2_MIPS_OABI32=y" is completely missing in the .config file.
>>>>
>>>>
>>>
>>> That's not a problem is it? It's ok if the line is missing. A missing
>>> line means "this option is not available". A line starting with "#"
>>> means "the option is available but currently disabled"
>>
>> I want to be sure about that, because there are packages which use the
>> BR2_MIPS_OABI32 symbol. So, maybe having that line starting with "#"
>> means BR2_MIPS_OABI32=n, and everything works fine, and don't having
>> that line at all means that symbol is not defined and the packages which
>> use that symbol fail because of that. That's what I want to know.
>>
> 
> I think not having that line, or having that line but prefixed with "#" is
> the same thing as far as the Kconfig dependencies are concerned.
> (pretty much what Joshua said already)

Yup, it's just a comment and for human consumption only.  It's just a way of
telling you, when you read the config file, that the option is disabled.
Vicente Olivert Riera March 28, 2014, 11:01 a.m. UTC | #11
On 03/28/2014 10:52 AM, Joshua Kinard wrote:
> On 03/28/2014 06:41, Markos Chandras wrote:
>> On 03/28/2014 10:38 AM, Vicente Olivert Riera wrote:
>>> On 03/28/2014 10:27 AM, Markos Chandras wrote:
>>>> On 03/28/2014 09:51 AM, Vicente Olivert Riera wrote:
>>>>> On 03/28/2014 12:02 AM, Joshua Kinard wrote:
>>>>>> On 03/27/2014 05:56, Vicente Olivert Riera wrote:
>>>>>>> On 03/26/2014 09:28 PM, Peter Korsgaard wrote:
>>>>>>>>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>>>>>>>>>>>>> writes:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>>     >>> +config BR2_MIPS_OABI32
>>>>>>>>     >>> +    bool
>>>>>>>>     >>> +    default y        if BR2_mips || BR2_mipsel
>>>>>>>>     >>> +    default n        if BR2_mips64 || BR2_mips64el
>>>>>>>>     >>
>>>>>>>>     >> Did you forget to remove this or is there a reason to keep it?
>>>>>>>> In the
>>>>>>>>     >> latter case, please add an explanatory comment.
>>>>>>>>
>>>>>>>>     > Why would I want to remove this? The BR2_MIPS_OABI32 symbol is
>>>>>>>> used by
>>>>>>>>     > glibc and uclibc packages.
>>>>>>>>
>>>>>>>> Arnout is just asking about the 'default n' line. Symbols are 'n' by
>>>>>>>> default, so the line doesn't do anything as far as I can see.
>>>>>>>>
>>>>>>>
>>>>>>> I have maintained that line because if you remove it and then select
>>>>>>> any
>>>>>>> MIPS64 target, the "# BR2_MIPS_OABI32 is not set" is not present on
>>>>>>> the
>>>>>>> .config file.
>>>>>>>
>>>>>>> Isn't that a problem?
>>>>>>
>>>>>> Is the definition of BR2_MIPS_OABI32 missing completely, or do you see
>>>>>> "BR2_MIPS_OABI32=y"?  If it's missing completely, then it's virtually
>>>>>> the
>>>>>> same as it being there as a comment, which will get stripped
>>>>>> out/ignored by
>>>>>> the build system.  Kconfig/Kbuild (whatever it is called) only cares
>>>>>> if the
>>>>>> symbol is defined to "y".  I believe that is then checked for in
>>>>>> Makefiles
>>>>>> and is in a generated config.h file for use as a C #define.
>>>>>>
>>>>>> That's how it works in the Linux kernel at least...
>>>>>
>>>>> If you remove the "default 'n'" line, and you select a MIPS64 target,
>>>>> then "BR2_MIPS_OABI32=y" is completely missing in the .config file.
>>>>>
>>>>>
>>>>
>>>> That's not a problem is it? It's ok if the line is missing. A missing
>>>> line means "this option is not available". A line starting with "#"
>>>> means "the option is available but currently disabled"
>>>
>>> I want to be sure about that, because there are packages which use the
>>> BR2_MIPS_OABI32 symbol. So, maybe having that line starting with "#"
>>> means BR2_MIPS_OABI32=n, and everything works fine, and don't having
>>> that line at all means that symbol is not defined and the packages which
>>> use that symbol fail because of that. That's what I want to know.
>>>
>>
>> I think not having that line, or having that line but prefixed with "#" is
>> the same thing as far as the Kconfig dependencies are concerned.
>> (pretty much what Joshua said already)
>
> Yup, it's just a comment and for human consumption only.  It's just a way of
> telling you, when you read the config file, that the option is disabled.
>

V4 sent: http://patchwork.ozlabs.org/patch/334661/
Thomas Petazzoni March 28, 2014, 11:07 a.m. UTC | #12
Dear Vicente Olivert Riera,

On Fri, 28 Mar 2014 10:38:04 +0000, Vicente Olivert Riera wrote:

> > That's not a problem is it? It's ok if the line is missing. A
> > missing line means "this option is not available". A line starting
> > with "#" means "the option is available but currently disabled"
> 
> I want to be sure about that, because there are packages which use
> the BR2_MIPS_OABI32 symbol. So, maybe having that line starting with
> "#" means BR2_MIPS_OABI32=n, and everything works fine, and don't
> having that line at all means that symbol is not defined and the
> packages which use that symbol fail because of that. That's what I
> want to know.

BR2_FOO=n never exists. An option is either BR2_FOO=y, or undefined.
And since # indicates comments in .config files, a # BR2_FOO is not set
line is the same as not having BR2_FOO mentioned at all in the .config.

Thomas
diff mbox

Patch

diff --git a/CHANGES b/CHANGES
index 45a31c4..f07ccfd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@ 
+2014.05, Not yet released:
+
+Support for MIPS o32 ABI on MIPS-64 targets has been removed. 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.
+
 2014.02, Released February 27th, 2014
 
 	Minor fixes.
diff --git a/arch/Config.in.mips b/arch/Config.in.mips
index d9c0c02..f558705 100644
--- a/arch/Config.in.mips
+++ b/arch/Config.in.mips
@@ -38,15 +38,12 @@  endchoice
 
 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
+	depends on BR2_mips64 || BR2_mips64el
+	default BR2_MIPS_NABI32
 
 	help
 	  Application Binary Interface to use
 
-config BR2_MIPS_OABI32
-	bool "o32"
 config BR2_MIPS_NABI32
 	bool "n32"
 	depends on BR2_ARCH_IS_64
@@ -86,6 +83,11 @@  config BR2_GCC_TARGET_ARCH
 	default "mips64"	if BR2_mips_64
 	default "mips64r2"	if BR2_mips_64r2
 
+config BR2_MIPS_OABI32
+	bool
+	default y		if BR2_mips || BR2_mipsel
+	default n		if BR2_mips64 || BR2_mips64el
+
 config BR2_GCC_TARGET_ABI
 	default "32"		if BR2_MIPS_OABI32
 	default "n32"		if BR2_MIPS_NABI32