Page 1 of 1

[Cross-compilation] How can I port coreutils and bash/dash ?

Posted: Thu Dec 29, 2011 12:35 pm
by fiveayem
Hello,

Having ported Newlib (and built a specific toolchain) for my OS, I would now like to port some GNU binaries, such as coreutils and bash. However, I am not a specialist about cross-compilation, and this is the reason why I ask for your help. I know that it is necessary to execute a configure script before "making". But which parameters should I provide the script with ?

Sorry if my question seems stupid, but I am not an expert at all. If bash is too complicated to deal with, maybe you could tell me about how porting dash ? I have heard that it is much easier, but I do not know where to find the source code.

Thanks a lot for your help.

Re: [Cross-compilation] How can I port coreutils and bash/da

Posted: Thu Dec 29, 2011 12:58 pm
by AJ
Hi,
fiveayem wrote:Sorry if my question seems stupid, but I am not an expert at all. If bash is too complicated to deal with, maybe you could tell me about how porting dash ? I have heard that it is much easier, but I do not know where to find the source code.
Dash Shell.

Cheers,
Adam

Re: [Cross-compilation] How can I port coreutils and bash/da

Posted: Thu Dec 29, 2011 1:02 pm
by fiveayem
Ok, thanks :)

And what about the procedure for porting ?

Re: [Cross-compilation] How can I port coreutils and bash/da

Posted: Thu Dec 29, 2011 2:00 pm
by Combuster
Homework: RTFM

Code: Select all

./configure --help

Re: [Cross-compilation] How can I port coreutils and bash/da

Posted: Thu Dec 29, 2011 2:52 pm
by gerryg400
This worked for me for both dash and coreutils.

Code: Select all

./configure --host=x86_64-myos --prefix=/Users/gerryg/myos/
make
I haven't tried bash.

I used newlib as my C library but needed to add about 60 extra functions to it to get dash working. Even more for coreutils.