|Summary:||sys-devel/binutils-2.20.1 patches for Loongson|
|Product:||Gentoo Linux||Reporter:||Stuart Longland (RETIRED) <redhatter>|
|Component:||[OLD] Core system||Assignee:||MIPS Porters <mips>|
|Package list:||Runtime testing required:||---|
|Bug Depends on:|
Loongson 2F Fixups Patch for binutils-2.20
MIPS TLS patch for binutils-2.20
Description Stuart Longland (RETIRED) 2010-09-23 03:43:36 UTC
Hi all, The older Loongson 2F, and also it appears, the Loongson 2E suffer an issue regarding execution of NOP instructions which can lead to a hard lock on these systems. I've experienced it a few times trying to compile software on the Loongson 2E systems I have here. The bug is documented at the URL attached to this bug. The patches attached here are from the Loongson overlay, and when combined with -Wa,-mfix-loongson2f-nop in CFLAGS, enables at the very least... stage 1 to be compiled without lockups. The next set of O32 little endian MIPS-I and MIPS-III stages I produce will make use of this flag so that they work successfully on Loongson systems. On MIPS-IV and big-endian systems, they will likely have the same patch for binutils, but I won't be including the extra flag to GCC... so should have no effect.
Comment 1 Stuart Longland (RETIRED) 2010-09-23 03:46:41 UTC
Created attachment 248415 [details, diff] Loongson 2F Fixups Patch for binutils-2.20 This is the main patch that fixes a couple of errata issues with the Loongson 2F, and is helpful on Loongson 2E.
Comment 2 Stuart Longland (RETIRED) 2010-09-23 03:48:36 UTC
Created attachment 248417 [details, diff] MIPS TLS patch for binutils-2.20 Also from loongson-overlay, this appears to fix a TLS issue. Not much is known about the origins of this patch or what it fixes. It'd be worth tracking down some more information on this particular patch before it gets rolled in.
Comment 3 Stuart Longland (RETIRED) 2010-10-25 00:06:02 UTC
A heads up... I've successfully built O32 stages for little-endian MIPS-I/III/IV, as well as big-endian MIPS-I/III (MIPS-IV is coming... just battling some sysvinit and -lcrypt grief). I believe Zhang Le has been using these on N32 little-endian MIPS-III for some time as they were taken from the Loongson overlay. Given they don't seem to have broken anything, I believe they should be safe enough to merge into the tree. Zhang Le: Do you happen to know anything about attachment 248417 [details, diff] (10_all_binutils-2.20-mips-tls.patch)? From the content, it seems to be "TLS" related (hence my calling it "mips-tls") but that is a guess. toolchain: How do we proceed from here? Do I reassign the bug to you to get the patches added, or do I do that myself? Are there any steps needed to be done before I do this?
Comment 4 Zhang Le (RETIRED) 2010-10-25 03:50:31 UTC
(In reply to comment #3) > I believe Zhang Le has been using these on N32 little-endian MIPS-III for some > time as they were taken from the Loongson overlay. Yes. > > Given they don't seem to have broken anything, I believe they should be safe > enough to merge into the tree. Yes, please. Actually the patch is already in upstream. > > Zhang Le: Do you happen to know anything about attachment 248417 [details, diff] > (10_all_binutils-2.20-mips-tls.patch)? From the content, it seems to be "TLS" > related (hence my calling it "mips-tls") but that is a guess. This is an unverified patch. I need to have it reviewed by upstream before we can incorporate it.
Comment 5 SpanKY 2010-10-26 14:59:01 UTC
if the patches are in upstream cvs, please post links to their commits there is a git mirror too: http://sourceware.org/git/?p=binutils.git;a=summary
Comment 6 Stuart Longland (RETIRED) 2010-10-27 02:55:04 UTC
This looks an awful lot like the first one. http://sourceware.org/ml/binutils-cvs/2010-02/msg00178.html http://sourceware.org/git/?p=binutils.git;a=commit;h=43ec71bb4c761538a3c8813856654de756661cce Even if we only get that one in, that would suffice for most of the users who may wish to run Gentoo on Lemote hardware. The other patch can join in after it has been verified.
Comment 7 Stuart Longland (RETIRED) 2010-11-08 12:20:56 UTC
A heads up... binutils-2.21 will probably be released soon, which should include this, and many other MIPS-related fixes. I'm downloading today's CVS snapshot to see what goodies they've got in store. Hopefully one will fix this little gem: https://bugs.webkit.org/show_bug.cgi?id=48222
Comment 8 SpanKY 2010-12-09 11:22:11 UTC
2.21 is in the tree now and should contain the fixes