llvm-gcc compilation error: BUILT_IN_ADJUST_TRAMPOLINE undeclared

llvm-gcc 2.4 doesn’t seem to compile; what is wrong?

This is my first attempt to compile llvm-gcc.
The llvm core compiled without problems.

$ uname -a
Linux ygramoel 2.6.26.5-45.fc9.x86_64 #1 SMP Sat Sep 20 03:23:12 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
$ gcc -v

gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)
$ svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.2/tags/RELEASE_24 llvm-gcc

$ cd …/obj/llvm-gcc
$ …/…/src/llvm-gcc/configure

$ gmake

gcc -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I…/…/…/src/llvm-gcc/gcc -I…/…/…/src/llvm-gcc/gcc/. -I…/…/…/src/llvm-gcc/gcc/…/include -I…/…/…/src/llvm-gcc/gcc/…/libcpp/include -I…/…/…/src/llvm-gcc/gcc/…/libdecnumber -I…/libdecnumber …/…/…/src/llvm-gcc/gcc/tree-nested.c -o tree-nested.o
…/…/…/src/llvm-gcc/gcc/tree-nested.c: In function ‘convert_tramp_reference’:
…/…/…/src/llvm-gcc/gcc/tree-nested.c:1846: error: ‘BUILT_IN_ADJUST_TRAMPOLINE’ undeclared (first use in this function)
…/…/…/src/llvm-gcc/gcc/tree-nested.c:1846: error: (Each undeclared identifier is reported only once
…/…/…/src/llvm-gcc/gcc/tree-nested.c:1846: error: for each function it appears in.)

Hi

This is my first attempt to compile llvm-gcc.
The llvm core compiled without problems.

you didn't tell it where to find llvm when you configured.
Check out README.LLVM, in particular the --enable-llvm=
option.

Ciao,

Duncan.

Hello, Johan

$ ../../src/llvm-gcc/configure

Please do carefully read readme.llvm file for configuration instructions.
http://llvm.org/docs/GCCFEBuildInstrs.html is also a good source of information

You’re right, thanks. However, now I ran into the next problem. This seems to be related to the fact that I have a 64-bit machine?

$ …/…/src/llvm-gcc/configure --prefix=/home/johan/llvm --program-prefix=llvm- --enable-llvm=/home/johan/
llvm/obj/llvm --enable-languages=c,c++

$ gmake

/home/johan/llvm/obj/llvm-gcc/./gcc/xgcc -B/home/johan/llvm/obj/llvm-gcc/./gcc/ -B/home/johan/llvm/x86_64-unknown-linux-gnu/bin/ -B/home/johan/llvm/x86_64-unknown-linux-gnu/lib/ -isystem /home/johan/llvm/x86_64-unknown-linux-gnu/include -isystem /home/johan/llvm/x86_64-unknown-linux-gnu/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I32 -I…/…/…/src/llvm-gcc/gcc -I…/…/…/src/llvm-gcc/gcc/32 -I…/…/…/src/llvm-gcc/gcc/…/include -I…/…/…/src/llvm-gcc/gcc/…/libcpp/include -I…/…/…/src/llvm-gcc/gcc/…/libdecnumber -I…/libdecnumber -I/home/johan/llvm/obj/llvm/include -I/home/johan/llvm/src/llvm/include -m32 -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
-c …/…/…/src/llvm-gcc/gcc/crtstuff.c -DCRT_BEGIN
-o 32/crtbegin.o
In file included from /usr/include/features.h:359,
from /usr/include/stdio.h:28,
from …/…/…/src/llvm-gcc/gcc/tsystem.h:90,
from …/…/…/src/llvm-gcc/gcc/crtstuff.c:68:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

Hi Johan,

You're right, thanks. However, now I ran into the next problem. This
seems to be related to the fact that I have a 64-bit machine?

I also have a 64 bit machine but I don't see this, and I don't know
what the reason could be. Hopefully someone else has a solution.

Ciao,

Duncan.

Use --disable-multilib

--Edwin

Edwin,

–disable-multilib works, thanks for the hint.

The problem seems to be that the package glibc-devel for i386 is not installed on my machine. I can’t install it because it conflicts with glibc for i686, which is required for a number of other packages for reasons that are not clear to me.

Anyway, this is no longer an llvm problem.