This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: subverting an arm-elf toolchain to use glibc against linux


Carlos de Sa wrote:
Hi,

I have an arm-elf toolchain using newlib libraries which i would want to use to compile a linux kernel (it is being used to compile a uclinux kernel. also the linux kernel should not require any lib support...) and more importantly compile programs against a glibc library built against linux kernel headers. Basically I would expect to compile my linux kernel using the arm-elf toolchain and then use this toolchain to compile my glibc library against my already compiled linux kernel and then finally compile my application code using -nostdlib and -nostdinc and forcing it (subverting) to use the glibc library.

Is this possible?

I have read plenty about difference between arm-elf and arm-linux but nothing about this.So far whatever i have read seems to indicate the _gcc_ has to be aware that it is compiling for a linux target (something about linux syscalls and weak linking?) and hence we have to have an OS-aware gcc. Is this correct? in which case i would expect the above scenario to fail.

It's technically possible to build a Linux kernel with an arm-elf toolchain, but it requires a boatload of command line parameters to basically undo all the defaults set up in the specs file. A client of mine experimented with this at one point, but ultimately concluded that it was less of a maintenance headache to have two different gcc configurations--- one for "bare" applications and one for Linux kernels and applications.


Which is contrary to gcc-think, IMHO, because the Linux kernel itself is a "bare" application, and not an application that runs under Linux. But regardless, it is How It Is.



b.g.

--
Bill Gatliff
bgat@billgatliff.com


-- For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]