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, ferror, strtol and gettimeoday can be easily fixed by linking correctly to libposix as these functions are already implemented in libc and their prototypes are only required in lib/posix/. Moreover, libmpfr first needs libgmp to be built and llibmpc needs both libgmp and libmpfr to be already built. So, my first goal is to port libgmp as soon as possible. Analyzing all the external libraries gave a more detailed understanding of the work required to be done to port all of them. I have also created a wiki page at http://trac.helenos.org/wiki/GCCPort where I will document my progress in much detail and the task to be done. Thanks, Vivek _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
