Page 1 of 2

porting BASH, GCC, and glibc

Posted: Mon Aug 27, 2007 1:13 pm
by GLneo
I'm am not currently at the point where i can port these, but I would like to know what I will need to do so, like what system calls?

and for a c lib, I've ported most of the PDlibc ( except malloc... ), and now I need more ( like math ), so I downloaded the current glibc, but i have yet to find were the work is actually done ( every math function just links to another function or says not implemented ), so does any one know of a simple libc?

thx!

Posted: Mon Aug 27, 2007 1:49 pm
by jnc100
Newlib has been discussed several times.

Regards,
John

Posted: Mon Aug 27, 2007 3:25 pm
by pcmattman

Posted: Mon Aug 27, 2007 7:23 pm
by GLneo
thanks, I'm working on it!, but where can i download the i586-elf compiler? didn't someone host that port?

EDIT: never mind i think i found it :P

Posted: Tue Aug 28, 2007 3:22 am
by JamesM
You download gcc, run

Code: Select all

./configure --target=i586-elf --prefix=/usr/cross/
make
sudo make install
I gave porting glibc a shot, and gave up - it's immensely complicated and I couldn't get it to compile. Newlib is the way forward.

JamesM

Posted: Tue Aug 28, 2007 9:43 am
by GLneo
well, now I'm having trouble compiling newlib, does any one have a precompiled binary that i could just link with my OS's "gluecode"?

thx!

Posted: Tue Aug 28, 2007 12:05 pm
by JamesM
I do... but it probably won't work. Best idea is to get the bugger compiling properly.

I had problems with the autoconfigure system newlib employs. I hacked it a little - made a subdirectory in libc/sys/ and symlinked all my stuff there. Works a treat! you have to edit the configure.host and config.sub files as well, to recognise your OS string (e.g. i386-pc-jimix)

JamesM

Posted: Tue Aug 28, 2007 2:26 pm
by GLneo
could you please elaborate on the details of what your are saying?, I get errors like "assembler garbage at end of assembly, unrecognized letter is 'a'", or something...

Posted: Tue Aug 28, 2007 2:53 pm
by JamesM
Sounds like it's trying to assemble a non-assembly file... You need to be more specific with your error messages.

Posted: Tue Aug 28, 2007 3:47 pm
by pcmattman
GLneo wrote:could you please elaborate on the details of what your are saying?, I get errors like "assembler garbage at end of assembly, unrecognized letter is 'a'", or something...
You might also want to say what compiler version and target you are using.

Posted: Tue Aug 28, 2007 4:59 pm
by GLneo
this is the error [ attached ]

p.s. I'm targeting i686-elf and compiling with latest cygwin gcc


maybe my i686-elf-gcc is bad, does anyone know where that compiler is hosted?

Posted: Tue Aug 28, 2007 7:03 pm
by frank
Also you should make sure that if you are using Cygwin(it looks like you are) that you are in binary mode. I had a bunch of problems compiling a cross compiler that were solved just by switching to binary mode.

Posted: Wed Aug 29, 2007 1:37 am
by JamesM
Attachment gone? I don't see it...

Posted: Wed Aug 29, 2007 3:58 am
by Combuster
if you would please not filter the command lines, we can make more sense of where it happens.

You can btw use the copy feature from the commandline window. That way you don't have to make screenshots.

Posted: Wed Aug 29, 2007 5:07 am
by GLneo
my command window doesn't let me copy paste for some reason, if you want to see out2.txt it's attached.