All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3] gcc-cross: default linker hash style to sysv
@ 2016-07-07 21:08 Christopher Larson
  2016-07-08 13:08 ` Andre McCurdy
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Larson @ 2016-07-07 21:08 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to
this in the toolchain, while convenient, actually hides bugs, as a failure to
obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how we
poison the sysroot -- rather than relying on the default, notice right away if
somoeone isn't obeying the needed flags.

This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure,
which is what's often seen with external toolchains. This brings us all on the
same page, and makes sure a failure to obey LDFLAGS is seen early.

This is limited to cross, to retain ease of use for SDKs.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---

Supercedes '[PATCHv2] gcc-cross: remove --with-linker-hash-style'
v3 changes: per khem's advice, switched to use of LINKER_HASH_STYLE

diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index f479360..c0b8751 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -13,6 +13,11 @@ PN = "gcc-cross-${TARGET_ARCH}"
 
 require gcc-configure-common.inc
 
+# While we want the 'gnu' hash style, we explicitly set it to sysv here to
+# ensure that any recipe which doesn't obey our LDFLAGS (which also set it to
+# gnu) will hit a QA failure.
+LINKER_HASH_STYLE ?= "sysv"
+
 EXTRA_OECONF += "--enable-poison-system-directories"
 EXTRA_OECONF_append_sh4 = " \
     --with-multilib-list= \
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCHv3] gcc-cross: default linker hash style to sysv
  2016-07-07 21:08 [PATCHv3] gcc-cross: default linker hash style to sysv Christopher Larson
@ 2016-07-08 13:08 ` Andre McCurdy
  2016-07-08 14:11   ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Andre McCurdy @ 2016-07-08 13:08 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Christopher Larson, OE Core mailing list

On Thu, Jul 7, 2016 at 2:08 PM, Christopher Larson <kergoth@gmail.com> wrote:
> From: Christopher Larson <chris_larson@mentor.com>
>
> We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to
> this in the toolchain, while convenient, actually hides bugs, as a failure to
> obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how we
> poison the sysroot -- rather than relying on the default, notice right away if
> somoeone isn't obeying the needed flags.
>
> This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure,
> which is what's often seen with external toolchains. This brings us all on the
> same page, and makes sure a failure to obey LDFLAGS is seen early.
>
> This is limited to cross, to retain ease of use for SDKs.
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>
> Supercedes '[PATCHv2] gcc-cross: remove --with-linker-hash-style'
> v3 changes: per khem's advice, switched to use of LINKER_HASH_STYLE
>
> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> index f479360..c0b8751 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> @@ -13,6 +13,11 @@ PN = "gcc-cross-${TARGET_ARCH}"
>
>  require gcc-configure-common.inc
>
> +# While we want the 'gnu' hash style, we explicitly set it to sysv here to
> +# ensure that any recipe which doesn't obey our LDFLAGS (which also set it to
> +# gnu) will hit a QA failure.
> +LINKER_HASH_STYLE ?= "sysv"

Defining a new variable (LINKER_HASH_STYLE_INVERSE ?) and setting it
to the opposite of whatever bitbake.conf ends up assigning to
LINKER_HASH_STYLE might be clearer here.

Otherwise MIPS toolchains will continue to default to the same hash
style as MIPS LDFLAGS.

> +
>  EXTRA_OECONF += "--enable-poison-system-directories"
>  EXTRA_OECONF_append_sh4 = " \
>      --with-multilib-list= \
> --
> 2.8.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCHv3] gcc-cross: default linker hash style to sysv
  2016-07-08 13:08 ` Andre McCurdy
@ 2016-07-08 14:11   ` Khem Raj
  2016-07-08 15:45     ` Andre McCurdy
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2016-07-08 14:11 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Christopher Larson, OE Core mailing list

On Fri, Jul 8, 2016 at 6:08 AM, Andre McCurdy <armccurdy@gmail.com> wrote:
> On Thu, Jul 7, 2016 at 2:08 PM, Christopher Larson <kergoth@gmail.com> wrote:
>> From: Christopher Larson <chris_larson@mentor.com>
>>
>> We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to
>> this in the toolchain, while convenient, actually hides bugs, as a failure to
>> obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how we
>> poison the sysroot -- rather than relying on the default, notice right away if
>> somoeone isn't obeying the needed flags.
>>
>> This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure,
>> which is what's often seen with external toolchains. This brings us all on the
>> same page, and makes sure a failure to obey LDFLAGS is seen early.
>>
>> This is limited to cross, to retain ease of use for SDKs.
>>
>> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
>> ---
>>
>> Supercedes '[PATCHv2] gcc-cross: remove --with-linker-hash-style'
>> v3 changes: per khem's advice, switched to use of LINKER_HASH_STYLE
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
>> index f479360..c0b8751 100644
>> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
>> @@ -13,6 +13,11 @@ PN = "gcc-cross-${TARGET_ARCH}"
>>
>>  require gcc-configure-common.inc
>>
>> +# While we want the 'gnu' hash style, we explicitly set it to sysv here to
>> +# ensure that any recipe which doesn't obey our LDFLAGS (which also set it to
>> +# gnu) will hit a QA failure.
>> +LINKER_HASH_STYLE ?= "sysv"
>
> Defining a new variable (LINKER_HASH_STYLE_INVERSE ?) and setting it
> to the opposite of whatever bitbake.conf ends up assigning to
> LINKER_HASH_STYLE might be clearer here.
>
> Otherwise MIPS toolchains will continue to default to the same hash
> style as MIPS LDFLAGS.

Dont understand what you mean here. However for mips sysv is the only option.

>
>> +
>>  EXTRA_OECONF += "--enable-poison-system-directories"
>>  EXTRA_OECONF_append_sh4 = " \
>>      --with-multilib-list= \
>> --
>> 2.8.0
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCHv3] gcc-cross: default linker hash style to sysv
  2016-07-08 14:11   ` Khem Raj
@ 2016-07-08 15:45     ` Andre McCurdy
  0 siblings, 0 replies; 4+ messages in thread
From: Andre McCurdy @ 2016-07-08 15:45 UTC (permalink / raw)
  To: Khem Raj; +Cc: Christopher Larson, OE Core mailing list

On Fri, Jul 8, 2016 at 7:11 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Jul 8, 2016 at 6:08 AM, Andre McCurdy <armccurdy@gmail.com> wrote:
>> On Thu, Jul 7, 2016 at 2:08 PM, Christopher Larson <kergoth@gmail.com> wrote:
>>> From: Christopher Larson <chris_larson@mentor.com>
>>>
>>> We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to
>>> this in the toolchain, while convenient, actually hides bugs, as a failure to
>>> obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how we
>>> poison the sysroot -- rather than relying on the default, notice right away if
>>> somoeone isn't obeying the needed flags.
>>>
>>> This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure,
>>> which is what's often seen with external toolchains. This brings us all on the
>>> same page, and makes sure a failure to obey LDFLAGS is seen early.
>>>
>>> This is limited to cross, to retain ease of use for SDKs.
>>>
>>> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
>>> ---
>>>
>>> Supercedes '[PATCHv2] gcc-cross: remove --with-linker-hash-style'
>>> v3 changes: per khem's advice, switched to use of LINKER_HASH_STYLE
>>>
>>> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
>>> index f479360..c0b8751 100644
>>> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
>>> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
>>> @@ -13,6 +13,11 @@ PN = "gcc-cross-${TARGET_ARCH}"
>>>
>>>  require gcc-configure-common.inc
>>>
>>> +# While we want the 'gnu' hash style, we explicitly set it to sysv here to
>>> +# ensure that any recipe which doesn't obey our LDFLAGS (which also set it to
>>> +# gnu) will hit a QA failure.
>>> +LINKER_HASH_STYLE ?= "sysv"
>>
>> Defining a new variable (LINKER_HASH_STYLE_INVERSE ?) and setting it
>> to the opposite of whatever bitbake.conf ends up assigning to
>> LINKER_HASH_STYLE might be clearer here.
>>
>> Otherwise MIPS toolchains will continue to default to the same hash
>> style as MIPS LDFLAGS.
>
> Dont understand what you mean here. However for mips sysv is the only option.

OK, I hadn't realised that you can't even configure gcc for gnu hashes
for MIPS. If that's the case then having the MIPS toolchain default to
the same hash style as the MIPS LDFLAGS is the only option.

>>
>>> +
>>>  EXTRA_OECONF += "--enable-poison-system-directories"
>>>  EXTRA_OECONF_append_sh4 = " \
>>>      --with-multilib-list= \
>>> --
>>> 2.8.0
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-08 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-07 21:08 [PATCHv3] gcc-cross: default linker hash style to sysv Christopher Larson
2016-07-08 13:08 ` Andre McCurdy
2016-07-08 14:11   ` Khem Raj
2016-07-08 15:45     ` Andre McCurdy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.