[LLVMdev] Problems compiling llvm-gcc4 frontend on x86_64

Warren Armstrong warren.armstrong at anu.edu.au
Thu May 24 22:34:59 PDT 2007


Hi all,

I've run into problems compiling the llvm-gcc frontend on x86_64.  Is this
not supported, or am I making an error somewhere?

The procedure I followed was:

1. Download LLVM 2.0 source as a tarball (from a few days ago, during
the testing phase).
2. Download the llvm-gcc4 source today, as a tarball.
3. Extract both. 

4. Configure LLVM as: ../src/configure --prefix=`pwd`../install
--enable-optimized --enable-jit --enable-targets=host-only
(There is no llvm-gcc in the path)
5. make ENABLE_OPTIMIZED=1

6. Configure the frontend as:
../llvm-gcc4-2.0.source/configure --prefix=`pwd`../install
--program-prefix=llvm- --enable-llvm=/home/warren/llvm/obj/
--enable-languages=c,c++ --disable-shared

7. make LLVM_VERSION_INFO=2.0

This produced errors from the assembler.  I reran the failing command
with -v, and got the output below.
I then changed the command to use -S instead of -c, the resulting
assembler is attached.

Any advice gratefully received.

Cheers,
Warren

--------------

Failing command:


warren at sunnyvale:~/llvm-gcc/obj/gcc> /home/warren/llvm-gcc/obj/gcc/xgcc
-v -B/home/warren/llvm-gcc/obj/gcc/
-B/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/bin/
-B/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/lib/
-isystem
/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/include
-isystem
/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/sys-include
-O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I.
-I32 -I../../llvm-gcc4-2.0.source/gcc
-I../../llvm-gcc4-2.0.source/gcc/32
-I../../llvm-gcc4-2.0.source/gcc/../include
-I../../llvm-gcc4-2.0.source/gcc/../libcpp/include 
-I/home/warren/llvm/llvm-2.0/include -I/home/warren/llvm/obj//include
-m32 -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer
-fno-asynchronous-unwind-tables    -c
../../llvm-gcc4-2.0.source/gcc/crtstuff.c -DCRT_BEGIN   -o 32/crtbegin.o
Reading specs from /home/warren/llvm-gcc/obj/gcc/specs
Target: x86_64-unknown-linux-gnu
Configured with: ../llvm-gcc4-2.0.source/configure
--prefix=/home/warren/llvm-gcc/obj../install --program-prefix=llvm-
--enable-llvm=/home/warren/llvm/obj/ --enable-languages=c,c++
--disable-shared
Thread model: posix
gcc version 4.0.1 LLVM (Apple Computer, Inc. build 2.0)
 /home/warren/llvm-gcc/obj/gcc/cc1 -quiet -v -I. -I32
-I../../llvm-gcc4-2.0.source/gcc -I../../llvm-gcc4-2.0.source/gcc/32
-I../../llvm-gcc4-2.0.source/gcc/../include
-I../../llvm-gcc4-2.0.source/gcc/../libcpp/include
-I/home/warren/llvm/llvm-2.0/include -I/home/warren/llvm/obj//include
-iprefix
/home/warren/llvm-gcc/obj/gcc/../lib/gcc/x86_64-unknown-linux-gnu/4.0.1/
-isystem /home/warren/llvm-gcc/obj/gcc/include -DIN_GCC -DCRT_BEGIN
-isystem
/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/include
-isystem
/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/sys-include
-isystem ./include ../../llvm-gcc4-2.0.source/gcc/crtstuff.c -quiet
-dumpbase crtstuff.c -m32 -mtune=generic -auxbase-strip 32/crtbegin.o
-g0 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -version
-finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer
-fno-asynchronous-unwind-tables -o /tmp/ccBy56Wo.s
ignoring nonexistent directory
"/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/include"
ignoring nonexistent directory
"/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/sys-include"
ignoring duplicate directory "./include"
ignoring nonexistent directory
"/home/warren/llvm-gcc/obj/gcc/../lib/gcc/x86_64-unknown-linux-gnu/4.0.1/include"
ignoring nonexistent directory
"/home/warren/llvm-gcc/obj/gcc/../lib/gcc/x86_64-unknown-linux-gnu/4.0.1/../../../../x86_64-unknown-linux-gnu/include"
ignoring nonexistent directory "/home/warren/llvm-gcc/obj../install/include"
ignoring nonexistent directory
"/home/warren/llvm-gcc/obj../install/lib/gcc/x86_64-unknown-linux-gnu/4.0.1/include"
ignoring nonexistent directory
"/home/warren/llvm-gcc/obj../install/x86_64-unknown-linux-gnu/include"
ignoring nonexistent directory "../../llvm-gcc4-2.0.source/gcc/32"
#include "..." search starts here:
#include <...> search starts here:
 .
 32
 ../../llvm-gcc4-2.0.source/gcc
 ../../llvm-gcc4-2.0.source/gcc/../include
 ../../llvm-gcc4-2.0.source/gcc/../libcpp/include
 /home/warren/llvm/llvm-2.0/include
 /home/warren/llvm/obj//include
 /home/warren/llvm-gcc/obj/gcc/include
 /usr/local/include
 /usr/include
End of search list.
GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 2.0)
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.0.2 20050901 (prerelease) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Warning: Generation of 64-bit code for a 32-bit processor requested.
Warning: 64-bit processors all have at least SSE2.
Compiler executable checksum: efa2a522e5a08a9a5e39009754b845ec
 as --traditional-format -V -Qy --32 -o 32/crtbegin.o /tmp/ccBy56Wo.s
GNU assembler version 2.16.91.0.2 (x86_64-suse-linux) using BFD version
2.16.91.0.2 20050720 (SuSE Linux)
/tmp/ccBy56Wo.s: Assembler messages:
/tmp/ccBy56Wo.s:15: Error: bad register name `%rsp'
/tmp/ccBy56Wo.s:16: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:17: Error: bad register name `%rsp'
/tmp/ccBy56Wo.s:18: Error: `completed.4705(%rip)' is not a valid
base/index expression
/tmp/ccBy56Wo.s:21: Error: `p.4704(%rip)' is not a valid base/index
expression
/tmp/ccBy56Wo.s:22: Error: bad register name `%rax)'
/tmp/ccBy56Wo.s:23: Error: bad register name `%rax'
/tmp/ccBy56Wo.s:26: Error: `p.4704(%rip)' is not a valid base/index
expression
/tmp/ccBy56Wo.s:27: Error: bad register name `%rax'
/tmp/ccBy56Wo.s:28: Error: `p.4704(%rip)' is not a valid base/index
expression
/tmp/ccBy56Wo.s:29: Error: bad register name `%rax)'
/tmp/ccBy56Wo.s:30: Error: bad register name `%rax'
/tmp/ccBy56Wo.s:33: Error: `completed.4705(%rip)' is not a valid
base/index expression
/tmp/ccBy56Wo.s:34: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:35: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:38: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:39: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:47: Error: bad register name `%rsp'
/tmp/ccBy56Wo.s:48: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:49: Error: bad register name `%rsp'
/tmp/ccBy56Wo.s:50: Error: `__JCR_LIST__(%rip)' is not a valid
base/index expression
/tmp/ccBy56Wo.s:53: Error: `_Jv_RegisterClasses(%rip)' is not a valid
base/index expression
/tmp/ccBy56Wo.s:55: Error: bad register name `%rax'
/tmp/ccBy56Wo.s:58: Error: `__JCR_LIST__(%rip)' is not a valid
base/index expression
/tmp/ccBy56Wo.s:59: Error: bad register name `%rax'
/tmp/ccBy56Wo.s:60: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:61: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:64: Error: bad register name `%rbp'
/tmp/ccBy56Wo.s:65: Error: bad register name `%rbp'

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 32crtbegin.S
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070525/878f6a2f/attachment.ksh>


More information about the llvm-dev mailing list