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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
fiveayem
Member
Member
Posts: 51
Joined: Sun Aug 14, 2011 8:01 am

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

Post 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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

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

Post 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
fiveayem
Member
Member
Posts: 51
Joined: Sun Aug 14, 2011 8:01 am

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

Post by fiveayem »

Ok, thanks :)

And what about the procedure for porting ?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

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

Post by Combuster »

Homework: RTFM

Code: Select all

./configure --help
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

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

Post 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.
If a trainstation is where trains stop, what is a workstation ?
Post Reply