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.jus...@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
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#38819): https://edk2.groups.io/g/devel/message/38819
Mute This Topic: https://groups.io/mt/31017201/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to