[llvm-commits] [llvm-gcc] Cumulative Patch 2007-01-07 (Take 2)

Reid Spencer rspencer at reidspencer.com
Sun Jan 7 18:24:51 PST 2007


I wish I could retract email.

The patch I just sent didn't have differences for sub-directories in it.
Please don't apply it. Instead use this one which should bring you up to
date with Apple's changes. Again, this applies to r240 of the llvm-gcc
SVN mirror.

Some things to note. If your target is not x86, x86-64, or ppc and your
operating system is not darwin or linux, this probably won't work.
You'll get a link error like this:

../../src-1/gcc/llvm-convert.cpp:3118: undefined reference to `TreeToLLVM::TargetIntrinsicLower(unsigned int, llvm::Value*, llvm::Value*&, llvm::Type const*, std::vector<llvm::Value*, std::allocator<llvm::Value*> >&, llvm::SmallVector<tree_node*, 8u>&, llvm::BasicBlock*, bool, bool)'

That's because the makefiles aren't quite ready to compile a target
specific C++ file yet. Fortunately there is a work around:

1. Edit gcc/config.gcc
2. Find the case statement at line 558
3. Find the pattern that matches your target in the cases that follow. 
4. Add the following right after the "tmake_file" line for your target.
# APPLE LOCAL begin LLVM
        out_cxx_file=i386/llvm-i386.cpp
# APPLE LOCAL end LLVM

For example, find the line that matches this pattern: ^i.*linux
around line 964. That has an example of the correct patch. It looks like
this:

i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
                        # Intel 80386's running GNU/*
                        # with ELF format using glibc 2
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
# APPLE LOCAL begin LLVM
        out_cxx_file=i386/llvm-i386.cpp
# APPLE LOCAL end LLVM
        case ${target} in

The APPLE section is what you add.

Reid.



Reid.

On Sun, 2007-01-07 at 17:14 -0800, Reid Spencer wrote:
> All,
> 
> Attached is a cumulative patch with all changes in the Apple repository
> since the mirror's r240 revision. If you haven't applied the various
> patches sent in the last few days, this one will be much easier. 
> 
> The attached patch also contains one thing that the Apple repository
> doesn't have: fixes to i386.h for changes in the result type of
> Module::getOrInsertFunction.
> 
> This patch compiles/works fine for me on Linux/x86
> 
> Reid.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-GCC-2007-01-07.patch
Type: text/x-patch
Size: 149454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070107/7916d35e/attachment.bin>


More information about the llvm-commits mailing list