-
Notifications
You must be signed in to change notification settings - Fork 33
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
riscv-none-embed-gcc 10.2.0 on Apple Silicon? #51
Comments
hmm .. can you point me at the actual source used for the riscv toolchain ? disabling PCH with The startup code still calls the PCH memory allocator, to allow it to free any memory put aside for PCH (since we are obviously not going to use it) - it would seem that something is not honouring the aarch64 16384 pagesize (I'm guessing from the rough location given above). |
Sure, here is the fork: |
Ah, I forgot to mention, I also overwrite |
yeah... you are missing the base patch(es) that updated to be able to handle Darwin20 &c.
TBH, in the name of stability - you are probably introducing more unknowns than using the backports - the change to Darwin 20 was major, it needs to be catered for. |
Hmmm... then how can we approach this issue? First to make the build pass, and then to minimise the risk? |
start with the backports branch - that contains the code that has already been applied to master - ergo it has been quite well tested (not so good as using it in a distribution, but ... ). Then, if you are concerned - we might identify a sub-set of the patches as 'non-essential for a cross-compiler'. |
I'm trying to digest this, but I don't know which branch you are referring to. In this repo I identified Then I'm not sure in which order to apply the patches, to avoid damaging the RISC-V code. |
this: (at least, up to this week, hence the nov21) |
As graphical Git clients, I'm using Sourcetree, and Fork; after playing with filtering branches, I see the There are lots of commits on the Attempts to merge your branch into I'm either doing something terribly wrong, or there is a misunderstanding somewhere. :-( |
yeah, the misunderstanding is the base ... |
I meant 11.2 :-) |
ah, ok, that explains it. so, for now I see no other way out than to add to those 8 patches several more and try to fix the pch issue, otherwise I won't have a RISC-V toolchain on my new Mac M1. :-( |
did this happen between 10.2 and 10.3? is there a way to identify those commits? |
|
I thought to use it as a hint to delve into the see of commits, hoping to find something that fixed the pch issue.
I don't know. For the Arm toolchain, which was based on GCC 10.3, your patches worked beautifully. For the RISC-V toolchain, which includes references to 10.2, I don't know what would be a minimal set of patches to make it work on Apple Silicon.
Sure, when possible. I'll try to identify and cherry pick some previous commits mentioning pch, but, realistically, even if I make the build pass, I don't think it'll be a safe combination. Basing your branch on top of 10.2 would be ideal (for 10.3, the patches were minimal anyway), but perhaps for the large community it would be beneficial to have separate backport branches for 10.2 and 10.3. If you end up with such a solution, I can redo the Arm toolchain, to test your branch. Anyway, when ready, try to merge your new 10.x backport branch on top of 10.2 and see how many conflicts result. If there are not many, I can try to solve them myself. |
the PCH handling has been reworked - so that this should be moot for trunk. |
the current branch (on Apple Silicon) or upstream trunk (on x86_64) should build cross-compilers with no issues (at least, it does for me). can we close this issue now? |
Based on the comments in #49 (comment), I did a first run to build
riscv-none-embed-gcc
.For now I applied only the 8 patches I already used for
the arm-none-eabi-gcc
toolchain (https://github.com/xpack-dev-tools/riscv-gcc/commits/v2020.12.0-xpack).Building the first step (gcc) passed, but the second step (the libraries) failed with:
This is a bit weird, since it looks to be related to PCH, but I have
--disable-libstdcxx-pch
.Before trying to apply all the patches you mentioned in the other issue, do you have any specific advice?
The text was updated successfully, but these errors were encountered: