Hi Iain, Mike and Andrew,
I have been having issues compiling WebKit with mcpu=970 (or mcpu=G5)
without afterwards passing mno-powerpc64 or m32 in to explicitly turn
64 bit instructions off.
That was using Apple gcc 5666.3, which is Apples last published
version and based on 4.2.1 .
I also had another issue with ftree-vrp and found that in some later
4.2.x release a bug related to that was fixed, so I went ahead and
merged 4.2.2 - 4.2.4 into Apple's gcc 4.2.1 sources.
After that both issues are now gone!
So, in gcc 4.2.4 I don't have anymore issues with usage of 64 bit
instructions, hence this wasn't broken at that point point in time.
Related bug report following:
However I also tried to build the mozilla JavaScript library using gcc
4.7.2 as shared library optimized for the G5 explicitly. That works
well and neither linker (ld64 97.17), nor mach-o binary tools nor
compiler complain about anything.
But OS X dyld throws an error complaining about unknown local
relocation type when trying to load that library using dlopen().
Examining the library using otool does not show any incorrect local
relocation, so I don't know what's going wrong.
Might be a dyld bug but when I build with optimization turned off (-
O0) the library loads and works fine. I tried to switch off as much
optimizations turned on by -O1 as possible (building with -O1 does
also cause the problem) but I can't get it working. I even explicitely
disabled as much optimization passes as possible (using -fdisable-*)
but to no avail.
I could try debugging using gdb in order to find out the code that
causes the problem.
Or do you have any other ideas?
Tobias