public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Alan Ott <alan@softiron.com>
Cc: edk2-devel@lists.01.org, linaro-uefi@lists.01.org
Subject: Re: [PATCH] edk2-build.sh: Use CROSS_COMPILE if it's set externally
Date: Sat, 19 Aug 2017 11:37:23 +0100	[thread overview]
Message-ID: <20170819103722.m3cx2mnaj7idfd64@bivouac.eciton.net> (raw)
In-Reply-To: <20170818232959.10578-1-alan@softiron.com>

(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


  reply	other threads:[~2017-08-19 10:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18 23:29 [PATCH] edk2-build.sh: Use CROSS_COMPILE if it's set externally Alan Ott
2017-08-19 10:37 ` Leif Lindholm [this message]
2017-08-19 13:49   ` Alan Ott
2017-08-19 15:07     ` Leif Lindholm

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=20170819103722.m3cx2mnaj7idfd64@bivouac.eciton.net \
    --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