Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573872 - sys-libs/glibc: rework sparc target selection to leverage $ABI
Summary: sys-libs/glibc: rework sparc target selection to leverage $ABI
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-04 23:33 UTC by Alex McWhirter
Modified: 2020-04-01 21:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for /usr/portage/sys-libs/glibc/files/eblits/common.eblit (common.eblit.patch,2.99 KB, patch)
2016-02-04 23:33 UTC, Alex McWhirter
Details | Diff
Revised glibc patch (common.eblit.patch,2.97 KB, patch)
2016-02-05 22:09 UTC, Alex McWhirter
Details | Diff
Revision 2 (common.eblit.patch,2.99 KB, patch)
2016-02-11 01:02 UTC, Alex McWhirter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex McWhirter 2016-02-04 23:33:52 UTC
Created attachment 424628 [details, diff]
Patch for /usr/portage/sys-libs/glibc/files/eblits/common.eblit

See the attached patch...

We don't really care whether the chost is sparc or sparc64 since neither of those give glibc enough information anyways.

Multilib compilation is also broken with the existing logic as compiling 64 bit with a sparcv9 ctarget does not work.

This patch merges the sparc64 / sparc logic and cheks $ABI / mcpu to see whether we should be targeting sparcv9/, sparcv8, or sparc64.

If there's something better to use than $ABI let me know and ill fix it.

This is required to get a pure sparc64 port and mulitlib port working.
Comment 1 SpanKY gentoo-dev 2016-02-05 19:00:13 UTC
Comment on attachment 424628 [details, diff]
Patch for /usr/portage/sys-libs/glibc/files/eblits/common.eblit

>+					if [ $ABI == "sparc32" ]; then

Gentoo style is to use [[...]] and use braces for non-builtins.  so this would read:
  if [[ ${ABI} == "sparc32" ]] ; then

>+                                                cpu=sparc64v2

looks like you're mixing spaces & tabs here
Comment 2 Alex McWhirter 2016-02-05 22:09:32 UTC
Created attachment 424698 [details, diff]
Revised glibc patch

This patch should have those issues fixed.
Comment 3 Alex McWhirter 2016-02-11 01:02:16 UTC
Created attachment 425178 [details, diff]
Revision 2

So i noticed that my catalyst builds since this patch were missing glibc, turns out i forgot to add the "if" in front for the statements...

Not sure where my head was, so here's a corrected version.

Interestingly enough the ebuild for glibc will still complete successfully with this error. It just wont compile glibc. I would think it should fail if there are syntax errors in an eblit...
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2017-08-23 20:52:03 UTC
Some comment from sparc would be nice here. A sparc of life!
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-29 11:29:30 UTC
eblits gone away and will need to be forward-ported to glibc ebuilds directly. Also, IFONC support appeared in sparc around 2010 and precise CPU selection might not be as relevant.
Comment 6 Matt Turner gentoo-dev 2020-04-01 21:53:50 UTC
glibc dropped nearly all of these subconfigurations, since multiarch support made them unnecessary. See https://sourceware.org/git/?p=glibc.git;a=commit;h=5d9b7b9fa734c5381e0295c85c0e40520d9f6063

I've reworked the logic in the ebuilds in

commit 7daa03609079248a30f64366345bd728e65da38e
Author: Matt Turner <mattst88@gentoo.org>
Date:   Wed Mar 25 14:34:07 2020 -0700

    sys-libs/glibc: Drop SPARC CHOST mangling
    
    Before "multiarch" support in glibc, picking a different CHOST would
    select which optimized paths were built. Multiarch support was added in
    glibc commit 3afd5a3b5556 (sparc: Add multiarch support for
    memset/bzero/memcpy.) in 2010 before glibc-2.12.
    
    Before glibc-2.30 glibc dropped support for SPARC v7 in commit
    5d9b7b9fa734 (Remove 32 bit sparc v7 support) and in the process cleaned
    up some configuration logic that accepted a wide variety of (now unused
    CHOST values), thus causing the build to fail for us when we select a
    now unknown CHOST.
    
    Simply drop this logic, since it shouldn't be needed for any glibc since
    2.11.
    
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

so I think we're done here.