[LLVMdev] Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM

Vladimir Prus ghost at cs.msu.su
Mon Mar 6 23:53:00 PST 2006


Chris Lattner wrote:

> On Thu, 2 Mar 2006, Vladimir Prus wrote:
>>>> The instructions seem to have one path wrong. It says to get:
>>>
>>> I'll put together a tarball today.  That will be easier than dealing
>>> with a patch, and it will include a bunch of bugfixes since the previous
>>> email.
>> Further into process, I get this error:
>>  In file included from ../../llvm-new-frontend/gcc/llvm-backend.cpp:23:
>>  ../../llvm-new-frontend/gcc/llvm-internal.h:216: error: 'uint64_t' is
>>  used as a type, but is not defined as a type.
>>
>> Any ideas what could be wrong?
> 
> Sorry for the delay, please try this tarball:
> http://nondot.org/sabre/2006-03-02-llvm-gcc-4.tar.gz

There's some confusion with --enable-llvm configure parameter. I've built
LLVM to a separate build dir. The source is ~ghost/Work/llvm-cvs and build
dir is /space/p2/ghost/build/llvm-cvs

I've configured LLVM with prefix=/space/p2/ghost/build/llvm-cvs/install 
and run "make install".

Now, if, when configuring frontend, I specify

  --enable-llvm=/space/p2/ghost/build/llvm-cvs

I get error because no LLVM header can be found. If I specify

  --enable-llvm=/space/p2/ghost/build/llvm-cvs/install

I get link errors like this:

   c++: /space/p2/ghost/build/llvm-cvs/install/Debug/lib/LLVMX86.o: No such
   file or directory

So, it seems like, at the same time:

1. buildir != srcdir is not supported when building frontend
2. building the frontend against installed LLVM does not work either.

I can get past the compile/link errors only after copying "include"
directory from source dir to the build dir.

Then, I'm faced with yet another problem, sorry! The problem is:

/space/p2/ghost/build/llvm-frontend/gcc/xgcc
-B/space/p2/ghost/build/llvm-frontend/gcc/
-B/space/p2/ghost/build/llvm-frontend/install/i686-pc-linux-gnu/bin/
-B/space/p2/ghost/build/llvm-frontend/install/i686-pc-linux-gnu/lib/
-isystem /space/p2/ghost/build/llvm-frontend/install/i686-pc-linux-gnu/include
-isystem /space/p2/ghost/build/llvm-frontend/install/i686-pc-linux-gnu/sys-include
-O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I.
-I../../2006-03-02-llvm-gcc-4/gcc -I../../2006-03-02-llvm-gcc-4/gcc/.
-I../../2006-03-02-llvm-gcc-4/gcc/../include
-I../../2006-03-02-llvm-gcc-4/gcc/../libcpp/include 
-I/space/p2/ghost/build/llvm-cvs/include   -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-unit-at-a-time -fno-omit-frame-pointer \
           -c ../../2006-03-02-llvm-gcc-4/gcc/crtstuff.c -DCRT_BEGIN
-DCRTSTUFFT_O \
          -o crtbeginT.o
In file included from ../../2006-03-02-llvm-gcc-4/gcc/crtstuff.c:67:
../../2006-03-02-llvm-gcc-4/gcc/unwind-dw2-fde.h: In function 'get_cie':
../../2006-03-02-llvm-gcc-4/gcc/unwind-dw2-fde.h:163: warning: return from
incompatible pointer type
Invalid operand found in inline asm: 'call      .LPR0
.LPR0:
        popl    $0
        addl    $$_GLOBAL_OFFSET_TABLE_+[.-.LPR0],$0'
  INLINEASM <es:call    .LPR0
.LPR0:
        popl    $0
        addl    $$_GLOBAL_OFFSET_TABLE_+[.-.LPR0],$0>, 10, %DX<def>
make[1]: *** [crtbeginT.o] Error 1
make[1]: Leaving directory `/space/p2/ghost/build/llvm-frontend/gcc'


This time, I don't even understand what I'm told. Note that cc1plus is
already built by the time this error is emitted.

Can you suggest something? 

- Volodya






More information about the llvm-dev mailing list