Patchwork [01/18] Remove UNAME-RELEASE from target name for darwin

login
register
mail settings
Submitter Yann Diorcet
Date Oct. 21, 2012, 3:27 p.m.
Message ID <1350833261-8401-1-git-send-email-diorcet.yann@gmail.com>
Download mbox | patch
Permalink /patch/193006/
State Rejected
Delegated to: Esben Haabendal
Headers show

Comments

Yann Diorcet - Oct. 21, 2012, 3:27 p.m.
From: Yann Diorcet <yann.diorcet@belledonne-communications.com>

If not removed the OS string may contains a dot and produce error (added to the fact that the overriding will be depending on darwin release).
ex TARGET_OS_darwin12.2
---
 scripts/config.guess |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Esben Haabendal - Oct. 22, 2012, 6:12 p.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> If not removed the OS string may contains a dot and produce error

What kind of error, and where?

As many recipes come with their own config.guess/config.sub scripts, it
might be better to fix the error.  Otherwise, we might introduce a
growing overhead in supporting OS X as the number of recipes grow.

> (added to the fact that the overriding will be depending on darwin release).
> ex TARGET_OS_darwin12.2

That, we can fix :-)

I am working on a change that adds a number of more generic overrides,
like HOST_LIBC_glibc, for all HOST_OS_linux-gnu*,
HOST_KERNEL_linux for all HOST_OS_*linux*, HOST_BINFMT_elf for all ELF
based hosts, and so on.  Of-course, this is done for both HOST and
TARGET, and we should probably add BUILD also.

For OS X, we could add something like, BUILD_KERNEL_darwin,
HOST_KERNEL_darwin and TARGET_KERNEL_darwin overrides, while using the
standard GNU config.guess scripts, and thus having BUILD_OS_darwin12.2.

/Esben

> ---
>  scripts/config.guess |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/config.guess b/scripts/config.guess
> index e792aac..31b8923 100755
> --- a/scripts/config.guess
> +++ b/scripts/config.guess
> @@ -1210,7 +1210,7 @@ EOF
>  		fi ;;
>  	    unknown) UNAME_PROCESSOR=powerpc ;;
>  	esac
> -	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
> +	echo ${UNAME_PROCESSOR}-apple-darwin
>  	exit ;;
>      *:procnto*:*:* | *:QNX:[0123456789]*:*)
>  	UNAME_PROCESSOR=`uname -p`
Yann Diorcet - Oct. 22, 2012, 6:14 p.m.
Le 22/10/2012 20:12, Esben Haabendal a écrit :
> Yann Diorcet <diorcet.yann@gmail.com> writes:
>
>> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>>
>> If not removed the OS string may contains a dot and produce error
> What kind of error, and where?
It was old stuff if i correct remember it was the dot in the variable 
name (TARGET_OS_darwin12.2)
>
> As many recipes come with their own config.guess/config.sub scripts, it
> might be better to fix the error.  Otherwise, we might introduce a
> growing overhead in supporting OS X as the number of recipes grow.
>
>> (added to the fact that the overriding will be depending on darwin release).
>> ex TARGET_OS_darwin12.2
> That, we can fix :-)
>
> I am working on a change that adds a number of more generic overrides,
> like HOST_LIBC_glibc, for all HOST_OS_linux-gnu*,
> HOST_KERNEL_linux for all HOST_OS_*linux*, HOST_BINFMT_elf for all ELF
> based hosts, and so on.  Of-course, this is done for both HOST and
> TARGET, and we should probably add BUILD also.
>
> For OS X, we could add something like, BUILD_KERNEL_darwin,
> HOST_KERNEL_darwin and TARGET_KERNEL_darwin overrides, while using the
> standard GNU config.guess scripts, and thus having BUILD_OS_darwin12.2.
>
> /Esben
>
>> ---
>>   scripts/config.guess |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/config.guess b/scripts/config.guess
>> index e792aac..31b8923 100755
>> --- a/scripts/config.guess
>> +++ b/scripts/config.guess
>> @@ -1210,7 +1210,7 @@ EOF
>>   		fi ;;
>>   	    unknown) UNAME_PROCESSOR=powerpc ;;
>>   	esac
>> -	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
>> +	echo ${UNAME_PROCESSOR}-apple-darwin
>>   	exit ;;
>>       *:procnto*:*:* | *:QNX:[0123456789]*:*)
>>   	UNAME_PROCESSOR=`uname -p`
Esben Haabendal - Oct. 22, 2012, 9:44 p.m.
Diorcet Yann <diorcet.yann@gmail.com> writes:

> Le 22/10/2012 20:12, Esben Haabendal a écrit :
>> Yann Diorcet <diorcet.yann@gmail.com> writes:
>>
>>> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>>>
>>> If not removed the OS string may contains a dot and produce error
>> What kind of error, and where?

> It was old stuff if i correct remember it was the dot in the variable name
> (TARGET_OS_darwin12.2)

Looking at config.guess, darwin is not the only system that would be
bitten by such problems.

What recipe(s) failed?

/Esben
Yann Diorcet - Oct. 22, 2012, 11:23 p.m.
Hum, i have check again.. there is not error (maybe it was a error produce
by something else at this time)
But i have darwin12.2.0
if you have the generic overrides, this patch will be useless.
I will use BUILD_OS_darwin* or TARGET_OS_darwin*
(i have notice the same issue with linux-gnu and linux-gnueabi)

2012/10/22 Esben Haabendal <esben.haabendal@dev.prevas.dk>

> Diorcet Yann <diorcet.yann@gmail.com> writes:
>
> > Le 22/10/2012 20:12, Esben Haabendal a écrit :
> >> Yann Diorcet <diorcet.yann@gmail.com> writes:
> >>
> >>> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
> >>>
> >>> If not removed the OS string may contains a dot and produce error
> >> What kind of error, and where?
>
> > It was old stuff if i correct remember it was the dot in the variable
> name
> > (TARGET_OS_darwin12.2)
>
> Looking at config.guess, darwin is not the only system that would be
> bitten by such problems.
>
> What recipe(s) failed?
>
> /Esben
>
Esben Haabendal - Oct. 23, 2012, 2:50 p.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> Hum, i have check again.. there is not error (maybe it was a error produce by
> something else at this time)

Great :-)

> But i have darwin12.2.0
> if you have the generic overrides, this patch will be useless.

I will make sure it goes into OE-lite/core 3.3

> I will use BUILD_OS_darwin* or TARGET_OS_darwin*
> (i have notice the same issue with linux-gnu and linux-gnueabi)

Yes, and we also have linux-gnualtivec coming around...

/Esben
Esben Haabendal - March 5, 2013, 8:04 a.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> If not removed the OS string may contains a dot and produce error (added to the fact that the overriding will be depending on darwin release).
> ex TARGET_OS_darwin12.2
> ---
>  scripts/config.guess |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/config.guess b/scripts/config.guess
> index e792aac..31b8923 100755
> --- a/scripts/config.guess
> +++ b/scripts/config.guess
> @@ -1210,7 +1210,7 @@ EOF
>  		fi ;;
>  	    unknown) UNAME_PROCESSOR=powerpc ;;
>  	esac
> -	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
> +	echo ${UNAME_PROCESSOR}-apple-darwin
>  	exit ;;
>      *:procnto*:*:* | *:QNX:[0123456789]*:*)
>  	UNAME_PROCESSOR=`uname -p`

Overriding can now be achieved with fx. HOST_KERNEL_darwin, which will
be set on any OS starting with "darwin".

As for patching config.guess, I really want to be able to handle it
without this.  If it is needed, we will have to ensure that all recipes
always replace config.guess, which most likely will open up for other
issues.

If unchanged config.guess causes errors on darwin, please report the
issue so we can find a solution.  Hopefully, without patching
config.guess.

/Esben

Patch

diff --git a/scripts/config.guess b/scripts/config.guess
index e792aac..31b8923 100755
--- a/scripts/config.guess
+++ b/scripts/config.guess
@@ -1210,7 +1210,7 @@  EOF
 		fi ;;
 	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	echo ${UNAME_PROCESSOR}-apple-darwin
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`