Yuri
2010-May-06 06:02 UTC
[LLVMdev] Failure to compile llvm-gcc-4.2-2.7 on FreeBSD on sparc machine
llvm itself compiles fine. gcc frontend has the error, see below. I applied the attached patch, since the name of architecture on FreeBSD is sparc64, not sparc. There is also one more replacement sparc -> spaarc64 was made in gcc/Makefile in llvm-gcc. FreeBSD -8.0-STABLE gcc-4.5.0 sunblade 100 Yuri gmake[2]: Leaving directory `/tmp/llvm-build/2.7/llvm-gcc-4.2-objects/libdecnumber' gmake[2]: Entering directory `/tmp/llvm-build/2.7/llvm-gcc-4.2-objects/gcc' /tmp/llvm-build/2.7/llvm-gcc-4.2-objects/./gcc/xgcc -B/tmp/llvm-build/2.7/llvm-gcc-4.2-objects/./gcc/ -B/usr/local/llvm/2.7/sparc64-unknown-freebsd8.0/bin/ -B/usr/local/llvm/2.7/sparc64-unknown-freebsd8.0/lib/ -isystem /usr/local/llvm/2.7/sparc64-unknown-freebsd8.0/include -isystem /usr/local/llvm/2.7/sparc64-unknown-freebsd8.0/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../llvm-gcc-4.2/gcc -I../../llvm-gcc-4.2/gcc/. -I../../llvm-gcc-4.2/gcc/../include -I./../intl -I../../llvm-gcc-4.2/gcc/../libcpp/include -I/usr/local/include -I../../llvm-gcc-4.2/gcc/../libdecnumber -I../libdecnumber -I/tmp/llvm-build/2.7/llvm-gcc-4.2-objects/../llvm-objects/include -I/tmp/llvm-build/2.7/llvm/include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder \ -c ../../llvm-gcc-4.2/gcc/crtstuff.c -DCRT_BEGIN \ -o crtbegin.o GCC: <pointer_type 0x41a1b130 type <void_type 0x41a1b080 void VOID align 8 symtab 1 alias set -1 LLVM: void pointer_to_this <pointer_type 0x41a1b130>> public unsigned DI size <integer_cst 0x41a08b70 type <integer_type 0x41a1a0b0 bit_size_type> constant invariant 64> unit size <integer_cst 0x41a08ba0 type <integer_type 0x41a1a000 long unsigned int> constant invariant 8> align 64 symtab 0 alias set -1 pointer_to_this <pointer_type 0x41a2cbb0>> LLVM: i8* (32 bits) LLVM type size doesn't match GCC type size!../../llvm-gcc-4.2/gcc/crtstuff.c:267: internal compiler error: in llvm_set_type, at llvm-types.cpp:89 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://llvm.org/bugs/> for instructions. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: llvm-patch-sparc64.diff URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100505/a0d2b132/attachment.ksh>
Anton Korobeynikov
2010-May-06 06:46 UTC
[LLVMdev] Failure to compile llvm-gcc-4.2-2.7 on FreeBSD on sparc machine
Hello> I applied the attached patch, since the name of architecture on FreeBSD is > sparc64, not sparc. There is also one more replacement sparc -> spaarc64 was > made in gcc/Makefile in llvm-gcc.The patch is incorrect and the problems you're seeing are caused by your patch, since sparc != sparc64. In LLVM sense "sparc" means "sparc with ILP32 architecture model", llvm does not support anything 64 bit in sparc world.> size <integer_cst 0x41a08b70 type <integer_type 0x41a1a0b0 bit_size_type> > constant invariant 64> > unit size <integer_cst 0x41a08ba0 type <integer_type 0x41a1a000 long > unsigned int> constant invariant 8> > align 64 symtab 0 alias set -1 > pointer_to_this <pointer_type 0x41a2cbb0>> > LLVM: i8* (32 bits) > LLVM type size doesn't match GCC typeIndeed, LLVM assumes that pointer size is 32 bits (since it's 32 bit sparc), but gcc - definitely not. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Anton Korobeynikov
2010-May-06 07:19 UTC
[LLVMdev] Failure to compile llvm-gcc-4.2-2.7 on FreeBSD on sparc machine
> So LLVM support for sparc64 has to be implemented I guess.Yes.> Is this work started?I am not aware about any significant sparc-related works during past few years. So, the answer is most probably "no". -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Yuri
2010-May-06 07:20 UTC
[LLVMdev] Failure to compile llvm-gcc-4.2-2.7 on FreeBSD on sparc machine
Anton Korobeynikov wrote:> The patch is incorrect and the problems you're seeing are caused by > your patch, since sparc != sparc64. > In LLVM sense "sparc" means "sparc with ILP32 architecture model", > llvm does not support anything 64 bit in sparc worldSparcTargetMachine.h file lists SparcV9TargetMachine as 64-bit machine and SparcV8TargetMachine as 32-bit machine. And SparcInstrInfo.td seems to contain some of the V9-only instructions. Are you sure 64-bit sparc isn't supported at all? Yuri
Reasonably Related Threads
- [LLVMdev] Failure to compile llvm-gcc-4.2-2.7 on FreeBSD on sparc machine
- [LLVMdev] dragonegg/llvm-gfortran/gfortran benchmarks
- [LLVMdev] Cygwin llvm-gcc regression
- [LLVMdev] llvm-2.4 prerelease gfortran results
- [LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64