[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] c++ on microblaze



Hi Frank,

Rädisch Frank wrote:

> I have tried to compile c++ using the mb-g++ und uClinux. However, I didn't
> get the STLport lib compiled properly. Furtheron, when using destructors
> or new and delete uin my c++ demo program I got the following erros:
> 
> 'bad reloc type 10'  or 'undefined reference to _heap'
> 
> Do you use c++ in your microblaze project? Do you have 
> some hints where these errors may result from ? (Maybe
> mb-g++ or eld2flt are implemented improperly...) 

I haven't used c++ in any uClinux projects - I haven't even tried using 
c++ for bare microblaze programs, so I can't really say. Might be worth 
seeing if there are known issues building STLport with g++ 2.95.x series 
compilers, for a start.

It seems unlikely that the c++ compiler would generate different ELF 
relocations than the standard C compiler, since it's all the same 
binutils in the background.  So, I'm not really sure where that elf2flt 
error is coming from.  Working on elf2flt is a pretty painful business, 
so I prefer to eliminate all other sources of error before diving in there!

I think the only way forward here is the hard way, look into the STLport 
compile errors, try to see what's going on, fix, repeat.  Does STLport 
require any arch-specific support?   If so, I certainly haven't 
implemented any, so that would be a good place to start.

Also I think at some stage you'll need to implement 
constructor/destructor (init/fini) support in the microblaze-specific 
uClibc directory:
uClibc/libc/sysdeps/linux/microblaze - crti.{S|c} and crtn.{S|c}

but to be honest I have no idea what is required - one of the 
toolchain/uClibc experts on uclinux-dev or uclibc mailist lists can 
probably offer some pointers.

Sorry I'm not much help, but keep us informed and I'll help out where I 
can.  c++ support would be nice, even if only for completeness.

Cheers,

John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/