http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60556
--- Comment #14 from reed kotler <reed.kotler at imgtec dot com> --- (In reply to Andrew Pinski from comment #13) > (In reply to reed kotler from comment #12) > > > > Do you know where the original line was that made it fail in the .ii? > > Yes: > # 227 "/home/rkotler/llvm_trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp" > if (Name == "stat") return (uint64_t)&stat; > if (Name == "fstat") return (uint64_t)&fstat; > if (Name == "lstat") return (uint64_t)&lstat; > if (Name == "stat64") return (uint64_t)&stat64; > if (Name == "fstat64") return (uint64_t)&fstat64; > if (Name == "lstat64") return (uint64_t)&lstat64; > if (Name == "atexit") return (uint64_t)&atexit; > if (Name == "mknod") return (uint64_t)&mknod; > # 254 "/home/rkotler/llvm_trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp" > if (Name == "__main") return (uint64_t)&jit_noop; > > > You can just cast them to unsigned long before casting them to uint64_t for > the work around. Great! This code is from LLVM. By making this change I can build a working llvm using gcc cross and native. Do we have any idea when the gcc will be fixed so I don't need to this workaround?