Re: Difference between *-none-elf and *-linux-gnu configurations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jonathan!

Thanks for the answer.

On 4/12/24 17:14, Jonathan Wakely via Gcc-help wrote:
On Fri, 12 Apr 2024, 15:26 Johannes Krottmayer via Gcc-help, <
gcc-help@xxxxxxxxxxx> wrote:

Hi!

Sorry if already asked, but what are the differences from as example
x86_64-none-elf and x86_64-linux-gnu configurations?

The former is a bare metal "freestanding" target that generates code for a
system without an OS or C library. The latter is a "hosted" target that
uses the Linux kernel and Glibc C library.

I already did know that. The *-none-elf configurations I primarily use them
in my own embedded projects. But there seems for me, there are more differences.

I have tried to compile Linux with a x86_64-none-elf build, but failed with
assembler errors. (It's might be also a binutils question.) With the
x86_64-linux-gnu build, everything worked fine.


You need a binutils configured for x86_64-none-elf to assemble and link
co
de compiled for that target.
Yes, the binutils are configured as *-none-elf. For my projects these
configuration works fine. But I'm wondering why the x86_64-none-elf build
didn't work when I try to compile the Linux kernel. AFAIK, Linux use it's
own libc and also some functions from libgcc.

So I have thought there must be another differences. Like how comments
are interpreted, as example (The assembler error, when I try to build
Linux with a x86_64-none-elf is inner a comment.).

Currently I have only compared the Makefile from GCC after configuration,
and only seen that additional _GNU_SOURCE is defined in the *-linux-gnu
configuration.

Can somebody explain me the key differences between this both builds?
Unfortunately I currently didn't find any information.

Thanks in advance!

Kind regards,

Johannes


Attachment: publickey - johannes@krotti42.com - 0x0D55CF6F.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux