32-bit newlib on 64-bit host

Programming, for all ages and all languages.
Post Reply
lrod
Posts: 4
Joined: Sat Oct 13, 2012 2:14 pm

32-bit newlib on 64-bit host

Post by lrod »

How do I build 32-bit newlib on 64-bit host? I compile my kernel with '-m32' option, but with newlib it doesn't work.
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: 32-bit newlib on 64-bit host

Post by Combuster »

lrod wrote:I compile my kernel with '-m32' option
Wrong compiler. See the title of your own post (EDIT: which read cross-compiler before moderation).
Last edited by Combuster on Mon Nov 05, 2012 7:15 am, edited 1 time in total.
"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 ]
lrod
Posts: 4
Joined: Sat Oct 13, 2012 2:14 pm

Re: 32-bit newlib on 64-bit host

Post by lrod »

Combuster wrote:
lrod wrote:I compile my kernel with '-m32' option
Wrong compiler. See the title of your own post.
I need 32-bit toolchain, correct?
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: 32-bit newlib on 64-bit host

Post by bluemoon »

The easiest way is build a cross compiler. It can be done with host compiler, but it require a higher level of knowledge and skill to work with, and sometime troubleshooting work.
Post Reply