[1/4] conf, recipes: Add new variable LINKER_HASH_STYLE

Submitted by Khem Raj on Sept. 16, 2011, 1:59 a.m.

Details

Message ID 34fc595e22f0b359e6ae5ead10c1ecee30a447f6.1316138063.git.raj.khem@gmail.com
State New, archived
Headers show

Commit Message

Khem Raj Sept. 16, 2011, 1:59 a.m.
LINKER_HASH_STYLE in OE is set to either 'sysv' or 'gnu'
depending upon processor architecture e.g. mips does not support
gnu hash style so is uses sysv

besides 'sysv' and 'gnu' third option is to set it to 'both' we do
not do that by default but user can still set it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/conf/bitbake.conf                      |    3 ++-
 meta/conf/distro/include/tcmode-default.inc |    6 +++++-
 meta/recipes-core/uclibc/uclibc.inc         |    2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index b7bcc23..60ab000 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -476,7 +476,8 @@  BUILDSDK_LDFLAGS = "-L${STAGING_LIBDIR} \
                     -Wl,-rpath-link,${STAGING_DIR_HOST}${base_libdir} \
                     -Wl,-rpath,${base_libdir} -Wl,-O1"
 
-TARGET_LINK_HASH_STYLE ??= ""
+LINKER_HASH_STYLE ??= "gnu"
+TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('LINKER_HASH_STYLE', d, True) == 'gnu']}"
 export LDFLAGS = "${TARGET_LDFLAGS}"
 export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
 #export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 2857215..1ddfbce 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -63,5 +63,9 @@  PREFERRED_VERSION_gzip-native ?= "1.4"
 
 # Setup suitable toolchain flags
 require conf/distro/include/as-needed.inc
-TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH', d, True) in ['mips', 'mipsel', 'mips64', 'mips64el']]}"
 
+# mips does not support GNU hash style therefore we hard assign them
+LINKER_HASH_STYLE_mips = "sysv"
+LINKER_HASH_STYLE_mipsel = "sysv"
+LINKER_HASH_STYLE_mips64 = "sysv"
+LINKER_HASH_STYLE_mips64el = "sysv"
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index 222c34f..f104114 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -201,5 +201,5 @@  do_configure() {
 
 do_install() {
         oe_runmake PREFIX=${D} install
-        oe_runmake PREFIX=${D} "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" install_utils
+	oe_runmake PREFIX=${D} "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" install_utils
 }

Comments

Richard Purdie Sept. 28, 2011, 7:44 p.m.
On Thu, 2011-09-15 at 18:59 -0700, Khem Raj wrote:
> LINKER_HASH_STYLE in OE is set to either 'sysv' or 'gnu'
> depending upon processor architecture e.g. mips does not support
> gnu hash style so is uses sysv
> 
> besides 'sysv' and 'gnu' third option is to set it to 'both' we do
> not do that by default but user can still set it
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/conf/bitbake.conf                      |    3 ++-
>  meta/conf/distro/include/tcmode-default.inc |    6 +++++-
>  meta/recipes-core/uclibc/uclibc.inc         |    2 +-
>  3 files changed, 8 insertions(+), 3 deletions(-)

The build failure we're seeing on mips is related to this change. I'm
seeing this from "MACHINE=qemumips bitbake -e":

# LINKER_HASH_STYLE_mips64el=sysv
LINKER_HASH_STYLE_mips64el="sysv"
# LINKER_HASH_STYLE=sysv
LINKER_HASH_STYLE="sysv"
# LINKER_HASH_STYLE_mips64=sysv
LINKER_HASH_STYLE_mips64="sysv"
# TARGET_LINK_HASH_STYLE=${@['-Wl,--hash-style=gnu',''][bb.data.getVar('LINKER_HASH_STYLE', d, True) == 'gnu']}
TARGET_LINK_HASH_STYLE="-Wl,--hash-style=gnu"
# TARGET_LDFLAGS=-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}
export TARGET_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"

Obviously the problem is TARGET_LINK_HASH_STYLE is that value when
LINKER_HASH_STYLE="sysv" :/

We need to fix this...

Cheers,

Richard
Khem Raj Sept. 28, 2011, 9:24 p.m.
On Wed, Sep 28, 2011 at 12:44 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2011-09-15 at 18:59 -0700, Khem Raj wrote:
>> LINKER_HASH_STYLE in OE is set to either 'sysv' or 'gnu'
>> depending upon processor architecture e.g. mips does not support
>> gnu hash style so is uses sysv
>>
>> besides 'sysv' and 'gnu' third option is to set it to 'both' we do
>> not do that by default but user can still set it
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  meta/conf/bitbake.conf                      |    3 ++-
>>  meta/conf/distro/include/tcmode-default.inc |    6 +++++-
>>  meta/recipes-core/uclibc/uclibc.inc         |    2 +-
>>  3 files changed, 8 insertions(+), 3 deletions(-)
>
> The build failure we're seeing on mips is related to this change. I'm
> seeing this from "MACHINE=qemumips bitbake -e":
>
> # LINKER_HASH_STYLE_mips64el=sysv
> LINKER_HASH_STYLE_mips64el="sysv"
> # LINKER_HASH_STYLE=sysv
> LINKER_HASH_STYLE="sysv"
> # LINKER_HASH_STYLE_mips64=sysv
> LINKER_HASH_STYLE_mips64="sysv"
> # TARGET_LINK_HASH_STYLE=${@['-Wl,--hash-style=gnu',''][bb.data.getVar('LINKER_HASH_STYLE', d, True) == 'gnu']}
> TARGET_LINK_HASH_STYLE="-Wl,--hash-style=gnu"
> # TARGET_LDFLAGS=-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}
> export TARGET_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
>
> Obviously the problem is TARGET_LINK_HASH_STYLE is that value when
> LINKER_HASH_STYLE="sysv" :/
>
> We need to fix this...
>

here is my MACHINE=qemumips bitbake -e run on latest oe-core/master
http://paste.ubuntu.com/698725/


> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Richard Purdie Sept. 28, 2011, 10:41 p.m.
On Wed, 2011-09-28 at 14:24 -0700, Khem Raj wrote:
> On Wed, Sep 28, 2011 at 12:44 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Thu, 2011-09-15 at 18:59 -0700, Khem Raj wrote:
> >> LINKER_HASH_STYLE in OE is set to either 'sysv' or 'gnu'
> >> depending upon processor architecture e.g. mips does not support
> >> gnu hash style so is uses sysv
> >>
> >> besides 'sysv' and 'gnu' third option is to set it to 'both' we do
> >> not do that by default but user can still set it
> >>
> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> ---
> >>  meta/conf/bitbake.conf                      |    3 ++-
> >>  meta/conf/distro/include/tcmode-default.inc |    6 +++++-
> >>  meta/recipes-core/uclibc/uclibc.inc         |    2 +-
> >>  3 files changed, 8 insertions(+), 3 deletions(-)
> >
> > The build failure we're seeing on mips is related to this change. I'm
> > seeing this from "MACHINE=qemumips bitbake -e":
> >
> > # LINKER_HASH_STYLE_mips64el=sysv
> > LINKER_HASH_STYLE_mips64el="sysv"
> > # LINKER_HASH_STYLE=sysv
> > LINKER_HASH_STYLE="sysv"
> > # LINKER_HASH_STYLE_mips64=sysv
> > LINKER_HASH_STYLE_mips64="sysv"
> > # TARGET_LINK_HASH_STYLE=${@['-Wl,--hash-style=gnu',''][bb.data.getVar('LINKER_HASH_STYLE', d, True) == 'gnu']}
> > TARGET_LINK_HASH_STYLE="-Wl,--hash-style=gnu"
> > # TARGET_LDFLAGS=-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}
> > export TARGET_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
> >
> > Obviously the problem is TARGET_LINK_HASH_STYLE is that value when
> > LINKER_HASH_STYLE="sysv" :/
> >
> > We need to fix this...
> >
> 
> here is my MACHINE=qemumips bitbake -e run on latest oe-core/master
> http://paste.ubuntu.com/698725/

Right, I found the problem, posted the patch and then decided I'd merge
it rather than have anyone suffer any more broken builds:

http://git.openembedded.org/cgit.cgi/openembedded-core/commit/?id=5839702da70cec32f01e58280629f6bcf74d0034

So I think this should be resolved now.

Cheers,

Richard
Khem Raj Sept. 28, 2011, 11:25 p.m.
On Wed, Sep 28, 2011 at 3:41 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2011-09-28 at 14:24 -0700, Khem Raj wrote:
>> On Wed, Sep 28, 2011 at 12:44 PM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Thu, 2011-09-15 at 18:59 -0700, Khem Raj wrote:
>> >> LINKER_HASH_STYLE in OE is set to either 'sysv' or 'gnu'
>> >> depending upon processor architecture e.g. mips does not support
>> >> gnu hash style so is uses sysv
>> >>
>> >> besides 'sysv' and 'gnu' third option is to set it to 'both' we do
>> >> not do that by default but user can still set it
>> >>
>> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >> ---
>> >>  meta/conf/bitbake.conf                      |    3 ++-
>> >>  meta/conf/distro/include/tcmode-default.inc |    6 +++++-
>> >>  meta/recipes-core/uclibc/uclibc.inc         |    2 +-
>> >>  3 files changed, 8 insertions(+), 3 deletions(-)
>> >
>> > The build failure we're seeing on mips is related to this change. I'm
>> > seeing this from "MACHINE=qemumips bitbake -e":
>> >
>> > # LINKER_HASH_STYLE_mips64el=sysv
>> > LINKER_HASH_STYLE_mips64el="sysv"
>> > # LINKER_HASH_STYLE=sysv
>> > LINKER_HASH_STYLE="sysv"
>> > # LINKER_HASH_STYLE_mips64=sysv
>> > LINKER_HASH_STYLE_mips64="sysv"
>> > # TARGET_LINK_HASH_STYLE=${@['-Wl,--hash-style=gnu',''][bb.data.getVar('LINKER_HASH_STYLE', d, True) == 'gnu']}
>> > TARGET_LINK_HASH_STYLE="-Wl,--hash-style=gnu"
>> > # TARGET_LDFLAGS=-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}
>> > export TARGET_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
>> >
>> > Obviously the problem is TARGET_LINK_HASH_STYLE is that value when
>> > LINKER_HASH_STYLE="sysv" :/
>> >
>> > We need to fix this...
>> >
>>
>> here is my MACHINE=qemumips bitbake -e run on latest oe-core/master
>> http://paste.ubuntu.com/698725/
>
> Right, I found the problem, posted the patch and then decided I'd merge
> it rather than have anyone suffer any more broken builds:
>
> http://git.openembedded.org/cgit.cgi/openembedded-core/commit/?id=5839702da70cec32f01e58280629f6bcf74d0034
>

ah ok.

> So I think this should be resolved now.
>
> Cheers,
>
> Richard
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>