From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web10.3273.1594805218071099826 for ; Wed, 15 Jul 2020 02:26:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=DRTuSU2q; spf=pass (domain: nuviainc.com, ip: 209.85.128.65, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f65.google.com with SMTP id g75so4645239wme.5 for ; Wed, 15 Jul 2020 02:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=41m1LUEThKIn/VPTxD9KfPOdvmfnZR7nAOVYxcF+ol8=; b=DRTuSU2qxIoSJ4QREI036oVP8CmofQKu7cG5X4+XosZIm2reHIT1Nipr1h1tOeZjN7 AasTRzlk+kL5teKbtrBsgK5iDPIYPYXNRrGkAwB1JD8Q5jvHSq9YIph6UBPLEB7UPXlK huiPPdMrr6Xq46lx9Al+AxYudeAkP9DkoeY+4A/RjaS7URsDFT/Udw2TeBhg+czZdlwv vrOt5nNBPccC4B+ctyVWN5466mDXJQhExAUccgksNbo9Qo9v0Wmn9NsnHnEhCBFPwmJz lBFR0ON7InAKjT8omQSiksEOWgU+ER4XjAu8v0R9rSX+/8WYBoIhmfQkz5UELeGY7x0u wdrg== 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=41m1LUEThKIn/VPTxD9KfPOdvmfnZR7nAOVYxcF+ol8=; b=Avg4UmcqerD0og81SNzJFBVi/xElW/DFY6v52c7oqrdXRsDKn7m6Sxhe7a0wm8qumN i7ZJ58qsE+aJU/981tNgxVWiXq9D5Tf2XldaU5YKli+k08UZ5fQ6KFk/AbMT0GOfsPD4 SDy7HERl5inFarVKN+woiDYiH30IditZ4T/nD2yauojx2OmrtvrssC64+YNz5Iby+kEZ 37407bFfRefZmRW6vbRmgYy2Nx+5FY8qQb/RuBW3Y/px5UnGTLKJmyva55TtdE8jCKg/ RaUAHNYSzwLEVbVRMvEmDP8jb/hmGM2ppSyuyJ2/7tOJBJVG8K8Nbohgu0yrk20Cp7IH ejaw== X-Gm-Message-State: AOAM5305C2+XFKUYFNtDt4qFYuZVnwqbvN0NmP4GW//cb6salmJa58pd /b+Je6f6q3yaMv1oXMofPZ852Q== X-Google-Smtp-Source: ABdhPJyPY6nW5RnFkAkzWP/ng+PLd6zqLmuC+175ux82wqYFxG4n0WJI16tLsMgH2J+/VuBd71/SAA== X-Received: by 2002:a1c:9d07:: with SMTP id g7mr7754678wme.160.1594805216624; Wed, 15 Jul 2020 02:26:56 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id v3sm2472779wrq.57.2020.07.15.02.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 02:26:56 -0700 (PDT) Date: Wed, 15 Jul 2020 10:26:54 +0100 From: "Leif Lindholm" To: Vin Xue Cc: devel@edk2.groups.io, Michael D Kinney Subject: Re: [edk2-platforms][PATCH] Readme.md: Update cross compiling section Message-ID: <20200715092654.GD12303@vanye> References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jul 15, 2020 at 14:05:03 +0800, Vin Xue wrote: > 1. Update invalid URL link of Linaro GCC toolchains. > 2. Add build command example for cross compiling. > > Cc: Leif Lindholm > Cc: Michael D Kinney > Signed-off-by: Vin Xue > --- > Readme.md | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/Readme.md b/Readme.md > index ea9492240a..2e30f672cc 100644 > --- a/Readme.md > +++ b/Readme.md > @@ -57,10 +57,13 @@ X64 | x86_64-linux-gnu- > > ### GCC > Linaro provides GCC toolchains for > -[aarch64-linux-gnu](https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/) > -and [arm-linux-gnueabihf](https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/) > -compiled to run on x86_64/i686 Linux and i686 Windows. Some Linux distributions > -provide their own packaged cross-toolchains. > +[aarch64-linux-gnu](https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/) > +and [arm-linux-gnueabihf](https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/) > +compiled to run on x86_64/i686 Linux and i686 Windows. Yes, we should update the information about the Windows toolchains. But gcc 7 is ancient. If we go to https://releases.linaro.org/components/toolchain/binaries/, we see they have added a gcc-8 "directory". I say "directory" with quotes because clicking on that redirects you to https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads This is the location we should now be pointing to - and these toolchains are now gcc 9.2. > + > +Some Linux distributions provide their own packaged cross-toolchains. e.g. Install AArch64 GCC toolchain on Ubuntu (x86_64) with: > + > +`sudo apt install gcc-aarch64-linux-gnu` We can't maintain a list of every possible package name with every possible package install command (apt, yum, dnf, pacman, ?) for every distribution (debian, ubuntu, redhat, fedora, centos, suse, arch, gentoo, ?) out there. We'll also be adding RISC-V support in the near future. The abovementioned arm.com link includes prebuilt compilers for Windows-x86_64, Linux-x86_64, and Linux-AArch64 (for AArch32). Anyone unable to figure out how to find and install packages provided with their distro can always grab a toolchain from that download page. > > ### clang > Clang does not require separate cross compilers, but it does need a > @@ -160,6 +163,9 @@ variable `{TOOL_CHAIN_TAG}_{TARGET_ARCH}_PREFIX` - in the case above, > **GCC5_AARCH64_PREFIX**. > > So, referring to the cross compiler toolchain table above, we should prepend the `build` command line with `GCC5_AARCH64_PREFIX=aarch64-linux-gnu-`. > +``` > +$ GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -n $NUM_CPUS -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc > +``` How to build a platform is already described in the section immediately preceding this one. This paragraph tells you how to inform the build system to apply a prefix for the compiler if cross compiling. Seprate note (to self, really): we don't need the -n thing anymore, the 'build' command has been updated to figure this out for itself. / Leif > > ## Using uefi-tools helper scripts > uefi-tools is a completely unofficial set of helper-scripts developed by Linaro. > -- > 2.27.0.windows.1 >