From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (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 1F12C21D49108 for ; Sat, 19 Aug 2017 03:34:59 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id p8so6030183wrf.5 for ; Sat, 19 Aug 2017 03:37:28 -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=97sSe8Bhp1IUh4TByeego013MRu1zlAOqiTZ6RNNBnw=; b=P/zu/Cag1BncC5D/e4aTmIdX0xkvcr/OG5UYU5hihjsY+BumHU9x/XYy04V6jqJAD/ ILGCzxhTuo/AKo4QMA/XsbPEYcwwelk65VUudzTQFmpLK0kWmKMNCL5cLOmPEn1j4KPH uUbN11YCSX71DGRrqpkhabT789T5QOu3QqiIY= 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=97sSe8Bhp1IUh4TByeego013MRu1zlAOqiTZ6RNNBnw=; b=My7eOsJScnUltDwHDN1xECsxKs/CI7EFT5XCv/T2Iszgz+YBFyAeEWbJXqgVsvHqCj jDz8e9IOLpZuIwunaIUCZS2Zc/FnAHkCEL7c/2T8wVKdhd+xet+RgpFR0s6WvxxV99RX CKzp4+2fQz/GnzpXIFBL7aVNKXMrvRjYbRgPO+CbYf7Tbnx7JVh4vssVd5sRU26JGw28 kQRyq3uePG6E21CKhCtEeIuYolFcsBDgZujr4J9IWkBKrAhUbdey3AVCZEiN3tFgYpIz QCCqEBxHGR3xdZDFKZVoCSExDxsA4dGqtzU19jAoYE18zPJ8iwthhYnAY8zT6qz2Bd7A gD8w== X-Gm-Message-State: AHYfb5jsR6ZVDmCSM4vz29WAEOWV47t1GOTvdiLPhGdfsm1d9neqN/vE c3niJy5OcN0scvNL X-Received: by 10.223.150.77 with SMTP id c13mr527445wra.85.1503139046824; Sat, 19 Aug 2017 03:37:26 -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 90sm5596573wrs.18.2017.08.19.03.37.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Aug 2017 03:37:25 -0700 (PDT) Date: Sat, 19 Aug 2017 11:37:23 +0100 From: Leif Lindholm To: Alan Ott Cc: edk2-devel@lists.01.org, linaro-uefi@lists.01.org Message-ID: <20170819103722.m3cx2mnaj7idfd64@bivouac.eciton.net> References: <20170818232959.10578-1-alan@softiron.com> MIME-Version: 1.0 In-Reply-To: <20170818232959.10578-1-alan@softiron.com> 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 10:34:59 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline (Adding linaro-uefi, since this is not official tooling.) 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. But also, do you really need it? Cross compilers accessible on the PATH should be automatically detected. 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 Regards, Leif