[llvm-commits] [PATCH][GNU Build] Add LLVM_IS_TARGET_BIG_ENDIAN to config.h
atrick at apple.com
Fri Oct 22 14:57:10 CDT 2010
I don't have access to freebsd either. And I don't know how your configure.ac, config.h.in patch will fix freebsd or if it's the right fix. What I can tell you is that I applied the patch to my gnu build and it does what is intended on a little endian host--NOTHING. At any rate, if you believe it fixes the freebsd build, please check it in so we can find out. If you don't have a fix, please revert the changes that broke the build.
If you haven't done it, I strongly suggest installing the gnu toolchain or getting access to linux/darwin so you can verify the gnu builds yourself before you checkin.
On Oct 22, 2010, at 1:14 AM, Michael Spencer wrote:
> On Fri, Oct 22, 2010 at 2:13 AM, Chris Lattner <clattner at apple.com> wrote:
>> On Oct 21, 2010, at 6:59 PM, Michael Spencer wrote:
>>> On Thu, Oct 21, 2010 at 7:01 PM, Dale Johannesen <dalej at apple.com> wrote:
>>>> I may have missed earlier discussion, but why do you want this at compile time? Normally llvm is built to support multiple targets (not necessarily all of the same endianness) and endianness is checked at runtime; see TargetData.
>>> This is for the host target. It is used when working with endian
>>> dependent data such as object files.
>> I still don't get it. If you want the endianness of the host, you can use llvm/System/Host.h.
> I want it at compile time.
>> Nothing about the target should be hard coded in at compile time. You should be able to make elf .o files for both powerpc and x86 etc.
> This isn't about the target. This is about the host, which I now
> realize is not what that macro is... I really don't know how I missed
> The macro should be LLVM_IS_HOST_BIG_ENDIAN. But everything else is
> still the same. I'll fix the CMake version, but I still need someone
> to help with autoconf.
> The point is so that you can memory map a file, and directly say "read
> an unsigned 32 bit integer from this address encoded as littlendian."
> On X86 this would just end up as a movl (%addr), %dest. While on PPC
> this would expand to a read and a byteswap.
> - Michael Spencer
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
More information about the llvm-commits