Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519178 - flag-o-matic.eclass: add -mno-fix-r10000 to setup-allowed-flags
Summary: flag-o-matic.eclass: add -mno-fix-r10000 to setup-allowed-flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: MIPS Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-06 06:27 UTC by Joshua Kinard
Modified: 2014-08-11 10:08 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2014-08-06 06:27:43 UTC
so on any MIPS R10000 system, -march=r10000 automatically implies -mfix-r10000, which causes branch-likely instructions to be emitted to deal with a known silicon erratum in early R10000 processors.  It's been this way ever since I sent the patch in to add the feature to gcc in 2008.

However, newer R10000's and the R12000+ CPUs shouldn't be affected by this bug anymore, so I am experimenting by disabling the fix in both the kernel and in the userland by passing -mno-fix-r10000 in CFLAGS.  Problem is, both gcc and glibc strip this flag out, and I need it to stay.

Longterm fix is to send a patch in to gcc to make -march=r12000 and up not enable the flag by default, but still turn it on for -march=r10000.  That is on my long TODO list for MIPS.
Comment 1 Joshua Kinard gentoo-dev 2014-08-06 06:34:14 UTC
Better to borrow from the title of #519120, as the problem is toolchain.eclass (for gcc) and glibc is likely affected by an eblit.
Comment 2 SpanKY gentoo-dev 2014-08-06 07:33:19 UTC
pretty sure neither is doing this.  you most likely want to update flag-o-matic.eclass to list these random flags.
Comment 3 Joshua Kinard gentoo-dev 2014-08-06 08:32:38 UTC
(In reply to SpanKY from comment #2)
> pretty sure neither is doing this.  you most likely want to update
> flag-o-matic.eclass to list these random flags.

That's right!  I forgot we had that eclass.  I was looking at gcc_do_filter_flags() in toolchain.eclass as being responsible for the flag-stripping.
Comment 4 Joshua Kinard gentoo-dev 2014-08-11 10:08:22 UTC
Fixed in CVS.