18 Jun 2012 12:35
[GSoC] Port gcc - status after week 4
Hi, Last week I started porting libgmp, libmpfr, and libmpc. Initially I got stuck on the cross compilation issue and then referred to the libgmp manual to solve it. All these libraries expect --host and --build arguments in configure stage for cross compilation. I also used --disable-shared and --disable-static flags in configure stage. There were problems with locating the cross-compiler toolchain and and flags were not being passed properly during the compilation test to the gcc. I had to define the CFLAGS in the Makefile itself and pass them to the configure script. But, this was quick and dirty way to proceed, i will look for some other ways. This is the flag that i had to pass: DEP_CFLAGS = -I../../../../lib/posix -I../../../../lib/c/include -imacros ../../../../../config.h -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32LE -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc -std=gnu99 -D__LE__ -march=pentium -fno-omit-frame-pointer Now, I tried cross-compiling libgmp, libmpfr and libmpc one by one. Log for libgmp build shows that it could not find wchar.h and there ws undefined reference to memcpy. Similarly, libmpfr could not find memory.h, wchar.h, sys/fpu.h, fenv.h and gmp.h. There were undefined references to fopen, ferror, fclose, memmove, memset, setlocale, strtol, gettimeofday, round, trunc, floor, ceil and nearbyint. There were undefined references to fopen, ferror and fclose in case of libmpc. I will implement some of the missing functions in libposix. Undefined references to memcpy, memmove, memset, fopen, fclose,(Continue reading)
RSS Feed