-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move binutils, GDB, and GCC to the upstream repos #1074
Conversation
We don't have any out of tree patches any more, so let's just jump upstream. Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This comes along with a bunch of new test failures, many of which have been triaged. Those all have at least an upstream discussion started, and while some appear to need work they all appear to be test suite issues rather than GCC bugs. I'm still getting a handful of failures that I've yet to triage, though. I'll keep looking, but figured I'd send this up now as it's way less then I get before the bump. Here's what I'm seeing on a multilib/linux build, I haven't tried anything else: === gcc: Unexpected fails for rv64imafdc lp64d medlow === FAIL: gcc.dg/Warray-bounds-48.c pr102706 (test for warnings, line 133) FAIL: gcc.dg/Warray-bounds-48.c pr102706 (test for warnings, line 33) FAIL: gcc.dg/Wzero-length-array-bounds-2.c (test for excess errors) XPASS: gcc.dg/uninit-pred-7_a.c bogus warning (test for bogus messages, line 26) FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20) FAIL: gcc.dg/tree-ssa/ssa-sink-18.c scan-tree-dump-times sink2 "Sunk statements: 4" 1 === gcc: Unexpected fails for rv32imac ilp32 medlow === XPASS: gcc.dg/uninit-pred-7_a.c bogus warning (test for bogus messages, line 26) FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20) === gcc: Unexpected fails for rv32imafdc ilp32d medlow === XPASS: gcc.dg/uninit-pred-7_a.c bogus warning (test for bogus messages, line 26) FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20) === gcc: Unexpected fails for rv64imac lp64 medlow === FAIL: gcc.dg/Warray-bounds-48.c pr102706 (test for warnings, line 133) FAIL: gcc.dg/Warray-bounds-48.c pr102706 (test for warnings, line 33) FAIL: gcc.dg/Wzero-length-array-bounds-2.c (test for excess errors) XPASS: gcc.dg/uninit-pred-7_a.c bogus warning (test for bogus messages, line 26) FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20) FAIL: gcc.dg/tree-ssa/ssa-sink-18.c scan-tree-dump-times sink2 "Sunk statements: 4" 1 ========= Summary of gcc testsuite ========= | # of unexpected case / # of unique unexpected case | gcc | g++ | gfortran | rv64imafdc/ lp64d/ medlow | 6 / 5 | 0 / 0 | 0 / 0 | rv32imafdc/ ilp32d/ medlow | 2 / 2 | 0 / 0 | 0 / 0 | rv32imac/ ilp32/ medlow | 2 / 2 | 0 / 0 | 0 / 0 | rv64imac/ lp64/ medlow | 6 / 5 | 0 / 0 | 0 / 0 | Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Was the switch from In general, I think moving to upstream/master is a great improvement. |
hmmm, it's hard decision to me, that's double edged sword, I know it's helper to improve the stability of trunk since there would be more user to use/testing that, and we don't need to spend time to backport patches. However using trunk means that might unstable, and not everyone is experienced can identify that's toolchain's bug or their own bug, and the target user of this repo (in my mind) is RISC-V newbies, so I am little hesitate here. But I must say I didn't have too much bandwidth to maintain both upstream and here for a while...so maybe that's best way to go. |
There is still a pinning to a defined upstream commit in place. |
Some people use riscv-gnu-toolchain to make toolchain releases. Using upstream trunk for a release will get you a lot of hate mail from FSF developers. This will be a serious problem if it happens, and could damage the reputation of all RISC-V toolchain developers. This is why we specifically use release branches instead of trunk. If we are going to switch, we need to make it absolutely clear that riscv-gnu-toolchain can no longer be used to make toolchain releases. And we will need to enforce this somehow or we will be screwed. A lot of newbies use riscv-gnu-toolchain. A newbie should not be forced to use trunk which will be much less stable than a release branch. We have gdb patches for the simulator which are not upstream yet. I tried last year, ended up with a ~20 part series of patches, and got so many review requests to modify the patches that I had to defer it to later, and haven't gotten back to it yet. Anyways, if we switch from our local gdb to upstream gdb we lose our gdb sim support. The upstream one is badly broken, and missing even some basic extensions. I should probably fix that, but I haven't gotten bored enough to return to RISC-V toolchain work yet. I will miss the gdb sim support, and I think that Kito will miss it, but I don't know if anyone else will miss it. Anyways, not a fatal problem. If you really want to switch to trunk, then we probably need to provide two versions, one based on branches for releases and newbies which is the one people get by default, and one based on trunk for developers that has to be specially requested e.g. by checking out a branch. That will affect the maintenance workload, but should be manageable if I return to doing RISC-V toolchain work. I use upstream trunk with riscv-gnu-toolchain, but I do it by hand. I use git remote to add the FSF repo, git fetch it, and then switch to an FSF branch. I do that in binutils and gcc which are the ones I care most about. Then I leave it on my disk and use it for years with the occasional update to get new versions of riscv-gnu-toolchain, binutils, and gcc. If you are building natively, you don't need riscv-gnu-toolchain at all. I just build and install binutils and gdb, then build and install gcc, then build but not install glibc. I can test all 4 natively pretty easily. It is slower than cross testing, but more useful than cross testing for linux support. |
Makes sense, though I'm not really sure how it's possible to do that. If it's that big of a deal I can just stick to trunk locally, that's what I do already (and from below sounds like what you do too).
I'd argue newbies shouldn't be building toolchains at all, but I guess that's a different problem.
Still a headache, though, and I think there's some sim users around. I can try and find someone else to pick up the sim stuff if you want, we've got a lot of new folks around who are learning RISC-V and this sort of this is a good way to get someone started.
I've already got a fork that points to trunk, so no big deal on my end (it's actually easier if I don't have to send PRs here). My plan was to get all the allowlist stuff upstream anyway, but I figured adding them here was sanest so everyone could see what's up.
|
Actually there is many post around the web are using riscv-gnu-toolchain as part of tutorial, especially on the Chinese community, so no matter it's make sense or not...it's fact :( An alternative is maintain two branches on master branch of riscv-gnu-toolchain and using some configuration option to switch that, e.g. |
Yep, sounds like there's nothing we can do about it.
That seems way more complicated than it's worth, it's not like there's any meaningful tracking of submodule merges anyway so I don't mind just maintaining the fork. We should really get all those test failures fixed upstream either way, so at that point it'll just be submodule juggling and that's pretty trivial. |
I'd like us all to reconsider this PR (i.e. going to upstream sources). I fully understand that people depend on this repo for building their toolchains, So the choice is not stable releases or upstream, but outdated releases or upstream |
Maybe we can monthly or quarterly to update this repo's main branch, it will reduce the difference from upstream, Still keep some stable release version branch(yearly update follows gcc10, 11, 12 ...) |
This PR is the only one that really works for me with shallow submodules. For some reason master branch is just not checking out binutils submodule properly. |
I'm going to close this issue unmerged, as the spirit of this PR has been merged in other recent PRs:
Additionally, the following riscv repos have been archived:
riscv-gcc remains active as it is used for GCC RVV-enablement development. Thanks for triggering these changes! |
I bumped these pointers to the same master/trunk-based commits that I'd tested last time, but haven't re-run the tests after the GCC bump. I'll do that, and I was seeing a bunch of failures with only the binutils bump so I was a bit worried.