public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael Zimmermann <sigmaepsilon92@gmail.com>,
	valerij zaporogeci <vlrzprgts@gmail.com>,
	 edk2-devel <edk2-devel@lists.01.org>
Subject: Re: Toolchain question
Date: Tue, 9 Aug 2016 12:04:30 +0200	[thread overview]
Message-ID: <CAKv+Gu_qM7Kd_f9FuL3VYGxmBxG4AWazgDWJVqvA955ukk=0XQ@mail.gmail.com> (raw)
In-Reply-To: <20160809100239.GI31760@bivouac.eciton.net>

On 9 August 2016 at 12:02, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Tue, Aug 09, 2016 at 11:02:55AM +0200, Michael Zimmermann wrote:
>> > I use both, and never notice any difference. The primary differences
>> > are newlib vs glibc, and in some cases, whether symbols are decorated
>> > with a leading _
>> > The actual code generation is more dependent on the default target
>> > (i.e., -march/-mthumb for ARM) than bare-metal/hosted.
>>
>> > I only ever use the native
>> > compiler under Linux, or one of the linaro "-linux-" flavours if
>> > cross-compiling.
>>
>> I think that works because edk2 excludes all toolchain libs with -nostdlib
>> and fno-builtin.
>> I know from other bootloader projects like LK(LittleKernel) which link
>> against libgcc that compiling with anything but bare-metal toolchains makes
>> the resulting binary un-bootable.
>
> Sure, but those are effectively bugs in the corresponding projects.
>
> If they require special options/libraries they should (where possible)
> manually configure this, or (where not) exit with an error.
>

The problem with libgcc on AArch64 is that it is usually compiled with
the small code model, requiring 4 KB section alignment (up until
recently at least), and without -mstrict-align. In general, projects
that contain C code that should be able to execute with the MMU off
should steer clear of toolchain supplied target libraries.

-- 
Ard.


      reply	other threads:[~2016-08-09 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09  0:29 Toolchain question valerij zaporogeci
2016-08-09  4:07 ` Michael Zimmermann
2016-08-09  6:09   ` Ard Biesheuvel
2016-08-09  8:39   ` Leif Lindholm
2016-08-09  9:02     ` Michael Zimmermann
2016-08-09 10:02       ` Leif Lindholm
2016-08-09 10:04         ` Ard Biesheuvel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKv+Gu_qM7Kd_f9FuL3VYGxmBxG4AWazgDWJVqvA955ukk=0XQ@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox