Dear Waldek,
Thanks for your letter. Somehow I did not get it directly, but found it on-line after Paul mentioned it to me.
MY FAILURE ON MACOS: The current GPC is compatible with the back-end of GCC 3.4.6 only.
No. While little used GCC 4.1.2 port is finished and should work well.
That must have been a fair amount of work, moving from 3.4.6 to 4.1.2. I understand the GCC middle end changed dramatically between 3 and 4.
First step would be to find out earliest GCC which supports 64-bit Mac OS as target.
How can I tell that it supports MacOS 64-bit?
It is possible that GCC-4.3.5 will do, attempting to build gets beyond "Configuration x86_64-apple-darwin16.7.0 not supported"
Ah, so that's the way you tell. You try it and see.
(full build requires Apple tools so I can not check if it works).
I have the Command Line Tools (CLT).
ASIDE ON CLT (NOT PARTICULARLY IMPORTANT): Building on MacOS, the clang assembler will perform the first build, which produces the xgcc and xgpc compilers. After that, the clang assembler fails because it does not recognise the ".stabs" debug directives produced by xgcc, which is GCC 3.4.6. All the xgcc compilation is done with the debug "-g" flag. The "-g" option is so deeply embedded into the GPC build that I could not get rid of it, even after removing the string "-g" from every file I could find it in. I must have missed the one critical, originating occurance. If I instead use the CTools version of the GNU Assmbler that is provided with CLT, that assembler fails to compile xgcc in the first place, because it cannot compile 64-bit instructions like "movq %xmm0,%rax", where a 128-bit register is moved into a 64-bit register (it complains when it should take the top or bottom 64 bits). So we need one assembler for the host and one for the target. I tried all manner of messing about with environment variables, but could not persuade the build to use two different assemblers for the xgcp and gpc builds. In the end, I let the build fail, edited the gcc makefile, re-configured the gcc makefile, and re-started. But the code produced by the second stage was 32-bit and could not be linked to the 64-bit libraries. If we build on GCC-4, I will be able to use the same assembler, the CLANG assembler, for the entire build.
Anyway, I would suggenst trying
with GCC-4.3.5. Look at README, for 4.3.5 you need to use '--disable-mapped-location'.
Thank you. I have the zip archive. Will start on it soon.
Best, Kevan