Skip to contentSkip to conversation

building GCC cross compiler without building any library

DISCUSSION Ahsan Khawaja 3 participants 4 messages Dec 7, 2009 – Dec 8, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

Is it possible to build GCC cross compiler with support of any library (eglic, glibc,uclibc and newlib). What should I have to do in this regard. Does build of library is controlled by PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc. Secondly just correct me if I am wrong. Building SDK for bare metal we OE should not build Linux-libc-header. Is this right?

thanks for helping me out.

regards.

#1 lore raw
Quoted 2 lines · Ahsan Khawaja

Is it possible to build GCC cross compiler with support of any library (eglic, glibc,uclibc and newlib). What should I have to do in this regard.

I'm not quite sure what you're asking. Do you mean that you want to build a generic version of GCC which can then be used with any of the four C libraries that you mention?

If so, the answer is probably "yes" so long as you restrict yourself to plain C only. If you want C++ or the like, the answer is almost certainly no.

p.

#2 lore raw

sorry i missed typed it. i want to ask

Is it possible to build GCC cross compiler *without* support of any library(eglic, glibc,uclibc and newlib) for bare metal. if yes what I have to do in this regard.

Quoted 22 lines · Phil Blundell
Quoted 2 lines · Ahsan Khawaja

Is it possible to build GCC cross compiler with support of any library (eglic, glibc,uclibc and newlib). What should I have to do in this

regard.

I'm not quite sure what you're asking. Do you mean that you want to build a generic version of GCC which can then be used with any of the four C libraries that you mention?

If so, the answer is probably "yes" so long as you restrict yourself to plain C only. If you want C++ or the like, the answer is almost certainly no.

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 2 lines · Ahsan Khawaja

sorry i missed typed it. i want to ask

in future don't top post. It breaks the logical reading on threads.

Quoted 3 lines

Is it possible to build GCC cross compiler *without* support of any library(eglic, glibc,uclibc and newlib) for bare metal. if yes what I have to do in this regard.

You could do it in several ways. You can take an existing cross compiler and use -undef -nostdinc and -nostdinc++ during compilation -nodefaultlibs and -nostdlib during linking. This will make your existing compiler the way you want

you can build a compiler using newlib during buildtime newlib is not a hosted environment means its baremetal environment. Then you can move the include and lib directories away from
install path to be sure that it does not find anything in default locations by mistake.

You can supplement the above build compiler with options I mentioned then it should be better

-Khem

Quoted 30 lines · Phil Blundell
Quoted 14 lines · Ahsan Khawaja
Quoted 2 lines

Is it possible to build GCC cross compiler with support of any library (eglic, glibc,uclibc and newlib). What should I have to do in this

regard.

I'm not quite sure what you're asking.  Do you mean that you want to build a generic version of GCC which can then be used with any of the four C libraries that you mention?

If so, the answer is probably "yes" so long as you restrict yourself to plain C only.  If you want C++ or the like, the answer is almost certainly no.

Quoted 9 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel