public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, jordan.l.justen@intel.com
Cc: Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [edk2-devel] [PATCH 3/5] OvmfPkg/build.sh: Move automatic TARGET_TOOLS detection later
Date: Wed, 10 Apr 2019 17:37:22 +0200	[thread overview]
Message-ID: <d693b2dd-5167-0d5f-9987-32ce87289bcb@redhat.com> (raw)
In-Reply-To: <20190410093424.20365-3-jordan.l.justen@intel.com>

Hi Jordan,

On 4/10/19 11:34 AM, Jordan Justen wrote:
> If we are building for a non-native ARM, then we may need to select a
> cross-compiler based on the -a paramter.

I am sorry but I am non-native English and I have hard time to
understand your comment.

OVMF targets x86 hardware, which is obviously not ARM. And I'm not aware
of another target architecture.  Are you talking about the host where
you build?

I am trying your series on a Aarch64 host but I fail at passing the
correct cross gcc. I set GCC5_IA32_PREFIX, GCC5_X64_PREFIX and GCC5_BIN
env vars, but the build script still run '"gcc"' instead of my cross one.

A more generic comment regarding your series: how do you use this script?

Thanks,

Phil.

> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> ---
>  OvmfPkg/build.sh | 99 +++++++++++++++++++++++++-----------------------
>  1 file changed, 51 insertions(+), 48 deletions(-)
> 
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index 217abae683..812441b9b1 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -40,58 +40,11 @@ ARCH_X64=no
>  BUILDTARGET=DEBUG
>  BUILD_OPTIONS=
>  PLATFORMFILE=
> +TARGET_TOOLS=
>  THREADNUMBER=1
>  LAST_ARG=
>  RUN_QEMU=no
>  
> -#
> -# Pick a default tool type for a given OS
> -#
> -TARGET_TOOLS=MYTOOLS
> -case `uname` in
> -  CYGWIN*)
> -    echo Cygwin not fully supported yet.
> -    ;;
> -  Darwin*)
> -    Major=$(uname -r | cut -f 1 -d '.')
> -    # Major is Darwin version, not OS X version.
> -    # OS X Yosemite 10.10.2 returns 14.
> -    case $Major in
> -      [156789])
> -        echo OvmfPkg requires OS X Snow Leopard 10.6 or newer OS
> -        exit 1
> -        ;;
> -      10)
> -        TARGET_TOOLS=XCODE32
> -        ;;
> -      1[12])
> -        TARGET_TOOLS=XCLANG
> -        ;;
> -       *)
> -        # Mavericks and future assume XCODE5 (clang + lldb)
> -        TARGET_TOOLS=XCODE5
> -        ;;
> -    esac
> -    ;;
> -  Linux*)
> -    gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
> -    case $gcc_version in
> -      [1-3].*|4.[0-7].*)
> -        echo OvmfPkg requires GCC4.8 or later
> -        exit 1
> -        ;;
> -      4.8.*)
> -        TARGET_TOOLS=GCC48
> -        ;;
> -      4.9.*|6.[0-2].*)
> -        TARGET_TOOLS=GCC49
> -        ;;
> -      *)
> -        TARGET_TOOLS=GCC5
> -        ;;
> -    esac
> -esac
> -
>  #
>  # Scan command line to override defaults
>  #
> @@ -166,6 +119,56 @@ else
>    BUILD_ROOT_ARCH=X64
>  fi
>  
> +#
> +# Pick a default tool type for a given OS
> +#
> +if [ -z "$TARGET_TOOLS" ]; then
> +  TARGET_TOOLS=MYTOOLS
> +  case `uname` in
> +    CYGWIN*)
> +      echo Cygwin not fully supported yet.
> +      ;;
> +    Darwin*)
> +      Major=$(uname -r | cut -f 1 -d '.')
> +      # Major is Darwin version, not OS X version.
> +      # OS X Yosemite 10.10.2 returns 14.
> +      case $Major in
> +        [156789])
> +          echo OvmfPkg requires OS X Snow Leopard 10.6 or newer OS
> +          exit 1
> +          ;;
> +        10)
> +          TARGET_TOOLS=XCODE32
> +          ;;
> +        1[12])
> +          TARGET_TOOLS=XCLANG
> +          ;;
> +         *)
> +          # Mavericks and future assume XCODE5 (clang + lldb)
> +          TARGET_TOOLS=XCODE5
> +          ;;
> +      esac
> +      ;;
> +    Linux*)
> +      gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
> +      case $gcc_version in
> +        [1-3].*|4.[0-7].*)
> +          echo OvmfPkg requires GCC4.8 or later
> +          exit 1
> +          ;;
> +        4.8.*)
> +          TARGET_TOOLS=GCC48
> +          ;;
> +        4.9.*|6.[0-2].*)
> +          TARGET_TOOLS=GCC49
> +          ;;
> +        *)
> +          TARGET_TOOLS=GCC5
> +          ;;
> +      esac
> +  esac
> +fi
> +
>  case $PROCESSOR in
>    IA32)
>      if [ -n "$QEMU_COMMAND" ]; then
> 

  reply	other threads:[~2019-04-10 15:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10  9:34 [PATCH 1/5] OvmfPkg/build.sh: Require QEMU 1.6 or newer and always enable flash Jordan Justen
2019-04-10  9:34 ` [PATCH 2/5] OvmfPkg/build.sh: Don't automatically -hda qemu parameter Jordan Justen
2019-04-10  9:34 ` [PATCH 3/5] OvmfPkg/build.sh: Move automatic TARGET_TOOLS detection later Jordan Justen
2019-04-10 15:37   ` Philippe Mathieu-Daudé [this message]
2019-04-10 19:56     ` [edk2-devel] " Jordan Justen
2019-04-10  9:34 ` [PATCH 4/5] OvmfPkg/build.sh: Add AARCH64/ARM build and qemu support Jordan Justen
2019-04-10  9:34 ` [PATCH 5/5] OvmfPkg/build.sh: Add a cross compiler prefix for AARCH64/ARM Jordan Justen
2019-04-10 14:16 ` [edk2-devel] [PATCH 1/5] OvmfPkg/build.sh: Require QEMU 1.6 or newer and always enable flash Laszlo Ersek
2019-04-10 20:18   ` Jordan Justen
2019-04-11  7:48     ` Laszlo Ersek
2019-04-10 14:45 ` Philippe Mathieu-Daudé

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=d693b2dd-5167-0d5f-9987-32ce87289bcb@redhat.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