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
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2016-02-04 23:33 UTC by Alex McWhirter
Modified: 2017-08-23 20:52 UTC (History)
1 user (show)

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

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 gentoo-dev 2017-08-23 20:52:03 UTC
Some comment from sparc would be nice here. A sparc of life!