-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement support for Darwin ppc, fix Darwin ppc64 #7
base: master
Are you sure you want to change the base?
Conversation
P. S. For Rosetta, this part poses a problem and breaks the build:
I do not know how to fix it in a generally acceptable way at the moment. Locally I just did this:
This works, but obviously cannot be merged, since it gonna break all Intel builds. If anyone can suggest how to write a special case for Rosetta, it would be greatly appreciated. (On Rosetta the physical cpu is x86*, but the triple is |
@Araq When you have time, please take a look. I would like to bring Nim to MacOS PPC, and that should be feasible, provided (Rosetta issue I mention in the comment above may be safely ignored: I can add a patch for it in Macports when I update Nim port.) |
@@ -6968,7 +6991,279 @@ c_code/3_2/@mnim.nim.o $LINK_FLAGS | |||
;; | |||
powerpc) | |||
set -x | |||
$CC -o $binDir/nim $LINK_FLAGS | |||
$CC $COMP_FLAGS -Ic_code -c c_code/1_1/stdlib_assertions.nim.c -o c_code/1_1/stdlib_assertions.nim.o |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were all these added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Varriount Otherwise there is nothing to build: ppc32 was just not there for Darwin.
Sorry for this rather late reply, but how was this done? I need to replicate your steps. |
@Araq Thanks for replying, and I will greatly appreciate your involvement here. To the question: I started from assumption that existing code base is coherent and tested (
Of these, (Apparently organization of files into folders was changed between older Then, Clang should not be used for any PPC on Mac, at least until someone has time and motivation to fix it eventually. So Clang, if hardcoded for w/e reason, should not be used for PPC. GCC works. At this point, bootstrapping from |
@Araq There are few other changes needed to replicate the process on 10.6.8 Rosetta and use a newer GCC which are installed in Macports prefix. That we can handle locally in Macports, since I do not know how to fix it in a generally correct way. This should only be used on Rosetta (it is a hack, since build system [mis]detects host arch as x86):
And this must be patched to avoid invoking
In all patches from both PRs
|
Uh, but you're supposed to use the "niminst" tool and adapt the configuration in compiler/installer.ini :-) |
@Araq Is that documented anywhere? And if it isn't, @barracuda156, could you add documentation (wherever is sensible) to modify niminst instead? |
@Araq Thank you, I will check that. (Please allow me a few days, I am in a mid of a travel until the end of month – and I also get back to my PPC machines by then.) |
@Araq Do I get it right that to use I do not have it yet, I need to build it first (and there is an assert error on PPC after csources are built and |
You only need a working Nim on some machine, it doesn't have to be the PPC thing. |
@Araq Ok, I will try it. |
This has been forgotten forever. I will return to this soonish. |
@Araq @Varriount I have compiled
Then if I try to generate something, a) it forces Windows and x86 and b) cannot find
What should I do from here? |
Correct and it's always been installer.ini, no file is missing. |
This PR implements initial support for Darwin PPC: adds
ppc32
and fixes minor issues withppc64
(clang
should not be used for PPC on MacOS at all).Feedback welcomed.
Some fixes to the master branch will also be needed, as it seems. I got up to here:
But then the main code again invokes Clang, which fails, of course. I will fix that in another PR to Nim master branch.