[LLVMdev] link errors on ARM with GCC 3.4.4

P. Durante shackan at gmail.com
Sat Oct 27 17:25:24 PDT 2007


On 10/27/07, P. Durante <shackan at gmail.com> wrote:
> hi,
> I've been trying to avoid spamming the list but I don't know where
> else to bang my head
>
> using the latest trunk and 2.1, I always get this:
>
> llvm[2]: Linking Release executable tblgen (without symbols)
> /targets/SDK_BETA_ARMEL/mnt/shared/repos/svn/llvm/llvm-project/llvm/trunk/utils/TableGen/Release/InstrInfoEmitter.o:(.rodata._ZTVN4llvm4UserE[vtable
> for llvm::User]+0x10): undefined reference to `llvm::Value::dump()
> const'
> /targets/SDK_BETA_ARMEL/mnt/shared/repos/svn/llvm/llvm-project/llvm/trunk/utils/TableGen/Release/InstrInfoEmitter.o:(.rodata._ZTIN4llvm4UserE[typeinfo
> for llvm::User]+0x8): undefined reference to `typeinfo for
> llvm::Value'
> /targets/SDK_BETA_ARMEL/mnt/shared/repos/svn/llvm/llvm-project/llvm/trunk/utils/TableGen/Release/InstrInfoEmitter.o:
> In function `llvm::User::~User()':InstrInfoEmitter.cpp:(.text._ZN4llvm4UserD1Ev[llvm::User::~User()]+0x10):
> undefined reference to `llvm::Value::~Value()'
> /targets/SDK_BETA_ARMEL/mnt/shared/repos/svn/llvm/llvm-project/llvm/trunk/utils/TableGen/Release/InstrInfoEmitter.o:
> In function `llvm::User::~User()':InstrInfoEmitter.cpp:(.text._ZN4llvm4UserD0Ev[llvm::User::~User()]+0x10):
> undefined reference to `llvm::Value::~Value()'
> collect2: ld returned 1 exit status
> make[2]: *** [/targets/SDK_BETA_ARMEL/mnt/shared/repos/svn/llvm/llvm-project/llvm/trunk/Release/bin/tblgen]
> Error 1
> make[2]: Leaving directory
> `/targets/SDK_BETA_ARMEL/mnt/shared/repos/svn/llvm/llvm-project/llvm/trunk/utils/TableGen'
> make[1]: *** [TableGen/.makeall] Error 2
> make[1]: Leaving directory
> `/targets/SDK_BETA_ARMEL/mnt/shared/repos/svn/llvm/llvm-project/llvm/trunk/utils'
> make: *** [all] Error 1
>
>
> `gcc -v` here
>
> Reading specs from
> /scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.4/specs
> Reading specs from /scratchbox/compilers/cs2005q3.2-glibc2.5-arm/gcc.specs
> rename spec cpp to old_cpp
> Configured with:
> /home/kl/cs2005q3-2_toolchain/gcc/glibc/work/gcc-2005q3-2/configure
> --build=i386-linux --host=i386-linux --target=arm-none-linux-gnueabi
> --prefix=/scratchbox/compilers/cs2005q3.2-glibc-arm
> --with-headers=/scratchbox/compilers/cs2005q3.2-glibc-arm/usr/include
> --enable-languages=c,c++ --enable-shared --enable-threads
> --disable-checking --enable-symvers=gnu --program-prefix=arm-linux-
> --with-gnu-ld --enable-__cxa_atexit --disable-libssp
> --disable-libstdcxx-pch --with-cpu= --enable-interwork
> Thread model: posix
> gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)
>
> unfortunately gcc 4 has a different EABI (version 4 vs version 0) so
> upgrading is out of question
>
> thanks in advance,
> \pd\
>

I knew it, I should have tried harder...

it's clearly an optimization bug in gcc, using -O2 still exhibits the
same behavior, but I can now build successfully with

make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O1

(tried both 2.1 and trunk/)

the debug version seems to build fine as well (albeit I didn't wait
for it to complete and killed make after about half an hour)

maybe an update to http://llvm.org/docs/GettingStarted.html#brokengcc
is necessary ? (ARM developers use CodeSourcery's toolchains a lot)

sorry for the noise,
\pd\



More information about the llvm-dev mailing list