From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (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 C358A21E79011 for ; Sat, 19 Aug 2017 08:05:14 -0700 (PDT) Received: by mail-wm0-x229.google.com with SMTP id i66so19126476wmg.0 for ; Sat, 19 Aug 2017 08:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pFO5akPbMMyZOKiF5tW4F1W947DgUtMNvm9Z2TuPMEw=; b=GLpvSP1/0wAjIRfBrv2LrnDG6yCwG9meacKtl/fph98YEm2mPczHSkGcjoSLJ/5qHB AZVVG24TzGFmqQoAe+lE4Ox/uSomRPOmVvIdfddeAndlxLuOGQt1uiJIWvTfrm2t2u3N A81sUC7Td6W2rNAL3pZLkfbhG/btGA9d+G2gU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pFO5akPbMMyZOKiF5tW4F1W947DgUtMNvm9Z2TuPMEw=; b=QI8ElyJuMe5QfHQ5edWzv2j9MJebnjLKv9qCxFNBbfLBwIteM9QmoV7nMOM7xOb6Lr 6L8ntITMpqoGXNSc9rM/sEoLH5fLYZIAiYDL0U+XFNMpF1YcpTdI7PlmgXS+hs6sywdh EOK5N16hBjXB7jKkstTAWCenKSSGQ/Y4E+Z/YIzi6aho47pLr2ZZV4Ijgz1HLLTgoXUY yC1RWKTBAKEO2lQRPmMmH+mQXNBfRc8xnXJAmSlVicTA+vPqop1/GpW3yITXJ0vAgFp0 qbS8yNh1vN6MEszORHH6l0V/vgztlzpLWMCi2GS0UCnurzfkllcrAFdr6ICFHr6RdDvH xxrw== X-Gm-Message-State: AHYfb5gjS70MeIa1LUTxmc2o1U4C0XoEOchqH8YjJQ39vsgi2beQiIG8 LP6uwA4fmWWh63No X-Received: by 10.28.103.138 with SMTP id b132mr3858783wmc.35.1503155262420; Sat, 19 Aug 2017 08:07:42 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 73sm4130117wmo.1.2017.08.19.08.07.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Aug 2017 08:07:41 -0700 (PDT) Date: Sat, 19 Aug 2017 16:07:39 +0100 From: Leif Lindholm To: Alan Ott Cc: edk2-devel@lists.01.org, linaro-uefi@lists.linaro.org Message-ID: <20170819150739.gowsqbr6womfknrf@bivouac.eciton.net> References: <20170818232959.10578-1-alan@softiron.com> <20170819103722.m3cx2mnaj7idfd64@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH] edk2-build.sh: Use CROSS_COMPILE if it's set externally X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2017 15:05:15 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Aug 19, 2017 at 09:49:25AM -0400, Alan Ott wrote: > On 08/19/2017 06:37 AM, Leif Lindholm wrote: > > (Adding linaro-uefi, since this is not official tooling.) > > Ok, no problem. > > > On Fri, Aug 18, 2017 at 07:29:59PM -0400, Alan Ott wrote: > > > --- > > > edk2-build.sh | 8 +++++--- > > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > > > diff --git a/edk2-build.sh b/edk2-build.sh > > > index 60da4df..fb0cb84 100755 > > > --- a/edk2-build.sh > > > +++ b/edk2-build.sh > > > @@ -73,11 +73,13 @@ function do_build > > > import_openssl > > > fi > > > - set_cross_compile > > > - CROSS_COMPILE="$TEMP_CROSS_COMPILE" > > > + if [ -z $CROSS_COMPILE ]; then > > > + set_cross_compile > > > + CROSS_COMPILE="$TEMP_CROSS_COMPILE" > > > + fi > > > echo "Building $PLATFORM_NAME - $PLATFORM_ARCH" > > > - echo "CROSS_COMPILE=\"$TEMP_CROSS_COMPILE\"" > > > + echo "CROSS_COMPILE=\"$CROSS_COMPILE\"" > > > echo "$board"_BUILDFLAGS="'$PLATFORM_BUILDFLAGS'" > > > if [ "$TARGETS" == "" ]; then > > Sorry, can't accept this one. > > > > I use this script to build multiple platforms across multiple > > architectures in one go, and this change breaks that. > > I see now that it's in do_build() which is called for each platform built, > so yes, my patch won't work. Sorry :( > > > But also, do you really need it? Cross compilers accessible on the > > PATH should be automatically detected. > > Yes, I can do this.[1] > > > If you do need it, because you're using some non-standard toolchain > > (such as aarch64-none-eabi), I would like to see something like what > > exists (in semi-broken form) in uefi-build.sh: CROSS_COMPILE_32 vs > > CROSS_COMPILE_64. However, in order to be useful, that would need to > > be extended to do a per-architecture override: > > CROSS_COMPILE_AARCH64 > > CROSS_COMPILE_ARM > > CROSS_COMPILE_IA32 > > CROSS_COMPILE_X64 > > Yes, I was incorrectly thinking it was intended to be similar to > uefi-build.sh and didn't look closely enough. > > Sorry for the extra noise, > > Alan. > > [1] For what it's worth I've gotten into the habit of specifying the full > path in CROSS_COMPILE when cross compiling things which build this way > (kernels, u-boots, etc). It makes typos fail early and operates > independently of my actual PATH, preventing a mistyped or missing path entry > from causing it to use a compiler down the list in the system or user path. Sure, it's a valid thing to do. Especially if testing across different versions of toolchains. Just, I tend to do that by flipping a symlink. If someone was to implement what I suggest above, I would be happy to take it. And sorry for mistyping the address to my own mailing list :| / Leif