[LLVMdev] Problems building llvm-gcc-4.2 on ppc32, OS X 10.4.10

Anton Korobeynikov asl at math.spbu.ru
Tue Aug 21 23:40:34 PDT 2007


Hello, Michael

> Hi, I'm guessing that no one has tried this exact combination yet.
Some quick notes, which can be not connected to your problem.

1. You might need the following patch for FP constants to work properly:
diff --git a/gcc/llvm-convert.cpp b/gcc/llvm-convert.cpp
index 4c9c8d0..db8c6ba 100644
--- a/gcc/llvm-convert.cpp
+++ b/gcc/llvm-convert.cpp
@@ -5157,11 +5157,6 @@ Constant
*TreeConstantToLLVM::ConvertREAL_CST(tree exp) {
   UArr[0] = RealArr[0];   // Long -> int convert
   UArr[1] = RealArr[1];
 
-  // FIXME: verify on big-endian targets and cross from big- to little-
endian
-  // targets
-  if (FLOAT_WORDS_BIG_ENDIAN)
-    std::swap(UArr[0], UArr[1]);
-
   return ConstantFP::get(Ty, V);
 }

This is known problem. Cross-compilation on targets with different
endianness is broken.
2. for gfortran you'll need patch from
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33097 (note, there are two
parts - one attached and another one in the text).

> make[3]: *** [libgcc_s.10.5.dylib] Error 1
> So I think, why am I building for 10.5? No wonder that doesn't link.
This can be apple local changes. Better to wait for answer from apple
folks. What if you supply --disable-shared?

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.





More information about the llvm-dev mailing list