[oe] building GCC cross compiler without building any library

Khem Raj raj.khem at gmail.com
Tue Dec 8 20:29:01 UTC 2009


On Mon, Dec 7, 2009 at 3:49 AM, Ahsan Khawaja <ahsan.khwaja at gmail.com> wrote:
> sorry i missed typed it. i want to ask
>

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

> 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

>
> On Mon, Dec 7, 2009 at 4:39 PM, Phil Blundell <philb at gnu.org> wrote:
>
>> On Mon, 2009-12-07 at 15:41 +0500, Ahsan Khawaja wrote:
>> > 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
>> Openembedded-devel at lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>




More information about the Openembedded-devel mailing list