From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4D79D1A1DFA for ; Tue, 9 Aug 2016 03:04:31 -0700 (PDT) Received: by mail-io0-x22f.google.com with SMTP id b62so6918512iod.3 for ; Tue, 09 Aug 2016 03:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HFTh9sageOVkwzd/cNEEO5MhetZ3V875PrHTBFC/kBQ=; b=Zzdt3VbV0ez1KqheB+VF+bYuv5x87O0z84e2rVWNKUl3XKuF3yCEWmBk3qjSxkPMz2 ehW6p0RHHvrzOZ2xFeBzVanuLfhvVW6WSm9ooc0l48xLwuoH3XDPaLU7Axmb91jHzjud TN4VRY/N4IoqYF9+JIt9/ZUoJNOEwu0cXNA5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HFTh9sageOVkwzd/cNEEO5MhetZ3V875PrHTBFC/kBQ=; b=fK+Ymbw795KQMJ3PRpq5mUOpvMLpvauQKF5+y9mwnpAn6BjSFZyrf6FkB2OLieHaz8 Y2Hj3/fo+St18yq5gb+JVeobnmxM1YLypuDuRzUYUc/3rKh1H6nU+rMtN3kEhBgy0M+m sa3MLujdWQyCG3k5o0pm94cgWNJrvvgYLZufGMV9DVGgMIJMCwRKdDgCmUjE1NLAW0Dw M4bCOQ8Tn5nL5BP+AZ09nMScbgB1yZ6IbG+WjOcaCYxHyr966aJvgdiCq743M5AJS0Xu Tl26ujNphz3ALU5F+7sEphm3VIgyFBFDsW5/yi82GF5u0WWsUnzHdTfMTkToG8vx4wk6 NqGQ== X-Gm-Message-State: AEkoouuIgWWPCo7zPIspTihXK3nY6csEXJ9VJbURgtqP7jBGABhF6eFPpiY9lc0fFtZkg7K56v9QNf0rnTO9XKBL X-Received: by 10.107.41.67 with SMTP id p64mr94564281iop.130.1470737070501; Tue, 09 Aug 2016 03:04:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Tue, 9 Aug 2016 03:04:30 -0700 (PDT) In-Reply-To: <20160809100239.GI31760@bivouac.eciton.net> References: <20160809083955.GH31760@bivouac.eciton.net> <20160809100239.GI31760@bivouac.eciton.net> From: Ard Biesheuvel Date: Tue, 9 Aug 2016 12:04:30 +0200 Message-ID: To: Leif Lindholm Cc: Michael Zimmermann , valerij zaporogeci , edk2-devel Subject: Re: Toolchain question X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2016 10:04:31 -0000 Content-Type: text/plain; charset=UTF-8 On 9 August 2016 at 12:02, Leif Lindholm 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.